Re: Cannot mount old drive with LVM partition - help!
- From: noi <noi@xxxxxxxx>
- Date: Wed, 04 Oct 2006 07:06:34 GMT
On Wed, 04 Oct 2006 01:13:46 +0000, Ohmster wrote this:
"J.O. Aho" <user@xxxxxxxxxxx> wrote inI was hoping knoppix would have read the hdb2.
news:4oe6heFe14qbU1@xxxxxxxxxxxxxx:
deactivating the LVM won't in a magical way change the slice data
//Aho
Dam! :(
Don't get hasty if you're unsure. If FC3 is really not a critical as in
home system vs work system you can take your time and carefully recover
your data.
Before Webmin this was a simple change ie,
$ vmchange -an # disables all lvm
$ vmrename volgroup00 volgroup01
$ vmchange -ay
Basically rename the volgroup00 (on hda) to volgroup01 or whatever so hdb
would be volgroup00. Then change the volgroup name as often as necessary.
Now it's unknown what you actually have but I think your hdb is still
under LVM. Some LVM prints might help etc.
$ vgscan
$ pvdisplay
$ pvscan
$ fdisk -l on hda and hdb
Found an article (snippet below) on recovering RAID and LVM volumes. It's
not for the faint hearted. Plz read the recovering Lvm2 volume part of article (and displays) entirely.
BTW /dev/md2 is raid drive so I'd think you'd substitute /dev/hdb.
----- http://www.linuxjournal.com/article/8874
Recovering and Renaming the LVM2 Volume
The next hurdle is that the system now will have two sets of lvm2 disks
with VolGroup00 in them. Typically, the vgchange -a -y command would allow
LVM2 to recognize a new volume group. That won't work if devices
containing identical volume group names are present, though. Issuing
vgchange -a y will report that VolGroup00 is inconsistent, and the
VolGroup00 on the RAID device will be invisible. To fix this, you need to
rename the volume group that you are about to mount on the system by
hand-editing its lvm configuration file.
If you made a backup of the files in /etc on raidbox, you can edit a copy
of the file /etc/lvm/backup/VolGroup00, so that it reads VolGroup01 or
RestoreVG or whatever you want it to be named on the system you are going
to restore under, making sure to edit the file itself to rename the volume
group in the file.
If you don't have a backup, you can re-create the equivalent of an LVM2
backup file by examining the LVM2 header on the disk and editing out the
binary stuff. LVM2 typically keeps copies of the metadata configuration at
the beginning of the disk, in the first 255 sectors following the
partition table in sector 1 of the disk. See /etc/lvm/lvm.conf and man
lvm.conf for more details. Because each disk sector is typically 512
bytes, reading this area will yield a 128KB file. LVM2 may have stored
several different text representations of the LVM2 configuration stored on
the partition itself in the first 128KB. Extract these to an ordinary file
as follows, then edit the file:
dd if=/dev/md2 bs=512 count=255 skip=1 of=/tmp/md2-raw-start
vi /tmp/md2-raw-start
You will see some binary gibberish, but look for the bits of plain text.
LVM treats this metadata area as a ring buffer, so there may be multiple
configuration entries on the disk. On my disk, the first entry had only
the details for the physical volume and volume group, and the next entry
had the logical volume information. Look for the block of text with the
most recent timestamp, and edit out everything except the block of plain
text that contains LVM declarations. This has the volume group
declarations that include logical volumes information. Fix up physical
device declarations if needed. If in doubt, look at the existing
/etc/lvm/backup/VolGroup00 file to see what is there. On disk, the text
entries are not as nicely formatted and are in a different order than in
the normal backup file, but they will do. Save the trimmed configuration
as VolGroup01. This file should then look like Listing 6.
.
- Follow-Ups:
- References:
- Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Re: Cannot mount old drive with LVM partition - help!
- From: noi
- Re: Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Re: Cannot mount old drive with LVM partition - help!
- From: J.O. Aho
- Re: Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Re: Cannot mount old drive with LVM partition - help!
- From: J.O. Aho
- Re: Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Re: Cannot mount old drive with LVM partition - help!
- From: Bit Twister
- Re: Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Re: Cannot mount old drive with LVM partition - help!
- From: noi
- Re: Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Re: Cannot mount old drive with LVM partition - help!
- From: J.O. Aho
- Re: Cannot mount old drive with LVM partition - help!
- From: noi
- Re: Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Re: Cannot mount old drive with LVM partition - help!
- From: noi
- Re: Cannot mount old drive with LVM partition - help!
- From: J.O. Aho
- Re: Cannot mount old drive with LVM partition - help!
- From: noi
- Re: Cannot mount old drive with LVM partition - help!
- From: J.O. Aho
- Re: Cannot mount old drive with LVM partition - help!
- From: Ohmster
- Cannot mount old drive with LVM partition - help!
- Prev by Date: Re: what's the best distro for a begginer ??
- Next by Date: Re: what's the best distro for a begginer ??
- Previous by thread: Re: Cannot mount old drive with LVM partition - help!
- Next by thread: Re: Cannot mount old drive with LVM partition - help!
- Index(es):
Relevant Pages
|
|