我创建了两个 LVM 分区,并且可以挂载/使用它们。但是当我尝试使用 UUID 挂载它时,我收到一条消息,提示找不到 UUID。
sudo lvdisplay
--- Logical volume ---
LV Path /dev/vg00/VolProject
LV Name VolProject
VG Name vg00
LV UUID HUhRED-ZUwG-cutq-fniL-1OOE-cZrd-ofoDZ3
LV Write Access read/write
LV Creation host, time ubuntu, 2017-04-04 18:41:55 -0700
LV Status available
# open 1
LV Size 17.00 GiB
Current LE 4351
Segments 3
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:0
--- Logical volume ---
LV Path /dev/vg00/volBackup
LV Name volBackup
VG Name vg00
LV UUID KZ6Y65-L9Qo-ShIz-pQ88-nIyD-P1n5-RGWcrw
LV Write Access read/write
LV Creation host, time ubuntu, 2017-04-04 18:42:42 -0700
LV Status available
# open 0
LV Size 6.99 GiB
Current LE 1790
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 252:1
ubuntu:/dev/vg00$ cat /etc/fstab
UUID=56b92ca1-312c-45e6-8f57-8c80762f96b9 / ext4 errors=remount-ro 0 1
UUID=07d0cb84-79a6-47bd-a155-cbfd045cf6ca none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
#/dev/vg00/VolProject /home/davy/mnt auto defaults 0 0
UUID=HUhRED-ZUwG-cutq-fniL-1OOE-cZrd-ofoDZ3 /home/davy/mnt auto defaults 0 0
ubuntu:/dev/vg00$ blkid /dev/vg00/VolProject
ubuntu:/dev/vg00$ blkid /dev/vg00/volBackup
当我执行 mount -a 时:
ubuntu:/dev/vg00$ sudo mount -a
mount: can't find UUID=HUhRED-ZUwG-cutq-fniL-1OOE-cZrd-ofoDZ3
为什么会发生这种情况?如果我通过 /dev/vg00/VolProject 使用挂载,它可以工作,但如果我使用它的 UUID,它会说找不到它。VG 是按照此处的说明创建的:http://www.tecmint.com/manage-and-create-lvm-parition-using-vgcreate-lvcreate-and-lvextend/
答案1
实际上,您混淆了lvm UUID
和block UUID
。
下面的命令将显示您的lvm UUID
,它指向下的特定项目lvm
。
$ lvdisplay Logical-Volume
以下命令将显示您的blcok UUID
,它指向系统中的特定块设备。
$ blkid /dev/YOUR-Virtual-Group/YOUR-Logical-Volume
您应该始终使用block UUID
或device file
代替来lvm UUID
修改/etc/fstab
记录。