Monday, August 28, 2017

CentOS7 XFS LVM Snapshot mount issue kernel: XFS (dm-5): Filesystem has duplicate UUID a5fbcbf8-xxxx-4c2-xxxx-83f407cb7570 - can't mount



The Snapshot LV has the same UUID as the source LV of which it is a snapshot of. Hence when trying to mount the snapshot LV this mount fails with the above message in the SYSLOG

man xfs says 

       nouuid Don't check for double mounted file systems using the file system uuid.  This is useful to mount LVM snapshot volumes, and often used in  com‐ bination with "norecovery" for mounting read-only snapshots.
.................

# blkid | grep 83f407cb7570
/dev/mapper/mariavg-marialv: UUID="a5fbcbf8-4092-4c26-b9b5-83f407cb7570" TYPE="xfs"
/dev/mapper/mariavg-lvol0: UUID="a5fbcbf8-4092-4c26-b9b5-83f407cb7570" TYPE="xfs"

here lvol0 is the snapshot of the LV /dev/mariavg/marialv

So the lvol0 was mounted using --nouuid option 



mount -t xfs -o nouuid /dev/mariavg/lvol0 /mnt/marialvbackup/