cancel
Showing results for 
Search instead for 
Did you mean: 
Moderator
Moderator
  • 1,183 Views

How to: Mounting an XFS LVM snapshot

Your objective is to mount a LVM snapshot where the origin is a XFS filesystem. On mounting the snapshot to its mount point you get the following feedback:


[root@server0 ~]# mount /dev/mapper/VG_DB-SNAP_MARIA /backups/maria/
mount: wrong fs type, bad option, bad superblock on /dev/mapper/VG_DB-SNAP_MARIA,
missing codepage or helper program, or other error

In some cases useful info is found in syslog - try
dmesg | tail or so.


If you notice the feedback, it suggests to run the dmesg command and you notice the following:


[86803.183360] XFS (dm-1): Filesystem has duplicate UUID 9e92f93c-1b03-4383-b753-ae4b449b6864 - can't mount


If you didn’t notice that, and checked /var/log/messages you would see something similar:


Feb 25 11:05:14 localhost kernel: XFS (dm-1): Filesystem has duplicate UUID 9e92f93c-1b03-4383-b753-ae4b449b6864 - can't mount


There are 2 things that you can do:

[1] Mount the filesystem without using its UUID


mount -o nouuid mount /dev/mapper/VG_DB-SNAP_MARIA /backups/maria/

or:

[2] Change the UUID of the snapshot LVM


xfs_repair -L /dev/mapper/VG_DB-SNAP_MARIA
xfs_admin -U $(uuidgen) /dev/mapper/VG_DB-SNAP_MARIA
mount /dev/mapper/VG_DB-SNAP_MARIA /backups/maria/

Labels (1)
Tags (2)
Join the discussion
You must log in to join this conversation.