Question: I’m trying to mount an LVM2 volume in Linux, but all the instructions I see online say to mount the Volume Group, such as:
mkdir -p /mnt/VolGroup00/LogVol00
but I don’t know how to figure out the name of it. I see the drive in Palimpsest, and that’s all the info I know.
Answer: Here are the steps I used to accessing a LVM from Fedora 17, it should work with most forms of Linux.
Boot Fedora 17.
Make sure lvm2 is installed:
$ sudo yum install lvm2
Load the necessary module(s) as root:
$ sudo modprobe dm-mod
Scan your system for LVM volumes and identify in the output the volume group name that has your Fedora volume (mine proved to be VolGroup00):
$ sudo vgscan
Activate the volume:
$ sudo vgchange -ay VolGroup00
Find the logical volume that has your Fedora root filesystem (mine provedto be LogVol00):
$ sudo lvs
Create a mount point for that volume:
$ sudo mkdir /mnt/fcroot
Mount it:
$ sudo mount /dev/VolGroup00/LogVol00 /mnt/fcroot -o ro,user
You’re done, navigate to /mnt/fcroot and copy the files and paste somewhere else.