Mount LVM Volume from Live CDIf you know anything about anything, you know that Live CDs are great for rescuing data from dying computers. Normally, this involves mounting a hard drive with a single NTFS partition, or an ext3 partition, etc. But what do you do if you were dumb enough to install your system using LVM? LVM is pretty worthless in and of itself, but if you're not familiar with it, rescuing data from an LVM partition can be difficult.
I recently had to rescue data using the new Knoppix CD, version 5.3. First, you need to make sure the Device Mapper kernel module is loaded.
# lsmod | grep dm dm_mod 49236 0If your output looks similar to the above, move to the next step. If "dm_mod" isn't loaded, load it.
# modprobe dm_modOnce you're sure that "dm_mod" is loaded, you need to activate any LVM drives you have.
# vgchange -ay ... snipped output...The `vgchange` command will attempt to activate every attached drive on your system as a LVM drive, so you'll probably see a lot of errors. Eventually though, you'll see it find your LVM drive (if it isn't completely broken). Normally, it will tell you that it's been activated as
/dev/VolGroup00/LogVol00You may also see LogVol01 for your Swap drive. Now that your LVM drive has been activated, you can mount it (assuming you've already created your mount point).
# mount /dev/VolGroup00/LogVol00 /mnt/lvmSo there you go, access to your data.