I have the following logical volume:
--- Logical volume --- LV Path /dev/wd1/mongodb LV Name mongodb VG Name wd1 LV UUID xxxx LV Write Access read/write LV Creation host, time xxxx LV snapshot status source of mongodbSnap [active] LV Status available # open 1 LV Size 8.00 GiB Current LE 2048 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:3
I used the command:
lvcreate --size 100M --snapshot --name mongodbSnap /dev/wd1/mongodb
to create the following snapshot:
--- Logical volume --- LV Path /dev/wd1/mongodbSnap LV Name mongodbSnap VG Name wd1 LV UUID xxx LV Write Access read/write LV Creation host, time xxx LV snapshot status active destination for mongodb LV Status available # open 0 LV Size 8.00 GiB Current LE 2048 COW-table size 100.00 MiB COW-table LE 25 Allocated to snapshot 0.18% Snapshot chunk size 4.00 KiB Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:7
Everything looks good at this point. However when I try to mount the snap lv volume with the following:
mount -t xfs /dev/wd1/mongodbSnap /mnt
I get the following error:
mount: wrong fs type, bad option, bad superblock on /dev/mapper/wd1-mongodbSnap, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.
The log message contains the following error:
[2424239.516667] XFS (dm-7): Filesystem has duplicate UUID xxxxxx - can't mount
Why would the snapshot contain the same UUID as the original lv and how do I get around this? The whole purpose of doing this is to make a backup of the drive using the dd command...
Solution to this is to mount the filesystem with nouuid option
mount -o nouuid <source> <dest>