LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-15-2007, 03:14 PM   #1
jdege
LQ Newbie
 
Registered: Aug 2006
Posts: 15

Rep: Reputation: 0
Mounting logical volume?


I had a CentOS 5 installation that went belly up, yesterday. After an extensive fsck, I had a system that I could boot but couldn't log in to.

So I've built a new CentOS 5 installation, on a new HD, and now I'd like to mount my old HD< so I can copy files from it.

Problem is CentOS 5 uses these new LVM logical volumes, that I don't really understand.

It looks like during the boot process the LVM system recognized that it had two sets of logical volumes on disk, with identical names, and chose the one on the boot disk to mount.

So what I have is /dev/hda1 as boot, and /dev/hda2 as VolGroup00.

And /dev/hdb1 as boot, and /dev/grb2 as VolGroup00.

In any case, mount shows / mounted on /dev/mapper/VolGroup00-LogVol00.
It looks like /dev/mapper/VolGroup00-LogVol01 is configured as swap.

vgscan shows VolGroup00 twice.

lvscan shows /dev/VolGroup00/LogVol00 and /dev/VolGroup00/LogVol01.

In other words, only two of the logical volumes show up, I'm assuming because the volume groups have the same name.

How do I mount the second Volgroup00/LogVol11?
 
Old 12-15-2007, 03:39 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,137

Rep: Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122Reputation: 4122
You change it's name - this comes up all the time on the Redhat/Fedora fora.
Search on vgrename.
 
Old 12-15-2007, 04:55 PM   #3
jdege
LQ Newbie
 
Registered: Aug 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
You change it's name - this comes up all the time on the Redhat/Fedora fora.
Search on vgrename.
How do I specify which of the two VolGroup00 is the one I want to rename?
 
Old 12-15-2007, 05:39 PM   #4
jdege
LQ Newbie
 
Registered: Aug 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jdege View Post
How do I specify which of the two VolGroup00 is the one I want to rename?
I take the drive I don't want to change out of the box, and boot from the rescue CD. Doh!

Repeating what I found in another thread, for anyone who follows along:

Two LVM VolGroup's, same name, one is system disk - what to do?

From the rescue CD:

# this scans for and activates the logical volumes:
lvm vgscan
lvm lvscan
lvm vgchange -a y
lvm pvscan
lvm lvscan

# this deactivates the logical volumes so we can change the name of the volume group:
lvm vgchange -a n

#this changes the name of the volume group:
lvm vgrename VolGroup00 VolGroup01

Shut down, put the other drive in, and boot from the new drive.

#create a mount point for the old drive
mkdir /mnt/old/root

#mount the old drive
mount -t ext3 /dev/mapper/VolGroup01-LogVol00 /mnt/old/root

Thanks, folks, for the help.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i tried resizeing my logical volume, rahman.athiq Linux - General 1 07-13-2007 03:18 PM
Problem mounting a logical volume with JFS sumta Linux - General 3 10-05-2006 11:49 AM
Logical Volume Management 2 XaViaR Linux - General 5 08-20-2005 07:48 AM
swapping on a logical volume garba Linux - General 1 06-28-2005 06:36 PM
Logical Volume Groups concoran Linux - General 3 06-03-2001 06:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration