From Fedora Project Wiki
No edit summary
 
(One intermediate revision by one other user not shown)
Line 13: Line 13:
== Useful Commands ==
== Useful Commands ==


List the logical volume groups:
Before using the following commands, launch a terminal session, type in "su -" without the double quotes, and enter the root password when prompted.


<code>lvcsan</code>
=== List the Logical Volume Groups ===


List the physical volumes:
<code>lvscan</code>
 
=== List the Physical Volumes ===


<code>pvscan</code>
<code>pvscan</code>
=== Rename the Logical Volume Group ===


Rename the logical volume group of the external drive from Vol<code></code>Group00 to Vol<code></code>Group01 (or other unique name):
Rename the logical volume group of the external drive from Vol<code></code>Group00 to Vol<code></code>Group01 (or other unique name):


<code>vgchange -ay VolGroup01</code>
<code>vgchange -ay VolGroup01</code>
=== Mount the Drive ===


Create a folder for use in mounting the external drive:
Create a folder for use in mounting the external drive:
Line 29: Line 35:
<code>mkdir /mnt/external</code>
<code>mkdir /mnt/external</code>


Mount the data partition of the external drive:
 
Next, mount the data partition of the external drive:


<code>mount -t ext3 /dev/VolGroup01/LogVol01 /mnt/external</code>
<code>mount -t ext3 /dev/VolGroup01/LogVol01 /mnt/external</code>

Latest revision as of 18:49, 9 March 2009

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

Before using the following commands, launch a terminal session, type in "su -" without the double quotes, and enter the root password when prompted.

List the Logical Volume Groups

lvscan

List the Physical Volumes

pvscan

Rename the Logical Volume Group

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

vgchange -ay VolGroup01

Mount the Drive

Create a folder for use in mounting the external drive:

mkdir /mnt/external


Next, mount the data partition of the external drive:

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

References

Renaming LVM2 Volume Groups

LVM HOWTO