Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora Resources > Guides & Solutions (No Questions)
FedoraForum Search

Forgot Password? Join Us!

Guides & Solutions (No Questions) Post your guides here (No links to Blogs accepted). You can also append your comments/questions to a guide, but don't start a new thread to ask a question. Use another forum for that.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 4th January 2007, 01:22 AM
nick.stumpos's Avatar
nick.stumpos Offline
Registered User
 
Join Date: Feb 2005
Location: Lansing, Mi
Age: 28
Posts: 2,222
How to mount a logical volume if group name is already in use

Dont know how often this will be needed, but i needed to figure it out today.
So my laptop was toast but the hd was fine so i figured i would mount it in my desktop. went out bout an adaptor, no problems. But when i go to mount it, since they are both FC default installs, I find out that since both are named Volgroup00, the desktop install takes presidence in /dev, so vgrename is out so anyway here is what i did.
luckily lvm stores its metadata in plaintext so
dd if=/dev/mdb2 bs=512 count=255 skip=1 of=/tmp/logical_lap
vi /tmp/logical_lap
remove all but the plain text, should look something like this (dG comes in handy)
Quote:
# Generated by LVM2: Sat Dec 31 21:50:02 2005

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'vgdisplay'"

creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.18-1.2849.fc6 #1 SMP Fri Nov 10 12:45:28 EST 2006 i686
creation_time = 1136083802 # Sat Dec 31 21:50:02 2005

VolGroup00 {
id = "rmfuJ4-nRSx-1qvM-OI4X-lD1E-AqJT-DiP0vE"
seqno = 3
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536 # 32 Megabytes
max_lv = 0
max_pv = 0

physical_volumes {

pv0 {
id = "ty1bOm-1zhN-RaSe-tAPx-tZN4-6HM7-IbQzkW"
device = "/dev/hda2" # Hint only

status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 2381 # 74.4062 Gigabytes
}
}

logical_volumes {

LogVol00 {
id = "sh0Xw8-W8XD-Ejnu-bMrb-s7be-39I8-93kKXs"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 2324 # 72.625 Gigabytes

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}
}
}
then vi /tmp/logical_lap
change all occurences of VolGroup00 to VolGroup01
and /dev/hda2 or whatever you have, to the correct drive on the new system, in my case hdb2
save and exit vi
# cp /tmp/logical_lap /etc/lvm/backup/VolGroup01
# vgcfgrestore VolGroup01
# vgscan
# pvscan
# vgchange VolGroup01 -a y
# lvscan
# mkdir /mnt/old_2_5
# mount /dev/VolGroup01/LogVol00 /mnt/old_2_5
whola it works, took me a while to figure that one out. At least i kinda understand lvm now
__________________
As always
Love, Life, Loyalty, Wisdom, Knowledge, And Understanding
FC6: Common Questions answered
Reply With Quote
  #2  
Old 24th January 2007, 11:47 PM
coyoteboy Offline
Registered User
 
Join Date: Apr 2005
Posts: 196
Doesnt appear to work with LVMs spread over two PVs. I get a parse error on running

[root@jbuckle 1gb]# vgcfgrestore VolGroup01
Parse error at line 1: unexpected token
Couldn't read volume group metadata.
Restore failed.

Desperately trying to get the data off an old dual PV LVM and cant.
Reply With Quote
  #3  
Old 25th January 2007, 01:03 AM
nick.stumpos's Avatar
nick.stumpos Offline
Registered User
 
Join Date: Feb 2005
Location: Lansing, Mi
Age: 28
Posts: 2,222
what does you /etc/lvm/backup/VolGroup01 look like?
__________________
As always
Love, Life, Loyalty, Wisdom, Knowledge, And Understanding
FC6: Common Questions answered
Reply With Quote
  #4  
Old 30th June 2007, 01:34 AM
sjnesbitt Offline
Registered User
 
Join Date: Jun 2007
Posts: 1
accessing an LVM from another drive

Hi I accidently damaged the /lib directory on my boot lvm

I created a new drive, then physically mounted the two drives in the same system.

I see the two PV0 and PV0. VolGroup00 and VolGroup00.

I have utilized the advice here and edited the tmp file and produced this:

# Generated by LVM2: Fri Jun 29 18:24:28 2007

contents = "Text Format Volume Group"
version = 1

description = "Created *after* executing 'vgs'"

creation_host = "localhost.localdomain" # Linux localhost.localdomain 2.6.18-1.2798.fc6 #1 SMP Mon Oct 16 14:54:20 EDT 2006 i686
creation_time = 1183141468 # Fri Jun 29 18:24:28 2007

VolGroup03 {
id = "M7IyXr-61kh-Tljc-2JOJ-P7gi-hbW4-bAZHSg"
seqno = 2
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536
max_lv = 0
max_pv = 0

physical_volumes {

pv0 {
id = "bG78ru-WRXc-V9E2-wWqI-3zjh-yN2r-cFSnnx"
device = "/dev/sdb2"

status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 1188
}
}

logical_volumes {

LogVol03 {
id = "9p3k89-KcAy-yRxb-w3vC-SoJ0-0mrq-fM08eR"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 1125

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}

when I run : }
}

logical_volumes {

LogVol03 {
id = "9p3k89-KcAy-yRxb-w3vC-SoJ0-0mrq-fM08eR"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 1125

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}

}
}

logical_volumes {

LogVol03 {
id = "9p3k89-KcAy-yRxb-w3vC-SoJ0-0mrq-fM08eR"
status = ["READ", "WRITE", "VISIBLE"]
segment_count = 1

segment1 {
start_extent = 0
extent_count = 1125

type = "striped"
stripe_count = 1 # linear

stripes = [
"pv0", 0
]
}
}

When I run: vgcfgrestore VolGroup03

I get the following error:
Parse error at line 4: unexpected token
Couldn't read volume group metadata.
Restore failed.


I have checked the file multiple times any help would be appreciated.
Reply With Quote
  #5  
Old 23rd November 2007, 12:10 PM
Learner Driver Offline
Registered User
 
Join Date: Nov 2006
Location: Perth Western Australia
Posts: 53
Nickisgod1 or anyone who can assist a newstart

Learner Driver here I got the gist of your post but got lost in the command line stuff

I have detailed below sort of related saga about my problem, my inexperience any chance someone could help??

I have FC5 it lives on my Asus laptop.

The system is dual boot MS / Fedora.

I know very little about the FC5 OS.

I am learning but limited to use of the GUI with the exception of some tentative experimentation with command line.

I recently used test Disk / Photo Rec to recover images from an I-pod connected to my laptop.

Recovered files -- Recup/dir files were saved to my root folder.

The laptop started getting very slow.

I stopped recovery from the I-pod and shut down laptop with the intent of recommencing the process at a later time.

I can no longer boot into a GUI

many attempts to reboot – reboot fails error messages (multiple) in start up and in a secondary command screen which indicates system could not write line 29 insufficient memory, cannot start XMS server etc.

My Objective is to regain the ability to boot into GUI again (like before)

Questions
Am I correct in understanding all available memory has been used resulting in insufficient system memory for booting into the gui?

Question
If so - is mounting my laptop hard drive from another PC running FC5 and deleting or transferring non OS data (photos) etc from the laptop hard drive to create space on the drive (hopefully allowing boot into GUI) an option.

Question
If so how do I do this?

My attempts id and read drives connected to my FC5 pc so as to transfer or delete files from the laptop HDD have failed for two reasons
1. I cannot see the laptop HDD -- just the PC Hdd & partitions
2. Some occasions I can see lots of drives but cannot differentiate or access some from the pc

Any assistance greatly appreciated
Reply With Quote
Reply

Tags
group, logical, mount, volume

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Extended Logical volume not seen on mount exH2 Using Fedora 2 23rd July 2008 05:31 PM
Reducing size of Logical Volume Group that fills an entire disk hedgert Using Fedora 3 17th November 2007 02:02 PM
Howto mount a logical volume (LVM) tbox Guides & Solutions (No Questions) 2 7th September 2007 08:29 PM
How to Resize a Logical Volume Group? BadMofo666 Using Fedora 3 12th July 2007 10:06 AM
LVM Logical Volume won't auto-mount r0dzilla Servers & Networking 4 24th October 2006 07:51 PM


Current GMT-time: 21:18 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat