published on: mingster

I ran into a Fedora box recently which after rebooting was unable to mount the root file system. Here's what I did to get this going:

First I booted off the Fedora CD and typed "linux rescue" at the prompt in order to boot into rescue mode. When asked if I would like to enable the network interfaces or mount the file systems, I said no to both.

If you are running a different Linux distro or don't have the Fedora CD, I'm pretty sure you can use a different Linux bootable media and then just install the LVM tools and use that instead.

So, once you're at the command prompt, you need to activate the LVM partitions so they can be used. This can be done using the following command:

lvm vgchange --ignorelockingfailure -P -a y

The -P will make logical volumes which are missing one of their disks available too.

This should create the device entries for these logical volumes. You can find out what the name of the logical volumes are by typing:

lvm lvs

This should give you output showing the name of the Volume Group and the name of the Logical Volume. The device entry should be created in /dev//. So in my case it was created as /dev/VolGroup00/LogVol00.

You can now mount or fsck or whatever you need to do. If you wanted to check/repair the file system you could run:

fsck /dev/VolGroup00/LogVol00

If you wanted to mount the file system you could run:

mkdir /volmount
mount /dev/VolGroup00/LogVol00 /volmount

And that's it, you now have access to your logical volume on another system.