I am currently running Fedora 12, and on /dev/sda3 I have two logical volumes: one for swap and one for the root partition. If I try to mount the physical volume, /dev/sda3, then I get the following error:
[brad@localhost ~]$ mount /dev/sda3 /mnt/disk
mount: unknown filesystem type ‘LVM2_member’
What I actually want to do is ‘mount the root filesystem on /dev/sda3’. First, use the command pvs to get information about the physical volumes on the computer.
[brad@localhost ~]$ sudo pvs
PV VG Fmt Attr PSize PFree
/dev/sda3 VolGroup lvm2 a- 200.24G 0
So the volume group VolGroup is on the physical volume /dev/sda3. Then use the lvdisplay command to list the logical volumes in the volume group VolGroup.
[brad@localhost ~]$ sudo lvdisplay /dev/VolGroup
— Logical volume —
LV Name /dev/VolGroup/lv_root
VG Name VolGroup
LV UUID j7d1k3-xELA-VQ7x-90T7-QwX1-62mc-0HgVaF
LV Write Access read/write
LV Status available
# open 1
LV Size 196.30 GB
Current LE 50253
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:0
— Logical volume —
LV Name /dev/VolGroup/lv_swap
VG Name VolGroup
LV UUID G0AW8c-Pg1n-KFrL-koAj-pdhi-XjkK-LEGinf
LV Write Access read/write
LV Status available
# open 1
LV Size 3.94 GB
Current LE 1008
Segments 1
Allocation inherit
Read ahead sectors auto
– currently set to 256
Block device 253:1
From this output I know that the root filesystem is in the logical volume /dev/VolGroup/lv_root. To mount this volume, I would run the following command:
[brad@localhost ~]$ mount /dev/VolGroup/lv_root /mnt/disk
You will have to create the folder /mnt/disk.
Thanks, that was helpful!
Just to add: I had to run “vgchange -ay [volgroup]” to make it active before the mount command would work.