From Fedora Project Wiki

Revision as of 14:13, 24 May 2008 by fp-wiki>ImportUser (Imported from MoinMoin)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to Mount Another LVM

Background

My wife's desktop PC became unusable recently when the power supply failed. It was an old PC and the power supply was rather unique. It was running Fedora Linux 7 with LVM2.

I thought I could simply remove the hard drive containing Fedora 7 volumes and install it into an external USB hard drive case. However, once it was set up, only the boot volume was visible, not the volume containing all the data.

Using my limited knowledge of LVM only yielded a duplicate volume name error message.

After some research, I found a solution, which I will document here for the benefit of others.

Useful Commands

List the logical volume groups:

lvcsan

List the physical volumes:

pvscan


Rename the logical volume group from VolGroup00 to VolGroup01 (or other unique name):

vgchange -ay VolGroup01

Create a folder for use in mounting the external drive:

mkdir /mnt/external

Mount the data partition of the external drive:

mount -t ext3 /dev/VolGroup01/LogVol01 /mnt/external

References

Renaming LVM2 Volume Groups

LVM HOWTO