5

I created two LVM partitions, and can mount/use them. But when I try to mount it with UUID I get a message that says it can't find the 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

and when I do the mount -a:

ubuntu:/dev/vg00$ sudo mount -a
mount: can't find UUID=HUhRED-ZUwG-cutq-fniL-1OOE-cZrd-ofoDZ3

why is this happening? If I used the mount via /dev/vg00/VolProject it works, but if I use it's UUID it says that it can't find it. VG is created per instructions here: http://www.tecmint.com/manage-and-create-lvm-parition-using-vgcreate-lvcreate-and-lvextend/

3
  • 2
    You don't mount the LV; you mount the filesystem created on the LV, which has its own UUID: if blkid isn't seeing it make sure you clear the cache sudo blkid -c /dev/null. Commented Apr 5, 2017 at 2:53
  • 1
    Run this sudo blkid /dev/vg00/VolProject it should give you a UUID to mount Commented Apr 5, 2017 at 4:36
  • neither of the two suggestions work for me. i found the UUID by lookin in fdisk -l for the name of the device and then get the uid with blkid once i had the name as spelled by OS (which is not the one LVM shows)
    – user855443
    Commented Nov 6, 2018 at 21:07

1 Answer 1

4

Actually, you were confused between lvm UUID and block UUID.

The below command will display your lvm UUID, it point to specific item under lvm.

$ lvdisplay Logical-Volume

The below command will display your blcok UUID, it point to specific block device in your system.

$ blkid /dev/YOUR-Virtual-Group/YOUR-Logical-Volume

You should always use block UUID or device file instead of lvm UUID to modify the /etc/fstab record.

1
  • 1
    What if there isn't a "block UUID" (like dm-integrity devices right now)?
    – ATLief
    Commented Dec 14, 2022 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .