cancel
Showing results for 
Search instead for 
Did you mean: 
ricardodacosta
Moderator
Moderator
  • 15.1K 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 /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)
2 Replies
Dogsbody
Cadet
Cadet
  • 2,422 Views

There is a typo...

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

...should be...

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

Thank you though, this helped me loads

Chetan_Tiwary_
Community Manager
Community Manager
  • 2,416 Views

The typo is corrected , thanks @Dogsbody !

0 Kudos
Join the discussion
You must log in to join this conversation.