Faced this problem a while ago, I'd posted this on my blog
List out all your partitions, type
linux:/ # lvmdiskscan
You will get a list of something like this
File descriptor 3 left open
File descriptor 4 left open
/dev/dm-0 [ 9.67 GB]
/dev/sda1 [ 78.41 MB]
/dev/dm-1 [ 6.44 GB]
/dev/sda2 [ 115.52 GB]
/dev/dm-2 [ 2.00 GB]
/dev/sda3 [ 18.11 GB] LVM physical volume
/dev/sda5 [ 15.33 GB]
Make a note of /dev/dm-x
, those are the devices which correspond to the LVM partitions. Also do note the sizes.
Next, type lvdisplay to show a detailed list of all the logical volumes available.
lvdisplay |more
LV Name /dev/system/home
VG Name system
LV UUID 1QP9XM-vlKi-umNO-CXvV-TnZN-RCLk-e1FDIr
LV Write Access read/write
LV Status available
# open 1
LV Size 9.67 GB
Current LE 2475
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
— Logical volume —
LV Name /dev/system/root
VG Name system
LV UUID D1fKUJ-uU1C-jlVB-4imh-rrgy-FQu0-TC2Ssm
LV Write Access read/write
LV Status available
# open 1
LV Size 6.44 GB
Current LE 1649
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
— Logical volume —
LV Name /dev/system/swap
VG Name system
LV UUID w5LqIb-xvcr-Xsbk-y3wg-lT3i-LqdN-GFK8Mi
LV Write Access read/write
LV Status available
# open 0
LV Size 2.00 GB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2
Now from the above set of data, we can deduce that my /home
partition, of size 9.67 GB is available as LV group /dev/system/home
on /dev/dm-0
Now that we know where the partition is available, we can proceed with the mounting using the mount command, as
mount /dev/dm-0 /home
And there you go, your LV partition is mounted!
findmnt
command. You can just do afindmnt -l
and you'll get what you want. And for a better version Try this :findmnt -l | grep ' /dev/\S\+'