我有以下逻辑卷:
--- 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
我用了这个命令:
lvcreate --size 100M --snapshot --name mongodbSnap /dev/wd1/mongodb
创build以下快照:
--- 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
一切看起来都很好。 但是,当我尝试安装以下的捕捉lv卷:
mount -t xfs / dev / wd1 / mongodbSnap / mnt
我得到以下错误:
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.
日志消息包含以下错误:
[2424239.516667] XFS (dm-7): Filesystem has duplicate UUID xxxxxx - can't mount
为什么快照包含与原始lv相同的UUID,我该如何解决这个问题? 这样做的全部目的是使用dd命令备份驱动器…
解决方法是用nouuid选项挂载文件系统
mount -o nouuid <source> <dest>