Discussion:
Cannot mount old drive with LVM partition - help!
(too old to reply)
Ohmster
2006-10-01 04:10:59 UTC
Permalink
System: Fedora Core 5

Hello everybody. I finally got my new 200Gb IDE hard drive so that I
could install FC5 instead of the FC3 that I am now running. I have been
waiting to get a new drive to install FC5 on because I do not want to
lose everything that I have setup on the exsisiting FC3 setup. My plan is
to install FC5 on the new drive, then connect the old drive back to the
computer as hdb, mount my old drive, and be able to pull my old configs
from it to help setup the new FC5 system. This seems like a terrific
plan...

Now the problem. I created the directory /mnt/old_sys and fdisk shows me
that hdb2 is indeed the old system drive...
---------------------------------------------------------------------
[***@ohmster xinetd.d]# fdisk /dev/hdb

The number of cylinders for this disk is set to 24792.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM

Command (m for help):
---------------------------------------------------------------------
But no matter what I do, I cannot get this drive to mount. I found a web
page that shows how to mount an LVM volume but it does not work for me,
the page is here:
http://tinyurl.com/nralu

When I do a lvdisplay, I get information alright, but it is all for the
currently mounted and running LVM partition, there is no info for the
/dev/hdb2 partition for me to mount that drive with.

I am really screwed here, I must have access to that drive to finish
setting up the new system. I have it setup with cable select on the hard
drives and so the new FC5 drive is /dev/hda and the old system drive is
/dev/hdb. Right now, I have taken the IDE cable off of the new drive and
put it back on the old drive so that the computer will run as it has
before with an FC3 system.

Sombody please help, how can I mount my old system drive with all of the
stuff on it as an LVM partion in Fedora Core 5?
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
J.O. Aho
2006-10-01 06:07:02 UTC
Permalink
Post by Ohmster
System: Fedora Core 5
Hello everybody. I finally got my new 200Gb IDE hard drive so that I
could install FC5 instead of the FC3 that I am now running. I have been
waiting to get a new drive to install FC5 on because I do not want to
lose everything that I have setup on the exsisiting FC3 setup. My plan is
to install FC5 on the new drive, then connect the old drive back to the
computer as hdb, mount my old drive, and be able to pull my old configs
from it to help setup the new FC5 system. This seems like a terrific
plan...
Now the problem. I created the directory /mnt/old_sys and fdisk shows me
that hdb2 is indeed the old system drive...
---------------------------------------------------------------------
The number of cylinders for this disk is set to 24792.
There is nothing wrong with that, but this is larger than 1024,
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM
---------------------------------------------------------------------
But no matter what I do, I cannot get this drive to mount. I found a web
page that shows how to mount an LVM volume but it does not work for me,
http://tinyurl.com/nralu
When I do a lvdisplay, I get information alright, but it is all for the
currently mounted and running LVM partition, there is no info for the
/dev/hdb2 partition for me to mount that drive with.
I am really screwed here, I must have access to that drive to finish
setting up the new system. I have it setup with cable select on the hard
drives and so the new FC5 drive is /dev/hda and the old system drive is
/dev/hdb. Right now, I have taken the IDE cable off of the new drive and
put it back on the old drive so that the computer will run as it has
before with an FC3 system.
Sombody please help, how can I mount my old system drive with all of the
stuff on it as an LVM partion in Fedora Core 5?
When you bott into FC3, do a df, then you should see the device name of the
LVM you are using.

# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/lvmroot 507855728 473585604 34270124 94% /
/dev/hda1 93327 6682 81826 8% /boot

In this example it's /dev/mapper/lvmroot, this is the device you have to use
and not /dev/hdb2 when you boot into FC5 and have the FC3 drive as a hdb.

If you don't get that device when you booted into FC5, then the problem is
that the LVM hasn't been activated during bootup, then take a look at this
page: http://tldp.org/HOWTO/LVM-HOWTO/activatevgs.html
(you can run vgdisplay without any options when you boot into FC3 and get the
name of the volume group, "VG Name mylvms", then in FC5 run
"vgchange -a y mylvms").


But I don't see the point why you have been using LVM on a lone harddrive, you
don't gain anything by that, the gains are when you LVM togehter more
harddrives or split up a harddrive into many smaller LVMs (then you easier can
move space to the slice you need it at).


//Aho
Ohmster
2006-10-01 16:09:39 UTC
Permalink
Post by J.O. Aho
When you bott into FC3, do a df, then you should see the device name
of the LVM you are using.
---------------------------------------------------------------------
FC3 Only

[***@ohmster ~]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
193877500 39009672 145019408 22% /
/dev/hda1 101086 29651 66216 31% /boot
none 777868 0 777868 0% /dev/shm
[***@ohmster ~]$
---------------------------------------------------------------------
FC5 - With old FC3 as /dev/hdb present on system

[***@ohmster ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
187117284 4262884 173196032 3% /
/dev/hda1 101086 14122 81745 15% /boot
tmpfs 777820 0 777820 0% /dev/shm
[***@ohmster ~]#
---------------------------------------------------------------------

The problem is that they both have the same name! That is the default
Fedora installation. In FC5, /dev/mapper only shows the current volume
group, the old one on hdb does not even show up.
Post by J.O. Aho
In this example it's /dev/mapper/lvmroot, this is the device you have
to use and not /dev/hdb2 when you boot into FC5 and have the FC3 drive
as a hdb.
If you don't get that device when you booted into FC5, then the
problem is that the LVM hasn't been activated during bootup, then take
a look at this page: http://tldp.org/HOWTO/LVM-HOWTO/activatevgs.html
(you can run vgdisplay without any options when you boot into FC3 and
get the name of the volume group, "VG Name mylvms", then
in FC5 run "vgchange -a y mylvms").
--------------------------------------------------------------------
[***@ohmster ~]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 189.81 GB
PE Size 32.00 MB
Total PE 6074
Alloc PE / Size 6073 / 189.78 GB
Free PE / Size 1 / 32.00 MB
VG UUID 3agBFX-D3N0-Bp3c-I7se-JVLY-ZIIa-fqMcIF

[***@ohmster ~]#
--------------------------------------------------------------------

That is FC3. So then:

# vgchange -a y my_volume_group

Would become

# vgchange -a y VolGroup00

I cannot do that because that is the name of the current volume group
that FC5 has chosen for the system. So there are two VolGroup00
partitions, one is the current and active FC5 partition and the other one
is the old /dev/hdb volume group. :(

How can I get that old drive to mount?
Post by J.O. Aho
But I don't see the point why you have been using LVM on a lone
harddrive, you don't gain anything by that, the gains are when you LVM
togehter more harddrives or split up a harddrive into many smaller
LVMs (then you easier can move space to the slice you need it at).
Agreed. That is the default Fedora installation style now. It does not
seem to have any benefits over just a regular ext2 or ext3 partition and
why the hell I am stuck in VG hell is beyond me now. This reminds me of
the old days when DOS 6 and Win 3.1 ruled, when RAM and hard disk space
were at super premium prices, and Windows offered "doublespace" as a way
to stretch your hard drive dollar. Yeah I converted to doublespace, only
to find out that now my hard drive was one, super big file. And then I
had a teeny, tiny disk error, no big deal otherwise, but because it was a
single doublspace drive, the entire hard drive was ruined. No more
doublespace for me!

What now Batman, how can I get at my old FC3 drive while booted into FC5?
Post by J.O. Aho
//Aho
Thanks Aho.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
J.O. Aho
2006-10-01 16:58:02 UTC
Permalink
Post by Ohmster
When you boot into FC3, do a df, then you should see the device name
of the LVM you are using.
---------------------------------------------------------------------
FC3 Only
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
193877500 39009672 145019408 22% /
/dev/hda1 101086 29651 66216 31% /boot
none 777868 0 777868 0% /dev/shm
---------------------------------------------------------------------
FC5 - With old FC3 as /dev/hdb present on system
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
187117284 4262884 173196032 3% /
/dev/hda1 101086 14122 81745 15% /boot
tmpfs 777820 0 777820 0% /dev/shm
---------------------------------------------------------------------
As they have the same name, you will run into trouble all the time, you need
to rename one of them, in your case I would pick the FC3, think you need to
boot into it, or even better disconnect hda and boot with the FC5 CD1 into
rescue mode and

umount /dev/mapper/VolGroup00-LogVol00
lvrename /dev/mapper/VolGroup00-LogVol00 /dev/mapper/VolGroup00-LogVol01

turn off your computer and then hook back your hda and boot, and then you
should be able to mount the old FC3 with

mount /dev/mapper/VolGroup00-LogVol01 /mnt/old_system


In case that just switch the logical volume name don't help, then read the man
page for vgrename too (man vgrename) and switch the name of the volume group too.


another option is to reinstall FC5 (destroy the slices on it before from FC3),
hook the new harddrive as hda and the old one as hdb, in the partition tool
see to not include anything of hdb to the new install (DON'T LET FEDORA
AUTOMATICALLY SLICE YOUR HARD DRIVERS). This should fix the name conflict too.
Post by Ohmster
The problem is that they both have the same name! That is the default
Fedora installation.
Seems RedHat got even more crazy since I quite using their products. You can
always select manually to use standard slices instead of LVM, at least if you
choose to use fdisk.


//Aho
Ohmster
2006-10-01 17:54:51 UTC
Permalink
Post by J.O. Aho
As they have the same name, you will run into trouble all the time,
you need to rename one of them, in your case I would pick the FC3,
think you need to boot into it, or even better disconnect hda and boot
with the FC5 CD1 into rescue mode and
Oh gosh, if anything happens to the old FC3 disk, I would be really
screwed. I would much rather try to rename the current volume group
because if anything goes wrong, it is no big deal at this point. I will
try it with the FC3 disk disconnected so that nothing can happen to it
and see if the new FC5 system throws a fit about having it's volume group
renamed. You are probably right though, it would be better to rename the
old volume so as not to upset the system, but there is too much at risk
to try that for me.

I really don't think that this is going to work though because the
original disk, /dev/hdb, is not mounted or accessed by the system at this
point. I don't think that /dev/mapper will even see it in order to map
it, renamed or otherwise. This is a real problem. In order for me to
mount the old FC3 system, it would have to show up in /dev/mapper and if
it does not, then there is nothing to mount. Right now, the only thing
that shows up in /dev/mapper is the current LVM.

Please look at this thread, near the bottom:
http://tinyurl.com/nralu

What sucks is that the OP did not post what eventually happened with his
system, if he got it working or not. What do you think Aho?
Post by J.O. Aho
umount /dev/mapper/VolGroup00-LogVol00
lvrename /dev/mapper/VolGroup00-LogVol00
/dev/mapper/VolGroup00-LogVol01
turn off your computer and then hook back your hda and boot, and then
you should be able to mount the old FC3 with
mount /dev/mapper/VolGroup00-LogVol01 /mnt/old_system
In case that just switch the logical volume name don't help, then read
the man page for vgrename too (man vgrename) and switch the name of
the volume group too.
another option is to reinstall FC5 (destroy the slices on it before
from FC3), hook the new harddrive as hda and the old one as hdb, in
the partition tool see to not include anything of hdb to the new
install (DON'T LET FEDORA AUTOMATICALLY SLICE YOUR HARD DRIVERS). This
should fix the name conflict too.
Post by Ohmster
The problem is that they both have the same name! That is the default
Fedora installation.
Seems RedHat got even more crazy since I quite using their products.
You can always select manually to use standard slices instead of LVM,
at least if you choose to use fdisk.
There may have been advanced options, I just stuck with default to make
it easier and have always had good luck with Fedora installs using
defaults. I tell ya what though, I am so mad that I could just spit! What
in the hell are we using LVM for on a single hard disk? Like you said, it
would be good to span several small disks or stripe a couple of large
ones but to use LVM on a single 200Gb hard drive really makes no sense. I
am so pisssed off now.
Post by J.O. Aho
//Aho
Thanks for sticking with me Aho.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
J.O. Aho
2006-10-01 18:25:41 UTC
Permalink
Post by Ohmster
Post by J.O. Aho
As they have the same name, you will run into trouble all the time,
you need to rename one of them, in your case I would pick the FC3,
think you need to boot into it, or even better disconnect hda and boot
with the FC5 CD1 into rescue mode and
Oh gosh, if anything happens to the old FC3 disk, I would be really
screwed.
Okey, was just assuming that the FC5 had become the more important one, then
just disconnect the hdb.
Post by Ohmster
I really don't think that this is going to work though because the
original disk, /dev/hdb, is not mounted or accessed by the system at this
point. I don't think that /dev/mapper will even see it in order to map
it, renamed or otherwise.
If you have two with the same name, then which one be used are usually selecte
by which device it is, the "lower" the device is the higher chance it has to
be used, eg /dev/hda will be used before /dev/hdb which would be before
/dev/hdc and so on.
Post by Ohmster
This is a real problem. In order for me to
mount the old FC3 system, it would have to show up in /dev/mapper and if
it does not, then there is nothing to mount. Right now, the only thing
that shows up in /dev/mapper is the current LVM.
Thats why I did suggest you to disconnect your hda, that way you will have the
LVM from FC3 visible. As you don't have the hdb connected at the moment, just
take your FC5 CD1/DVD and boot into rescue mode, unmount
/dev/mapper/VolGroup00-LogVol00 before you rename it. When finished, just turn
off the computer, connect the hdb (don't disconnect the hda) and boot up, now
you should have both LVMs, I'm not sure if you will have FC3 or FC5 as Fedora
uses disk lables, you can easily check that with "cat /proc/version".
Post by Ohmster
http://tinyurl.com/nralu
What sucks is that the OP did not post what eventually happened with his
system, if he got it working or not. What do you think Aho?
It's difficult to know if he did try to rename volume group or not, but he
should have got it working. It can be an advantage to rename the group instead
of the logical volume, but the process is the same, to keep on the safe side.
Post by Ohmster
Post by J.O. Aho
Post by Ohmster
The problem is that they both have the same name! That is the default
Fedora installation.
Seems RedHat got even more crazy since I quite using their products.
You can always select manually to use standard slices instead of LVM,
at least if you choose to use fdisk.
There may have been advanced options, I just stuck with default to make
it easier and have always had good luck with Fedora installs using
defaults. I tell ya what though, I am so mad that I could just spit! What
in the hell are we using LVM for on a single hard disk? Like you said, it
would be good to span several small disks or stripe a couple of large
ones but to use LVM on a single 200Gb hard drive really makes no sense. I
am so pisssed off now.
*nods*
Myself I have LVM only on my /home slice, the rest are standard slices, as the
fileserver don't need a lot of extra applications, I don't worry about running
out of space on the other slices, while the /home I do enlarge when I need
more space for my users (I'm not a single user on my home network).

I think it's easier to move manually a system to a new hard drive than
fiddling with LVM, so I wouldn't choose to use LVM for my root.



//Aho
noi
2006-10-01 09:20:09 UTC
Permalink
Post by Ohmster
System: Fedora Core 5
Hello everybody. I finally got my new 200Gb IDE hard drive so that I could
install FC5 instead of the FC3 that I am now running. I have been waiting
to get a new drive to install FC5 on because I do not want to lose
everything that I have setup on the exsisiting FC3 setup. My plan is to
install FC5 on the new drive, then connect the old drive back to the
computer as hdb, mount my old drive, and be able to pull my old configs
from it to help setup the new FC5 system. This seems like a terrific
plan...
Now the problem. I created the directory /mnt/old_sys and fdisk shows me
that hdb2 is indeed the old system drive...
---------------------------------------------------------------------
The number of cylinders for this disk is set to 24792. There is nothing
wrong with that, but this is larger than 1024, and could in certain setups
cause problems with: 1) software that runs at boot time (e.g., old
versions of LILO) 2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /dev/hdb: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track,
24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux /dev/hdb2
14 24792 199037317+ 8e Linux LVM
--------------------------------------------------------------------- But
no matter what I do, I cannot get this drive to mount. I found a web page
that shows how to mount an LVM volume but it does not work for me, the
http://tinyurl.com/nralu
When I do a lvdisplay, I get information alright, but it is all for the
currently mounted and running LVM partition, there is no info for the
/dev/hdb2 partition for me to mount that drive with.
I am really screwed here, I must have access to that drive to finish
setting up the new system. I have it setup with cable select on the hard
drives and so the new FC5 drive is /dev/hda and the old system drive is
/dev/hdb. Right now, I have taken the IDE cable off of the new drive and
put it back on the old drive so that the computer will run as it has
before with an FC3 system.
Sombody please help, how can I mount my old system drive with all of the
stuff on it as an LVM partion in Fedora Core 5?
Hard time following what you've done. All I see is one 200GB HD
/dev/hdb1 as a FC5 LVM Are you mount /dev/hda as you old drive are you
adding /dev/hdb to the LVM volume group? Have you reviewed the command
set for LVM and FAQs at FC5 or LVM web sites?

Could post lvdisplay, pvdisplay, fdisk -l /dev/hda and /dev/hdb ?
Ohmster
2006-10-01 15:39:55 UTC
Permalink
Post by noi
Hard time following what you've done. All I see is one 200GB HD
/dev/hdb1 as a FC5 LVM Are you mount /dev/hda as you old drive are you
adding /dev/hdb to the LVM volume group? Have you reviewed the command
set for LVM and FAQs at FC5 or LVM web sites?
I want to mount /dev/hdb2, that is where the LVM is located, containing
my original FC3 installation. That is what I am unable to do. /dev/hda is
the current FC5 installation, is active, and is visible.

Well, I am learning about LVMs now. That was the default Fedora install,
I don't remember being asked if I wanted LVM or not. I just installed FC5
and took the default install and ended up with an LVM again. I think that
a serious problem is that both LVM volumes have the same name. I really
don't understand this stuff enough to get the volume mounted though.
Post by noi
Could post lvdisplay, pvdisplay, fdisk -l /dev/hda and /dev/hdb ?
Sure. It is a bit difficult now as the new setup is not complete. I don't
have the domains setup, ssh is not setup, samba is not working yet, etc.,
so I think I can run those commands and catch the output, email that to
myself, then post them for you here. AT least I got my desktop terminals
back. FC5 does not even offer term windows in x anymore by default and I
went back to booting to run level 3 instead of run level 5 and starting x
with startx.
---------------------------------------------------------------------
***@ohmster ~]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID AEkIRn-4p4I-pjo1-OI8I-GPGx-RUzf-K7iI9G
LV Write Access read/write
LV Status available
# open 1
LV Size 184.22 GB
Current LE 5895
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID ghCyjf-gFRp-qN2Z-QyBc-eEl3-TAO0-ReRTnz
LV Write Access read/write
LV Status available
# open 1
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1

[***@ohmster ~]#
---------------------------------------------------------------------
[***@ohmster ~]# pvdisplay
--- Physical volume ---
PV Name /dev/hda2
VG Name VolGroup00
PV Size 186.19 GB / not usable 0
Allocatable yes
PE Size (KByte) 32768
Total PE 5958
Free PE 1
Allocated PE 5957
PV UUID 85v0Vl-MK33-Kbhl-mW22-kBhT-Uv6B-967SbT

[***@ohmster ~]#
---------------------------------------------------------------------
[***@ohmster ~]# fdisk -l /dev/hda

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 24321 195254010 8e Linux LVM
[***@ohmster ~]#
---------------------------------------------------------------------
[***@ohmster ~]# fdisk -l /dev/hdb

Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM
[***@ohmster ~]#
---------------------------------------------------------------------
This is freaking me out man. I really need to get the servers up and
running and all the rest of the stuff that is on the old FC3 disk drive.
All the configs are there and the old system will boot and run again if I
pull the IDE cable from the new drive and plug it back to the old drive
as first in line (Cable select method.). There has got to be some way to
mount that old system, I was googling and reading and someone else had
this problem and they figured that they could not mount the partition
because the volume group had the same name as the current volume group.
That is the situation that I have because I went with the default Fedora
install.

In x, there is an admin tool for Logical Volume Managment. It is
graphical and it shows my current volume groups as well as "Uninitialized
Entries". /dev/hdb1 and /dev/hdb2 are shown. The only thing that the
application will do for me is to "Initialize the Entry". If I try to do
that, I get a warning that "All data on disk entry /dev/hdb2 will be
lost, continue?" Hell no!

Please help me with this.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
J.O. Aho
2006-10-01 15:49:41 UTC
Permalink
Post by noi
Post by noi
Hard time following what you've done. All I see is one 200GB HD
/dev/hdb1 as a FC5 LVM Are you mount /dev/hda as you old drive are
you
Post by noi
adding /dev/hdb to the LVM volume group? Have you reviewed the
command
Post by noi
set for LVM and FAQs at FC5 or LVM web sites?
I want to mount /dev/hdb2, that is where the LVM is located, containing
my original FC3 installation. That is what I am unable to do. /dev/hda is
the current FC5 installation, is active, and is visible.
As I already have pointed out, you don't mount the /dev/hdb2

mount /dev/VolGroup00/LogVol00 /mnt/old_system

See to create the /mnt/old_system or mount it to some other location.



//Aho
Ohmster
2006-10-01 17:28:16 UTC
Permalink
Subject: Re: Cannot mount old drive with LVM partition - help!
Newsgroups: Aioe.org NNTP server:alt.os.linux
Post by J.O. Aho
As I already have pointed out, you don't mount the /dev/hdb2
mount /dev/VolGroup00/LogVol00 /mnt/old_system
See to create the /mnt/old_system or mount it to some other location.
//Aho
..sigh. Aho, I cannot mount /dev/VolGroup00/LogVol00 because it does not
exist, or at least it does exist, for the current setup of FC5. There are
no other /dev entries for volume groups, other than /dev/VolGroup00.
Maybe
if one of them had a different name, like /dev/VolGroup20 or something,
but
they both have the same name. I think that I have to rename one of the
volume groups somehow in order to be able to get them both mounted, does
that make sense?

The old FC3 volume group is priceless and cannot be destroyed, that is
where all my data is. The new FC5 volume group I don't care about as it
was
just installed and nothing of relevance has been done with it. If I have
to
format and reinstall FC5, it is no big deal, but I cannot lose the old
FC3
data. Oh there was a web page somewhere where they were talking about
this,
let me see if I can find it for you.

Yeah here it is...
http://www.linuxformat.co.uk/modules.php?op=modload&name=PNphpBB2
&file=viewtopic&t=1276

Or
http://tinyurl.com/nralu

Look all the way at the bottom. The dude is saying that because both of
the logical volume groups have the same name, it would be impossible to
mount them both. When I try his suggestion:

vgscan
vgchange --available y

It does not help, it only shows the current LVM groups as they are.

I am at a loss as to what to do. I really wish that I did not install
Fedora as an LVM now because of all this trouble.

Somebody please help.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Post by J.O. Aho
As I already have pointed out, you don't mount the /dev/hdb2
mount /dev/VolGroup00/LogVol00 /mnt/old_system
See to create the /mnt/old_system or mount it to some other location.
//Aho
..sigh. Aho, I cannot mount /dev/VolGroup00/LogVol00 because it does not
exist, or at least it does exist, for the current setup of FC5. There are
no other /dev entries for volume groups, other than /dev/VolGroup00.
Maybe if one of them had a different name, like /dev/VolGroup20 or
something, but they both have the same name. I think that I have to
rename one of the volume groups somehow in order to be able to get them
both mounted, does that make sense?

The old FC3 volume group is priceless and cannot be destroyed, that is
where all my data is. The new FC5 volume group I don't care about as it
was just installed and nothing of relevance has been done with it. If I
have to format and reinstall FC5, it is no big deal, but I cannot lose
the old FC3 data. Oh there was a web page somewhere where they were
talking about this, let me see if I can find it for you.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
J.O. Aho
2006-10-01 18:29:15 UTC
Permalink
Post by Ohmster
Look all the way at the bottom. The dude is saying that because both of
the logical volume groups have the same name, it would be impossible to
vgscan
vgchange --available y
It does not help, it only shows the current LVM groups as they are.
Of course it don't, as they have the same name and in worst case you could
rename both of the at the same time too.
Post by Ohmster
I am at a loss as to what to do. I really wish that I did not install
Fedora as an LVM now because of all this trouble.
You need to have only one of them connected to the machine (FC5 in your case)
and from rescue mode (type rescue on the boot prompt when you boot from the
CD1 or DVD) do the renaming.


//Aho
Ohmster
2006-10-01 20:08:39 UTC
Permalink
"J.O. Aho" <***@example.net> wrote in news:***@individual.net:


Arrrrgggghhhhh! This bites major freaking dickwad like no tomorrow! I had
intended to get the FC5 distro installed this weekend and then copy my
configs from FC3 over and now the whole weekend is shot, just trying to
mount the freaking FC3 disk. Can this blow any worse?!

Okay I am done now, had to get that off my chest. :)
Post by J.O. Aho
Of course it don't, as they have the same name and in worst case you
could rename both of the at the same time too.
Post by Ohmster
I am at a loss as to what to do. I really wish that I did not install
Fedora as an LVM now because of all this trouble.
You need to have only one of them connected to the machine (FC5 in
your case) and from rescue mode (type rescue on the boot prompt when
you boot from the CD1 or DVD) do the renaming.
More problems and here is is. Fedora Core 5 comes with a neat rescue
disc. Insert it and boot, you are in rescue mode. The disc will offer to
get your network up and running and it does if you choose to do so. You
are asked if you want a US keyboard, yes. Then you are asked if you would
like the rescue disc to find your fedora install and mount it under
/mnt/sysimage or to just skip this step.

Of course you cannot change a volume group's name with it mounted so I
said no, don't mount it. I get a basic rescue shell. Any vg commands are
not recognized, vgscan, not recognized command. If I allow the distro to
be mounted, it will mount and then vg commands are recognized, but you
cannot change a volume group name with it mounted. I try to umount it and
cannot do so, device is busy.

fdisk in either case will show both LVMs on each disk, /dev/hda or
/dev/hdb

I am so mad I could just spit! FC5 is pretty nice and I like it, other
than it recognized my AWE 64 Gold ISA sound card only once and then never
again. Now no sound in FC5. I can probably fix this but for now this is
not a major issue.

So I am really stuck like chuck. vgscan sees only one of the volume
groups, the currently active one, presumably because they both have the
same exact name. fdisk will show both of them. It does not seem like I
can do anything about this. No way to rename any volume group because
there are no lvm tools available in rescue mode unless I allow mounting
of the exisiting system. If I do that, I can no longer rename or do
anything with it. The rescue shell that comes with FC-5-i386-rescuecd.iso
contains no vg tools. WTF, this is starting to bite the big one pretty
badly.

There are only a few hours left in the weekend, what to do now. Unplug
the FC3 disk, reinstall FC5 on the new disk and look for an option that
will not install LVM? That seems to be the only way now from what I can
see. Maybe then I will be able to mount the FC3 disk because there will
only be one LVM disk and so the same name thing should not be an issue. I
hope so, somebody answer soon while I have a little more time left for
the weekend.
Post by J.O. Aho
//Aho
Thanks for the help.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Bit Twister
2006-10-01 20:42:47 UTC
Permalink
Post by Ohmster
There are only a few hours left in the weekend, what to do now. Unplug
the FC3 disk, reinstall FC5 on the new disk and look for an option that
will not install LVM?
I picked custom or manual or some such option when I installed fc5 on
my multi-boot system. That allowd me to make partitions for fc5. I
picked ext3 for new partition creation and created mount points for
the others.

grep LABEL etc/fstab
LABEL=/fc5 / ext3 defaults 1 1
LABEL=/2006 /2006 ext3 defaults 1 2
LABEL=/2006oe /2006oe ext3 defaults 1 2
LABEL=/accounts /accounts ext3 defaults 1 2
LABEL=/kubuntu /kubuntu ext3 defaults 1 2
LABEL=/free_9b /free_9b ext3 defaults 1 2
LABEL=/local/opt /local/opt ext3 defaults 1 2
LABEL=/site /site ext3 defaults 1 2
LABEL=/tmp /tmp ext3 defaults 1 2
LABEL=/ubuntu /ubuntu ext3 defaults 1 2
Ohmster
2006-10-01 21:03:51 UTC
Permalink
Post by Bit Twister
I picked custom or manual or some such option when I installed fc5 on
my multi-boot system. That allowd me to make partitions for fc5. I
picked ext3 for new partition creation and created mount points for
the others.
grep LABEL etc/fstab
LABEL=/fc5 / ext3 defaults
1 1 LABEL=/2006 /2006 ext3 defaults
1 2 LABEL=/2006oe /2006oe ext3
defaults 1 2 LABEL=/accounts /accounts
ext3 defaults 1 2 LABEL=/kubuntu /kubuntu
ext3 defaults 1 2 LABEL=/free_9b /free_9b
ext3 defaults 1 2 LABEL=/local/opt
/local/opt ext3 defaults 1 2 LABEL=/site
/site ext3 defaults 1 2 LABEL=/tmp
/tmp ext3 defaults 1 2
LABEL=/ubuntu /ubuntu ext3 defaults
1 2
That's good to know bit. I think that the worst of the worst has
happened. I was looking at logical volume groups in webmin and tried to
make a new one, from my /dev/hdb2 partition. I started the process and
noticed at the bottome "all data will be lost" and quickly stopped the
process.

I then halted the system, connected my FC3 drive, booted, and kept my
fingers crossed. Kernel panic. No linux partions found. I can see with
fdisk -l /dev/hdb that the partitions are still there, and partition 2 is
an lvm volume, but how to access it now. That was all my stuff,
everything that I had saved! <sob!>

Looks like I am commited now to FC5 and have no choice but to move ahead.
I did try to rename the FC3 lvm to VolGroup01 instead of VolGroup00 like
it was and got a device busy result. Now when I go back into webmin and
check logical volume managment, I can see two volume groups, 00 and 01
and 01 is on /dev/hdb2, my old FC3 install! I see that there is one
physical volume present, /dev/hdb2 and it is 190Gb in size, that is it,
my FC3 install. But over in the Logical Volumes, the group has no logical
volumes yet. I know that the volume is there, I just screwed it up but
how to get it back? I really, really need this badly and am afraid to
lose it altogether. There has to be a way to recover this logical volume
somehow, at least it has a different volume group now, 01 instead of the
00 that the current system resides on.

Oh man somebody help. Bit, where can I post for help with this? Are there
any good newsgroups for linux volume group recovery?
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-01 22:24:36 UTC
Permalink
I picked custom or manual or some such option when I installed fc5 on my
multi-boot system. That allowd me to make partitions for fc5. I picked
ext3 for new partition creation and created mount points for the others.
grep LABEL etc/fstab
LABEL=/fc5 / ext3 defaults
1 1 LABEL=/2006 /2006 ext3 defaults
1 2 LABEL=/2006oe /2006oe ext3
defaults 1 2 LABEL=/accounts /accounts ext3 defaults
1 2 LABEL=/kubuntu /kubuntu
ext3 defaults 1 2 LABEL=/free_9b /free_9b
ext3 defaults 1 2 LABEL=/local/opt
/local/opt ext3 defaults 1 2 LABEL=/site
/site ext3 defaults 1 2 LABEL=/tmp
/tmp ext3 defaults 1 2
LABEL=/ubuntu /ubuntu ext3 defaults
1 2
That's good to know bit. I think that the worst of the worst has happened.
I was looking at logical volume groups in webmin and tried to make a new
one, from my /dev/hdb2 partition. I started the process and noticed at the
bottome "all data will be lost" and quickly stopped the process.
I then halted the system, connected my FC3 drive, booted, and kept my
fingers crossed. Kernel panic. No linux partions found. I can see with
fdisk -l /dev/hdb that the partitions are still there, and partition 2 is
an lvm volume, but how to access it now. That was all my stuff, everything
that I had saved! <sob!>
Looks like I am commited now to FC5 and have no choice but to move ahead.
I did try to rename the FC3 lvm to VolGroup01 instead of VolGroup00 like
it was and got a device busy result. Now when I go back into webmin and
check logical volume managment, I can see two volume groups, 00 and 01 and
01 is on /dev/hdb2, my old FC3 install! I see that there is one physical
volume present, /dev/hdb2 and it is 190Gb in size, that is it, my FC3
install. But over in the Logical Volumes, the group has no logical volumes
yet. I know that the volume is there, I just screwed it up but how to get
it back? I really, really need this badly and am afraid to lose it
altogether. There has to be a way to recover this logical volume somehow,
at least it has a different volume group now, 01 instead of the 00 that
the current system resides on.
Oh man somebody help. Bit, where can I post for help with this? Are there
any good newsgroups for linux volume group recovery?
Man of man. First thing you should do is before upgrade is backup
important stuff first.
$ Tar -xzcf ~/lessthan_DVDsize.tar.gz /abunchofdirectoriesunder4gig

K3b ~/lessthan_DVDsize.tar.gz files to a couple of DVD-RWs

Second do not panic.
With FC3 as the primary system, boot from the FC5 DVD

boot: linux rescue
# you get the prompt

$ chroot /mnt/sysimage

$ ls ~

# you should still see your data

If you can see your data then you can disconnect the FC3
and reinstall FC5 without the LVM.

Like I said go through the manual
create partition menu and delete the Logical Volume partitioning.

Then you should at least have one partition for /


Then complete the FC5 installation.

After that completes you should be able to reconnect the FC3 drive
$ mount -t ext3 /dev/hdb1 /mnt/fc3sys

$ cp -a /mnt/fc3sys/home/Ohmster /home

$ cp -a /mnt/fc3sys/usr/(directories not already on FC5) /usr

After you've cp'd all the data to the FC5 system

My FC5 installation wouldn't create a swap partition but it's ok you don't
need one and you can dd a swapfile, mkswap and swapon if you need one
later. Like LVM nice but not necessary for low user systems.

I'd disconnect the FC3 drive, reboot to make sure the FC5 has everything
and works properly.

Then you can do what you want with the FC3 drive and even "dread" install
LVM on both drives.

As soon as I figure out how to install my second hd in this pc without
removing the cpu fan, I plan to use LVM.

I think using Webmin instead of commandline LVM commands you inadvertently
ran pvcreate on hdb1 which I mentioned you should not do. Perhaps I
should have said never run LVM create anything on hdb?
Ohmster
2006-10-01 23:43:40 UTC
Permalink
Post by noi
Second do not panic.
With FC3 as the primary system, boot from the FC5 DVD
boot: linux rescue
# you get the prompt
$ chroot /mnt/sysimage
$ ls ~
# you should still see your data
If you can see your data then you can disconnect the FC3
and reinstall FC5 without the LVM.
No can do. When I try that, the rescue disc scans for Fedora installations
and does not find any, therefore it does not mount any. Examining the
logical volume group with the xwindows LVM tool shows that it is present on
/dev/hdb2, which is correct, and it has a different name now, VolGroup01.
The physical view shows 189Gb of space which is correct. The logical view
shows all of that space as free. Now I know that all my files are still
there, the darned thing did not run long enough to erase all of the files,
but something happened to the logical drive and now all the space is marked
as "Free" with no files present. Bummer.

I gotta find some way to bring them back.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
J.O. Aho
2006-10-02 00:43:29 UTC
Permalink
Post by Ohmster
Post by noi
Second do not panic.
With FC3 as the primary system, boot from the FC5 DVD
boot: linux rescue
# you get the prompt
$ chroot /mnt/sysimage
$ ls ~
# you should still see your data
If you can see your data then you can disconnect the FC3
and reinstall FC5 without the LVM.
No can do. When I try that, the rescue disc scans for Fedora installations
and does not find any, therefore it does not mount any. Examining the
logical volume group with the xwindows LVM tool shows that it is present on
/dev/hdb2, which is correct, and it has a different name now, VolGroup01.
The physical view shows 189Gb of space which is correct. The logical view
shows all of that space as free. Now I know that all my files are still
there, the darned thing did not run long enough to erase all of the files,
but something happened to the logical drive and now all the space is marked
as "Free" with no files present. Bummer.
Not sure how webmin does do, but it seems to have destroyed the old "volume
group" and "logical volume" and then created the new one, this shouldn't have
included any formate.

One way that may fix this, si to crate a new "logical volume" to your new
"volume group", do this manually, add all the free space at once and then run
fsck on the new device, if you are lucky, you will after that be able to
access all your old files (don't forget to mount it after fsck).


The reason why you got a busy message when you allowed the rescue disk to
mount the system was that /boot was mounted into the system root,

umount /mnt/sysimage/boot
umount /mnt/sysimage

That had made you to unmount the logical volume.


Okey, time for me to sleep again...


//Aho
noi
2006-10-02 05:41:13 UTC
Permalink
Post by J.O. Aho
Post by Ohmster
Post by noi
Second do not panic.
With FC3 as the primary system, boot from the FC5 DVD
boot: linux rescue
# you get the prompt
$ chroot /mnt/sysimage
$ ls ~
# you should still see your data
If you can see your data then you can disconnect the FC3 and reinstall
FC5 without the LVM.
No can do. When I try that, the rescue disc scans for Fedora
installations and does not find any, therefore it does not mount any.
Examining the logical volume group with the xwindows LVM tool shows that
it is present on /dev/hdb2, which is correct, and it has a different
name now, VolGroup01. The physical view shows 189Gb of space which is
correct. The logical view shows all of that space as free. Now I know
that all my files are still there, the darned thing did not run long
enough to erase all of the files, but something happened to the logical
drive and now all the space is marked as "Free" with no files present.
Bummer.
Not sure how webmin does do, but it seems to have destroyed the old
"volume group" and "logical volume" and then created the new one, this
shouldn't have included any formate.
One way that may fix this, si to crate a new "logical volume" to your new
"volume group", do this manually, add all the free space at once and then
run fsck on the new device, if you are lucky, you will after that be able
to access all your old files (don't forget to mount it after fsck).
The reason why you got a busy message when you allowed the rescue disk to
mount the system was that /boot was mounted into the system root,
umount /mnt/sysimage/boot
umount /mnt/sysimage
That had made you to unmount the logical volume.
Okey, time for me to sleep again...
//Aho
Yes, I agree with Aho. IMO Webmin thought you wanted to create a new
physical volume using hdb and wrote to the partition messing up your
existing partitions. That's the reason I make a partition for
/home separate from /boot, /swap or / partitions.

You can try booting the FC5 as primary then lvscan the FC3 on /dev/hdb
or mounting the FC3 /dev/hdb1 as /mnt/fc3sys then copy your files

You could also try a Knoppix LiveCD which should
automount all of your partitions /dev/hda1, /dev/hdb1 as read-only
/mnt/hda1, /mnt/hdb1. Then you could cp -a /mnt/hdb1/home/dirs
/mnt/hdb1/home copy from the FC3 mounted drive to the FC5 mounted drive.
If you can read the FC3 files under Knoppix. I suggest Knoppix because
it auto mounts all available hds to read-only mount points.


If you can read the files under Knoppix you change the properties of the
/mnt/hda1 from read-only to allow you to copy the files from /mnt/hdb1

Make sure you do not change properties unless you can see all the files
and permissions on FC3 and FC5. After the copies complete make sure the
permissions of the files copied to the FC5 /mnt/hda1/home/dirs have the
correct permissions, userid and groupids.

Very important to verify copied files have the right permissions, userid,
and groupid. Also very important not to change files, partitions or
anything on the FC3 drive until you can backup your data or the FC5
drive is working with all your data.
Ohmster
2006-10-02 12:39:54 UTC
Permalink
Post by noi
Yes, I agree with Aho. IMO Webmin thought you wanted to create a new
physical volume using hdb and wrote to the partition messing up your
existing partitions. That's the reason I make a partition for
/home separate from /boot, /swap or / partitions.
You can try booting the FC5 as primary then lvscan the FC3 on
/dev/hdb or mounting the FC3 /dev/hdb1 as /mnt/fc3sys then copy your
files
This is FC5, the old FC3 (What is left of it.) is on /dev/hdb. Partition
1 on hdb is the boot partition, partition 2 on hdb is the LVM where my
stuff is at:

[***@ohmster ~]# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [184.22 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
[***@ohmster ~]# fdisk -l /dev/hda

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 24321 195254010 8e Linux LVM
[***@ohmster ~]# fdisk -l /dev/hdb

Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM
Post by noi
You could also try a Knoppix LiveCD which should
automount all of your partitions /dev/hda1, /dev/hdb1 as read-only
/mnt/hda1, /mnt/hdb1. Then you could cp -a /mnt/hdb1/home/dirs
/mnt/hdb1/home copy from the FC3 mounted drive to the FC5 mounted
drive. If you can read the FC3 files under Knoppix. I suggest
Knoppix because it auto mounts all available hds to read-only mount
points.
You know, knoppix might not be a bad idea. I will try it later, have to
go to work now.
Post by noi
If you can read the files under Knoppix you change the properties of
the /mnt/hda1 from read-only to allow you to copy the files from
/mnt/hdb1
Make sure you do not change properties unless you can see all the
files and permissions on FC3 and FC5. After the copies complete make
sure the permissions of the files copied to the FC5
/mnt/hda1/home/dirs have the correct permissions, userid and groupids.
I hear ya.
Post by noi
Very important to verify copied files have the right permissions,
userid, and groupid. Also very important not to change files,
partitions or anything on the FC3 drive until you can backup your data
or the FC5 drive is working with all your data.
Will try that when I get home later. Thanks for the advice.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-02 18:07:27 UTC
Permalink
snip
This is FC5, the old FC3 (What is left of it.) is on /dev/hdb. Partition 1
on hdb is the boot partition, partition 2 on hdb is the LVM where my stuff
ACTIVE '/dev/VolGroup00/LogVol00' [184.22 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
Disk /dev/hda: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track,
24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System

/dev/hda1 * 1 13 104391 83 Linux

/dev/hda2 14 24321 195254010 8e Linux LVM
Disk /dev/hdb: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track,
24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System

/dev/hdb1 * 1 13 104391 83 Linux

/dev/hdb2 14 24792 199037317+ 8e Linux LVM

[***@ohmster ~]#
snip
You know, knoppix might not be a bad idea. I will try it later, have to go
to work now.
Yeah but make sure you don't change file permissions, uids, gids on either
FC3 or FC5. Major headaches if that happens..
snip
I hear ya.
snip
Will try that when I get home later. Thanks for the advice.
You can see the hdb partitions using fdisk on FC5
Are you sure you can't mount the hdb2 now on FC5?
I mean case closed if you can mount FC3 on FC5

root@ $ mount -t ext3 -o ro,defaults /dev/hdb2 /mnt/fc3sys


I didn't mention it first because using
$ vgextend volgroup /dev/hdb2
should have added FC3 as an extension to your FC5 volgroup
but you should be able to turn off lvm vgchange -an.

$ man vgchange

root@ $ vgchange -an # turns off lvm

root@ $ shutdown -r now

root@ $ mount -t ext3 -o ro,defaults /dev/hdb2 /mnt/sysfc3

root@ $ cp -a /mnt/sysfc3/whatever /home/whatever

root@ $ vgchange -an # turns lvm back on

root@ $ shutdown -r now
J.O. Aho
2006-10-02 18:26:04 UTC
Permalink
Post by noi
Are you sure you can't mount the hdb2 now on FC5?
I mean case closed if you can mount FC3 on FC5
Thats not possible, you need to use the LVM device name and not the device
name of the slice where the LVM is located.


//Aho
noi
2006-10-02 21:19:37 UTC
Permalink
Post by J.O. Aho
Are you sure you can't mount the hdb2 now on FC5? I mean case closed if
you can mount FC3 on FC5
Thats not possible, you need to use the LVM device name and not the device
name of the slice where the LVM is located.
//Aho
Probably but IRC the OP said the LVM on /dev/hdb (FC3) was overlaid or
corrupted. So will it hurt to try?

Of course he can try using the LVM commands to mount the FC3 logical
volume on /dev/hdb.

Were it me I would try deactivating LVM $ vgchange -an
then mount the FC3 /dev/hdb2 /mnt/sysfc3
copy my files, verify
then activate LVM $ vgchange -ay
J.O. Aho
2006-10-03 04:16:46 UTC
Permalink
Post by noi
Post by J.O. Aho
Are you sure you can't mount the hdb2 now on FC5? I mean case closed if
you can mount FC3 on FC5
Thats not possible, you need to use the LVM device name and not the device
name of the slice where the LVM is located.
Probably but IRC the OP said the LVM on /dev/hdb (FC3) was overlaid or
corrupted. So will it hurt to try?
As the data there is LVM, it won't work, just take a look at his first post,
there is a lot higher chance to be able to mount the /boot as vfat.
Post by noi
Were it me I would try deactivating LVM $ vgchange -an
then mount the FC3 /dev/hdb2 /mnt/sysfc3
deactivating the LVM won't in a magical way change the slice data


//Aho
Ohmster
2006-10-04 01:13:46 UTC
Permalink
Post by J.O. Aho
deactivating the LVM won't in a magical way change the slice data
//Aho
Dam! :(
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-04 07:06:34 UTC
Permalink
Post by Ohmster
Post by J.O. Aho
deactivating the LVM won't in a magical way change the slice data
//Aho
Dam! :(
I was hoping knoppix would have read the hdb2.
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.
noi
2006-10-04 07:28:53 UTC
Permalink
Post by Ohmster
Post by J.O. Aho
deactivating the LVM won't in a magical way change the slice data
//Aho
Dam! :(
I was hoping knoppix would have read the hdb2. 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,
Sorry I these should have been vgchange, vgrename
$ vgchange -an # disables all lvm
$ vgrename /dev/volgroup00 /dev/volgroup01
$ vgchange -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
$ lvscan
$ 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
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.
Ohmster
2006-10-06 01:53:58 UTC
Permalink
Post by noi
Sorry I these should have been vgchange, vgrename
Noi, I have saved the original post to a text file and have made the
corrections. It looks like what you have here is the only way left to
recover this disk and I really wish to thank you for this. During the week
I have no time to think, let alone fix a Linux distro. I will get back to
this on the weekend, time permitting. Thanks again buddy, will keep you
updated.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Ohmster
2006-10-06 03:49:41 UTC
Permalink
Post by noi
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.
Dude this might work! I did follow the instructions that you gave me and
also referred to the original web page here:

http://www.linuxjournal.com/article/8874

I created the backup file as described in the article, my VolGroup01
looks like this:
---------------------------------------------------------------------
VolGroup01 {
id = "Pu8j7l-2dEd-GhU7-tBAr-HDq7-r6OF-23O8Jo"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 8192
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "xE0F6K-q9r4-1K3o-iYuh-NlWc-9597-8WGobu"
device = "/dev/hdb2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 48593
}
}
# Generated by LVM2: Sun Oct 1 16:33:20 2006
---------------------------------------------------------------------

Now that is exactly the same as the author dude's file as in listing 6 on
his web page, here:
---------------------------------------------------------------------
VolGroup01 {
id = "xQZqTG-V4wn-DLeQ-bJ0J-GEHB-4teF-A4PPBv"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "tRACEy-cstP-kk18-zQFZ-ErG5-QAIV-YqHItA"
device = "/dev/md2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 2365
}
}
# Generated by LVM2: Sun Feb 5 22:57:19 2006
---------------------------------------------------------------------

Mine came out right, there is no difference other than the actual data. I
cannot restore my volume group like he says in this part though:

[***@recoverybox ~]# vgcfgrestore -f VolGroup01 VolGroup01
[***@recoverybox ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup01" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2
[***@recoverybox ~]# pvscan
PV /dev/md2 VG VolGroup01 lvm2 [73.91 GB / 32.00 MB free]
PV /dev/hda2 VG VolGroup00 lvm2 [18.91 GB / 32.00 MB free]
Total: 2 [92.81 GB] / in use: 2 [92.81 GB] / in no VG: 0 [0 ]
[***@recoverybox ~]# vgchange VolGroup01 -a y
1 logical volume(s) in volume group "VolGroup01" now active
[***@recoverybox ~]# lvscan
ACTIVE '/dev/VolGroup01/LogVol00' [73.88 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol00' [18.38 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [512.00 MB] inherit


Here is what happens when I try:

[***@ohmster recoverybox]# vgcfgrestore -f VolGroup01 VolGroup01
Parse error at line 19: unexpected token
Couldn't read volume group metadata.
Restore failed.
[***@ohmster recoverybox]#

What the hell is the problem? I don't even have a line 19 in my
VolGroup01 file. The comment line, the very last line, is line 17 and
there ain't no more. How come this don't work?

One thing that I am doing that the author dude did is that I am not doing
this on another machine because I only have one linux machine right now.
See, this part I did not do:

"To recover, the first thing to do is to move the drive to another
machine. You can do this pretty easily by putting the drive in a USB2
hard drive enclosure. It then will show up as a SCSI hard disk device,
for example, /dev/sda, when you plug it in to your recovery computer.
This reduces the risk of damaging the recovery machine while attempting
to install the hardware from the original computer."

You think that might be a problem?

[***@ohmster recoverybox]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "VolGroup01" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2
[***@ohmster recoverybox]# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [184.22 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
[***@ohmster recoverybox]# pvscan
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free]
PV /dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free]
Total: 2 [376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
[***@ohmster recoverybox]#

It looks like the system found both drives, although it is saying that
hdb2 is empty, it is not, all of my data is in there.

Oh man, I am so close now, somebody has to be able to help, what do you
think, noi? So close but so far, this is major bumming me out. :(
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-06 08:41:44 UTC
Permalink
Post by Ohmster
Post by noi
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.
Dude this might work! I did follow the instructions that you gave me and
http://www.linuxjournal.com/article/8874
I created the backup file as described in the article, my VolGroup01 looks
---------------------------------------------------------------------
VolGroup01 {
id = "Pu8j7l-2dEd-GhU7-tBAr-HDq7-r6OF-23O8Jo" seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"] extent_size = 8192
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "xE0F6K-q9r4-1K3o-iYuh-NlWc-9597-8WGobu" device = "/dev/hdb2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 48593
}
}
# Generated by LVM2: Sun Oct 1 16:33:20 2006
---------------------------------------------------------------------
Now that is exactly the same as the author dude's file as in listing 6 on
---------------------------------------------------------------------
VolGroup01 {
id = "xQZqTG-V4wn-DLeQ-bJ0J-GEHB-4teF-A4PPBv" seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"] extent_size = 65536
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "tRACEy-cstP-kk18-zQFZ-ErG5-QAIV-YqHItA" device = "/dev/md2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 2365
}
}
# Generated by LVM2: Sun Feb 5 22:57:19 2006
---------------------------------------------------------------------
Mine came out right, there is no difference other than the actual data. I
Reading all physical volumes. This may take a while... Found volume
group "VolGroup01" using metadata type lvm2 Found volume group
"VolGroup00" using metadata type lvm2
PV /dev/md2 VG VolGroup01 lvm2 [73.91 GB / 32.00 MB free]
PV /dev/hda2 VG VolGroup00 lvm2 [18.91 GB / 32.00 MB free]
Total: 2 [92.81 GB] / in use: 2 [92.81 GB] / in no VG: 0 [0 ]
Post by Ohmster
1 logical volume(s) in volume group "VolGroup01" now active
ACTIVE '/dev/VolGroup01/LogVol00' [73.88 GB] inherit ACTIVE
'/dev/VolGroup00/LogVol00' [18.38 GB] inherit ACTIVE
'/dev/VolGroup00/LogVol01' [512.00 MB] inherit
Parse error at line 19: unexpected token Couldn't read volume group
metadata.
Restore failed.
What the hell is the problem? I don't even have a line 19 in my
VolGroup01 file. The comment line, the very last line, is line 17 and
there ain't no more. How come this don't work?
As best I can. Late for me. But I read one of the comments to the
other night and the commentator said he had to use the full volume group
name not just volgroup1, ie, /dev/vo.....

Only another day till weekend. So I suggest re-reading the article
to see check if we've missed a step before you try the vgcfgrestore again.
I only browsed the end of the article where it discusses LVM recovery and
some of the comments.
Post by Ohmster
One thing that I am doing that the author dude did is that I am not
doing this on another machine because I only have one linux machine
"To recover, the first thing to do is to move the drive to another
machine. You can do this pretty easily by putting the drive in a USB2
hard drive enclosure. It then will show up as a SCSI hard disk device,
for example, /dev/sda, when you plug it in to your recovery computer.
This reduces the risk of damaging the recovery machine while attempting
to install the hardware from the original computer."
You think that might be a problem?
I didn't read that was the author talking about his raid devices or the
lvm recovery process? Not really. I just disconnect a drive when I
experiment.
Post by Ohmster
Reading all physical volumes. This may take a while... Found volume
group "VolGroup01" using metadata type lvm2 Found volume group
"VolGroup00" using metadata type lvm2
ACTIVE '/dev/VolGroup00/LogVol00' [184.22 GB] inherit
ACTIVE
'/dev/VolGroup00/LogVol01' [1.94 GB] inherit
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free] PV
/dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free] Total: 2
[376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
It looks like the system found both drives, although it is saying that
hdb2 is empty, it is not, all of my data is in there.
Sadly the backup lvm configuration is on the unreadable hdb2.

Really can't say about the pvscan. I thought hda and hdb were different
sized drives.

When you look at it again could run the commands with "-v" or "-vv"
ie, pvscan -v, pvdata -v ?
Post by Ohmster
Oh man, I am so close now, somebody has to be able to help, what do you
think, noi? So close but so far, this is major bumming me out. :(
Ohmster
2006-10-06 12:28:29 UTC
Permalink
noi <***@siam.com> wrote in news:cFoVg.2180$NE6.1209
@newssvr11.news.prodigy.com:

[snip]
Post by noi
Sadly the backup lvm configuration is on the unreadable hdb2.
Really can't say about the pvscan. I thought hda and hdb were
different
Post by noi
sized drives.
When you look at it again could run the commands with "-v" or "-vv"
ie, pvscan -v, pvdata -v ?
Late for work but trying to get a direction to go here. pvdata is not a
recognized command but pcscan with the v o vv works, see output. Have to
run, will be back soon. Thank you so much noi.

[***@ohmster ~]# pvdata -v
-bash: pvdata: command not found
[***@ohmster ~]# pvscan
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free]
PV /dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free]
Total: 2 [376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
[***@ohmster ~]# pvscan -v
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free]
PV /dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free]
Total: 2 [376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
[***@ohmster ~]# pvscan -vv
Setting global/locking_type to 1
Setting global/locking_dir to /var/lock/lvm
File-based locking enabled.
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
/dev/ramdisk: size is 32768 sectors
/dev/ramdisk: size is 32768 sectors
/dev/ramdisk: No label detected
/dev/hda: size is 390721968 sectors
/dev/md0: size is 0 sectors
/dev/dm-0: size is 386334720 sectors
/dev/dm-0: size is 386334720 sectors
/dev/dm-0: No label detected
/dev/ram: size is 32768 sectors
/dev/ram: size is 32768 sectors
/dev/ram: No label detected
/dev/hda1: size is 208782 sectors
/dev/hda1: size is 208782 sectors
/dev/hda1: No label detected
/dev/dm-1: size is 4063232 sectors
/dev/dm-1: size is 4063232 sectors
/dev/dm-1: No label detected
/dev/ram2: size is 32768 sectors
/dev/ram2: size is 32768 sectors
/dev/ram2: No label detected
/dev/hda2: size is 390508020 sectors
/dev/hda2: size is 390508020 sectors
/dev/hda2: lvm2 label detected
/dev/ram3: size is 32768 sectors
/dev/ram3: size is 32768 sectors
/dev/ram3: No label detected
/dev/ram4: size is 32768 sectors
/dev/ram4: size is 32768 sectors
/dev/ram4: No label detected
/dev/ram5: size is 32768 sectors
/dev/ram5: size is 32768 sectors
/dev/ram5: No label detected
/dev/ram6: size is 32768 sectors
/dev/ram6: size is 32768 sectors
/dev/ram6: No label detected
/dev/ram7: size is 32768 sectors
/dev/ram7: size is 32768 sectors
/dev/ram7: No label detected
/dev/ram8: size is 32768 sectors
/dev/ram8: size is 32768 sectors
/dev/ram8: No label detected
/dev/ram9: size is 32768 sectors
/dev/ram9: size is 32768 sectors
/dev/ram9: No label detected
/dev/ram10: size is 32768 sectors
/dev/ram10: size is 32768 sectors
/dev/ram10: No label detected
/dev/ram11: size is 32768 sectors
/dev/ram11: size is 32768 sectors
/dev/ram11: No label detected
/dev/ram12: size is 32768 sectors
/dev/ram12: size is 32768 sectors
/dev/ram12: No label detected
/dev/ram13: size is 32768 sectors
/dev/ram13: size is 32768 sectors
/dev/ram13: No label detected
/dev/ram14: size is 32768 sectors
/dev/ram14: size is 32768 sectors
/dev/ram14: No label detected
/dev/ram15: size is 32768 sectors
/dev/ram15: size is 32768 sectors
/dev/ram15: No label detected
/dev/hdb: size is 398297088 sectors
/dev/hdb1: size is 208782 sectors
/dev/hdb1: size is 208782 sectors
/dev/hdb1: No label detected
/dev/hdb2: size is 398074635 sectors
/dev/hdb2: size is 398074635 sectors
/dev/hdb2: lvm2 label detected
/dev/hdb2: lvm2 label detected
/dev/hdb2: lvm2 label detected
/dev/hda2: lvm2 label detected
/dev/hda2: lvm2 label detected
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free]
PV /dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free]
Total: 2 [376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
[***@ohmster ~]#


Any more commands to shed light? There is such a thing as backup and
archive in /etc/lvm.

***@ohmster lvm]# pwd
/etc/lvm
[***@ohmster lvm]# ls -la
total 64
drwxr-xr-x 4 root root 4096 Sep 30 16:48 .
drwxr-xr-x 106 root root 12288 Oct 5 06:21 ..
drwx------ 2 root root 4096 Oct 1 16:33 archive
drwx------ 2 root root 4096 Oct 1 16:33 backup
-rw------- 1 root root 1282 Oct 6 08:24 .cache
-rw-r--r-- 1 root root 10538 Feb 11 2006 lvm.conf
[***@ohmster lvm]#

[***@ohmster lvm]# cd backup
[***@ohmster backup]# ls -la
total 24
drwx------ 2 root root 4096 Oct 1 16:33 .
drwxr-xr-x 4 root root 4096 Sep 30 16:48 ..
-rw------- 1 root root 1324 Oct 1 16:33 VolGroup00
-rw------- 1 root root 717 Oct 1 16:33 VolGroup01
[***@ohmster backup]#

The VolGroup01 backup you can see is a much smaller file. This one does
not show the logical drives in hdb like the VolGroup00 does for hda. In
the archive directory, they show both VolGroups...

[***@ohmster archive]# ls -la
total 76
drwx------ 2 root root 4096 Oct 1 16:33 .
drwxr-xr-x 4 root root 4096 Sep 30 16:48 ..
-rw------- 1 root root 1361 Sep 30 16:48 VolGroup00_00000.vg
-rw------- 1 root root 1341 Oct 1 16:27 VolGroup00_00001.vg
-rw------- 1 root root 1314 Oct 1 16:27 VolGroup00_00002.vg
-rw------- 1 root root 1314 Oct 1 16:27 VolGroup00_00003.vg
-rw------- 1 root root 1314 Oct 1 16:28 VolGroup00_00004.vg
-rw------- 1 root root 1314 Oct 1 16:28 VolGroup00_00005.vg
-rw------- 1 root root 1314 Oct 1 16:28 VolGroup00_00006.vg
-rw------- 1 root root 1314 Oct 1 16:28 VolGroup00_00007.vg
-rw------- 1 root root 1328 Oct 1 16:28 VolGroup00_00008.vg
-rw------- 1 root root 1327 Oct 1 16:31 VolGroup00_00009.vg
-rw------- 1 root root 1328 Oct 1 16:31 VolGroup00_00010.vg
-rw------- 1 root root 1325 Oct 1 16:33 VolGroup00_00011.vg
-rw------- 1 root root 1325 Oct 1 16:33 VolGroup00_00012.vg
-rw------- 1 root root 718 Oct 1 16:33 VolGroup01_00000.vg
[***@ohmster archive]#

But VolGroup01 did not exist as 01 until after the catastrophe, before
that, they were both named VolGroup00.

Gotta run! Thanks.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-06 17:14:38 UTC
Permalink
Post by Ohmster
[snip]
Post by noi
Sadly the backup lvm configuration is on the unreadable hdb2.
Really can't say about the pvscan. I thought hda and hdb were
different
Post by noi
sized drives.
When you look at it again could run the commands with "-v" or "-vv" ie,
pvscan -v, pvdata -v ?
Late for work but trying to get a direction to go here. pvdata is not a
recognized command but pcscan with the v o vv works, see output. Have to
run, will be back soon. Thank you so much noi.
Maybe it was replaced by pvdisplay
Post by Ohmster
-bash: pvdata: command not found
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free] PV
/dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free] Total: 2
[376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
Wiping cache of LVM-capable devices
Wiping internal VG cache
Walking through all physical volumes
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free] PV
/dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free] Total: 2
[376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
snip -vv not very helpful.
Post by Ohmster
Any more commands to shed light? There is such a thing as backup and
archive in /etc/lvm.
Thinking.

Would you have a backup that included /etc on FC3 prior to installing the
FC5? This guy used a 6 month old backup to restore his data.

http://codeworks.gnomedia.com/archives/2005/general/lvm_recovery/

Since hdb2 is now v01 have you tried to mount it as a LVM?

$ mount /dev/VolGroup01/LogVol00 /mnt/VG01/LV_FC3
Post by Ohmster
/etc/lvm
total 64
drwxr-xr-x 4 root root 4096 Sep 30 16:48 . drwxr-xr-x 106 root root
12288 Oct 5 06:21 .. drwx------ 2 root root 4096 Oct 1 16:33 archive
drwx------ 2 root root 4096 Oct 1 16:33 backup -rw------- 1 root
root 1282 Oct 6 08:24 .cache -rw-r--r-- 1 root root 10538 Feb 11 2006
total 24
drwx------ 2 root root 4096 Oct 1 16:33 . drwxr-xr-x 4 root root 4096 Sep
30 16:48 .. -rw------- 1 root root 1324 Oct 1 16:33 VolGroup00 -rw-------
The VolGroup01 backup you can see is a much smaller file. This one does
not show the logical drives in hdb like the VolGroup00 does for hda. In
the archive directory, they show both VolGroups...
total 76
drwx------ 2 root root 4096 Oct 1 16:33 . drwxr-xr-x 4 root root 4096 Sep
30 16:48 .. -rw------- 1 root root 1361 Sep 30 16:48 VolGroup00_00000.vg
-rw------- 1 root root 1341 Oct 1 16:27 VolGroup00_00001.vg -rw------- 1
root root 1314 Oct 1 16:27 VolGroup00_00002.vg -rw------- 1 root root
1314 Oct 1 16:27 VolGroup00_00003.vg -rw------- 1 root root 1314 Oct 1
16:28 VolGroup00_00004.vg -rw------- 1 root root 1314 Oct 1 16:28
VolGroup00_00005.vg -rw------- 1 root root 1314 Oct 1 16:28
VolGroup00_00006.vg -rw------- 1 root root 1314 Oct 1 16:28
VolGroup00_00007.vg -rw------- 1 root root 1328 Oct 1 16:28
VolGroup00_00008.vg -rw------- 1 root root 1327 Oct 1 16:31
VolGroup00_00009.vg -rw------- 1 root root 1328 Oct 1 16:31
VolGroup00_00010.vg -rw------- 1 root root 1325 Oct 1 16:33
VolGroup00_00011.vg -rw------- 1 root root 1325 Oct 1 16:33
VolGroup00_00012.vg -rw------- 1 root root 718 Oct 1 16:33
But VolGroup01 did not exist as 01 until after the catastrophe, before
that, they were both named VolGroup00.
Gotta run! Thanks.
Ohmster
2006-10-07 21:33:05 UTC
Permalink
Post by noi
Thinking.
Would you have a backup that included /etc on FC3 prior to installing the
FC5? This guy used a 6 month old backup to restore his data.
http://codeworks.gnomedia.com/archives/2005/general/lvm_recovery/
Since hdb2 is now v01 have you tried to mount it as a LVM?
$ mount /dev/VolGroup01/LogVol00 /mnt/VG01/LV_FC3
There is no VolGroup01 in dev. I went and tried to find a backup using
the dude's recovery method here:
http://www.linuxjournal.com/article/8874

And the VolGroup01 failed to restore. I went looking through the file
that dd created and found an original text for when the volume was 00 and
that is when things were good. Here is the code from it:

[***@ohmster recoverybox]# cat VolGroup00
VolGroup00 {
id = "3agBFX-D3N0-Bp3c-I7se-JVLY-ZIIa-fqMcIF"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "v40FVM-IWMU-T26b-I9eD-UprZ-WNqu-a9MTGq"
device = "/dev/hda2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 6074
}
}
# Generated by LVM2: Sat May 7 22:23:59 2005
[***@ohmster recoverybox]#

Only problem is that the hardware shows the drive as /dev/hda2 and the
group as VolGroup00. Currently, that is occupied by my FC5 installation.
I think that the only shot in hell I have of restoring this drive is to
shut down the box, reconnect the drive as hda, then booting with a rescue
or live CD that has LVM support, and then trying to restore the drive and
then renaming it to VolGroup01. That might be the only chance I have to
restore this drive. The sad part is that I cannot find a live CD that
supports LVM nor any instructions on how to do this. This sucks man.
Everything I had was on that disk and now it is gone. :(
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-08 00:40:57 UTC
Permalink
Post by noi
Thinking.
Would you have a backup that included /etc on FC3 prior to installing
the
Post by noi
FC5? This guy used a 6 month old backup to restore his data.
http://codeworks.gnomedia.com/archives/2005/general/lvm_recovery/
Since hdb2 is now v01 have you tried to mount it as a LVM?
$ mount /dev/VolGroup01/LogVol00 /mnt/VG01/LV_FC3
There is no VolGroup01 in dev. I went and tried to find a backup using the
http://www.linuxjournal.com/article/8874
And the VolGroup01 failed to restore. I went looking through the file that
dd created and found an original text for when the volume was 00 and that
id = "3agBFX-D3N0-Bp3c-I7se-JVLY-ZIIa-fqMcIF" seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"] extent_size = 65536
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "v40FVM-IWMU-T26b-I9eD-UprZ-WNqu-a9MTGq" device = "/dev/hda2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 6074
}
}
Only problem is that the hardware shows the drive as /dev/hda2 and the
group as VolGroup00. Currently, that is occupied by my FC5 installation. I
think that the only shot in hell I have of restoring this drive is to shut
down the box, reconnect the drive as hda, then booting with a rescue or
live CD that has LVM support, and then trying to restore the drive and
then renaming it to VolGroup01. That might be the only chance I have to
restore this drive. The sad part is that I cannot find a live CD that
supports LVM nor any instructions on how to do this. This sucks man.
Everything I had was on that disk and now it is gone. :(
Well. I'm also confused as to which of your volgroups is on which hd.
I'm thinking but maybe you could retrace what you've done from begining
to see if you've overlooked a step. And avoid Webmin for now.

IIUYC, you're ready for more experiments? Just be careful not to write
to you FC3 drive or change file permissions, ownership on FC3.

Here's the thing IMO you could change your bios to "not installed" for hda
and change the boot sequence to CDROM,IDE-1 or however your bios
determines the hd boot drive.

I'm sure you can download and install packages to LiveCDs but those
packages go away once you reboot the LiveCD. So, if you want to install
LVM to the Knoppix LiveCD try instructions at

http://www.knoppix.net/wiki/LVM2

Maybe with just the FC3 drive, Knoppix LiveCD and install of LVM to
Knoppix you could try

first to mount the FC3 volgroup and backup your data

If that fails that try the recovery procedures from the previous html
links.

First I'd try to download and install LVM for the Knoppix LiveCD.
Although it did mount the FC5 LVM volumes didn't it? Maybe the LVM2
tools are already on the CD and you can try the recovery using Knoppix and
just the FC3 drive.
Ohmster
2006-10-08 02:40:36 UTC
Permalink
noi <***@siam.com> wrote in news:tOXVg.9983$***@newssvr29.news.prodigy.net:

Dam you are a good dude, noi. You stuck with me, everyone else is gone
now.
Post by noi
Well. I'm also confused as to which of your volgroups is on which hd.
I'm thinking but maybe you could retrace what you've done from
begining to see if you've overlooked a step. And avoid Webmin for
now.
Retrace. I have an FC3 install on a 200Gb IDE hard disk. The install
utilizes LVM2 and created 2 partitions on the disk, at the time,
/dev/hda1 for boot partition with vmlinuz and all system maps stuff as an
ext3 partition. /dev/hda2 was an LVM partition that held the root file
system. /dev/hda1 was

I removed that drive, installed another new 200Gb IDE drive and installed
FC5, the install came out exactly the same format, with the same
partition layout and LVM for root file system. Here is the current system
and what it looks like, same was for FC3.

[***@ohmster ~]# fdisk -l /dev/hda

Disk /dev/hda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 24321 195254010 8e Linux LVM
[***@ohmster ~]#


FC3 is now on /dev/hdb, here is what it looks like:

[***@ohmster ~]# fdisk -l /dev/hdb

Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM
[***@ohmster ~]#

It is pretty much the same. Both systems use VolGroup00 as the LVM
partition, a real problem as both could not be mounted with the same
name. I got impatient with trying to get at the data with the weekend
coming to a close and with webmin, decided to create a new logical volume
on the drive, thinking that somehow I could access the data that way, I
saw a warning that all data would be lost and tried to kill the process
quickly. Too late, the logical volumes on the drive were now lost. I also
renamed the volume group to 01. Now I have /dev/hdb2 as VolGroup01 with a
physical volume but no logical volumes on it. Oh they are there I am
sure, but with no FAT or whatever LVM uses to track the files, they are
inaccessible and nonexistent to the system.
Post by noi
IIUYC, you're ready for more experiments? Just be careful not to
write to you FC3 drive or change file permissions, ownership on FC3.
Hell yah, gotta do more experiments, how else can I get my shit back?
Post by noi
Here's the thing IMO you could change your bios to "not installed" for
hda and change the boot sequence to CDROM,IDE-1 or however your bios
determines the hd boot drive.
Not necessary, the case is open and I can pull the IDE cables and
rearrange them at will to make the drives appear as I wish.
Post by noi
I'm sure you can download and install packages to LiveCDs but those
packages go away once you reboot the LiveCD. So, if you want to
install LVM to the Knoppix LiveCD try instructions at
http://www.knoppix.net/wiki/LVM2
Yeah, will have that as a last resort I guess.
Post by noi
Maybe with just the FC3 drive, Knoppix LiveCD and install of LVM to
Knoppix you could try
first to mount the FC3 volgroup and backup your data
If that fails that try the recovery procedures from the previous html
links.
First I'd try to download and install LVM for the Knoppix LiveCD.
Although it did mount the FC5 LVM volumes didn't it? Maybe the LVM2
tools are already on the CD and you can try the recovery using Knoppix
and just the FC3 drive.
No, knoppix 3.2 failed to mount the LVM volumes on both disks. Non
specified format, mount failed. The root partitions mounted and were
accessible, /dev/hda1 and /dev/hdb1 but not the 2nd 8e, LVM partitions.
Why the hell don't live CDs include LVM2 shit since that is where these
modern distros appear to be headed. ...sigh.

If I had the money, I would send out the drive for recovery, but money,
what is that and who has it? :P
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-08 03:05:29 UTC
Permalink
Post by Ohmster
Dam you are a good dude, noi. You stuck with me, everyone else is gone
now.
Post by noi
Well. I'm also confused as to which of your volgroups is on which hd.
I'm thinking but maybe you could retrace what you've done from begining
to see if you've overlooked a step. And avoid Webmin for now.
Retrace. I have an FC3 install on a 200Gb IDE hard disk. The install
utilizes LVM2 and created 2 partitions on the disk, at the time, /dev/hda1
for boot partition with vmlinuz and all system maps stuff as an ext3
partition. /dev/hda2 was an LVM partition that held the root file system.
/dev/hda1 was
I removed that drive, installed another new 200Gb IDE drive and installed
FC5, the install came out exactly the same format, with the same partition
layout and LVM for root file system. Here is the current system and what
it looks like, same was for FC3.
Disk /dev/hda: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track,
24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux /dev/hda2
Disk /dev/hdb: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track,
24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux /dev/hdb2
It is pretty much the same. Both systems use VolGroup00 as the LVM
partition, a real problem as both could not be mounted with the same name.
I got impatient with trying to get at the data with the weekend coming to
a close and with webmin, decided to create a new logical volume on the
drive, thinking that somehow I could access the data that way, I saw a
warning that all data would be lost and tried to kill the process quickly.
Too late, the logical volumes on the drive were now lost. I also renamed
the volume group to 01. Now I have /dev/hdb2 as VolGroup01 with a physical
volume but no logical volumes on it. Oh they are there I am sure, but with
no FAT or whatever LVM uses to track the files, they are inaccessible and
nonexistent to the system.
Yep apparently a case of haste makes waste. I almost got caught moving
when I cloned my hda to sda. It's dual boot so the XP went without
problem. Then I formatted ext3 the Linux partitions, and copied the
everything cp -p except I had linked hda to ~/sda/hda so the damn copy wnt
into loops copying itself. After booting Knoppix and Ubuntu I realized
the problem but had accidently changed ownership on hda so neither booted
linux. It took a week to figure out to fix the installation. .
Post by Ohmster
Post by noi
IIUYC, you're ready for more experiments? Just be careful not to write
to you FC3 drive or change file permissions, ownership on FC3.
Hell yah, gotta do more experiments, how else can I get my shit back?
Post by noi
Here's the thing IMO you could change your bios to "not installed" for
hda and change the boot sequence to CDROM,IDE-1 or however your bios
determines the hd boot drive.
Not necessary, the case is open and I can pull the IDE cables and
rearrange them at will to make the drives appear as I wish.
Post by noi
I'm sure you can download and install packages to LiveCDs but those
packages go away once you reboot the LiveCD. So, if you want to install
LVM to the Knoppix LiveCD try instructions at
http://www.knoppix.net/wiki/LVM2
Yeah, will have that as a last resort I guess.
Post by noi
Maybe with just the FC3 drive, Knoppix LiveCD and install of LVM to
Knoppix you could try
first to mount the FC3 volgroup and backup your data
If that fails that try the recovery procedures from the previous html
links.
First I'd try to download and install LVM for the Knoppix LiveCD.
Although it did mount the FC5 LVM volumes didn't it? Maybe the LVM2
tools are already on the CD and you can try the recovery using Knoppix
and just the FC3 drive.
No, knoppix 3.2 failed to mount the LVM volumes on both disks. Non
specified format, mount failed. The root partitions mounted and were
accessible, /dev/hda1 and /dev/hdb1 but not the 2nd 8e, LVM partitions.
Why the hell don't live CDs include LVM2 shit since that is where these
modern distros appear to be headed. ...sigh.
If I had the money, I would send out the drive for recovery, but money,
what is that and who has it? :P
Well, no offense but it's just stuff.

Ok so the vg on hdb has been renamed and now we're hoping to recover the
logical volume which should be logvol01?

Try that apt-get for Knoppix on the wiki to install LVM2 then you can
try mounting the LVM under Knoppix.
Ohmster
2006-10-08 15:49:49 UTC
Permalink
noi <***@siam.com> wrote in news:ZVZVg.3041$NE6.2656
@newssvr11.news.prodigy.com:

[snip]
Post by noi
Ok so the vg on hdb has been renamed and now we're hoping to recover the
logical volume which should be logvol01?
Try that apt-get for Knoppix on the wiki to install LVM2 then you can
try mounting the LVM under Knoppix.
Well yeah. I downloaded the Gentoo Live CD because it has LVM2 support
built in.

http://www.gentoo.org/

I burned the CD and booted to it. Nice looking and all, it got me online,
but I will be dammed if I know how to work it. There is a boot option for
lvm support but once you boot, you are in a pretty xwindow gnome desktop
as user "gentoo". Not good for running lvm commands. I found the terminal
but what is the root password? Dammed if I know. That would have been
good too, booting to a live CD with LVM support. Still not sure if I can
save the drive, though. One fellow did it by using pvcreate to recreate
the physical volumes on his disk and then by specifying the same name
that they were originally. Said he got his volumes back with all of the
data intact. I don't know what the logical volumes were named originally
and do not have a back up as the new system did not make any because the
volume groups had the same name. Dam.

http://codeworks.gnomedia.com/archives/2005/general/lvm_recovery/

All I got is what I dug out of the drive itself and saved to a file:

[***@ohmster recoverybox]# cat VolGroup00
VolGroup00 {
id = "3agBFX-D3N0-Bp3c-I7se-JVLY-ZIIa-fqMcIF"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 65536
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "v40FVM-IWMU-T26b-I9eD-UprZ-WNqu-a9MTGq"
device = "/dev/hda2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 6074
}
}
# Generated by LVM2: Sat May 7 22:23:59 2005
[***@ohmster recoverybox]#

That is when the disk was in it's original contition as /dev/hda. It does
not list the logical volumes though. Neither does the file when it was
named as VolGroup01.

[***@ohmster recoverybox]# cat VolGroup01
VolGroup01 {
id = "Pu8j7l-2dEd-GhU7-tBAr-HDq7-r6OF-23O8Jo"
seqno = 1
status = ["RESIZEABLE", "READ", "WRITE"]
extent_size = 8192
max_lv = 0
max_pv = 0
physical_volumes {
pv0 {
id = "xE0F6K-q9r4-1K3o-iYuh-NlWc-9597-8WGobu"
device = "/dev/hdb2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 48593
}
}
# Generated by LVM2: Sun Oct 1 16:33:20 2006
[***@ohmster recoverybox]#


I don't really understand this stuff but it looks like there is a lot
more data in the VolGroup00 file:

extent_size = 65536

Than the VolGroup01 file:

extent_size = 8192

I would hate to restore the drive to the condition it is already. I had a
lot of stuff on there and the way it is now, the disk shows as just about
empty:

[***@ohmster recoverybox]# pvscan
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free]
PV /dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free]
Total: 2 [376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
[***@ohmster recoverybox]# lvscan
ACTIVE '/dev/VolGroup00/LogVol00' [184.22 GB] inherit
ACTIVE '/dev/VolGroup00/LogVol01' [1.94 GB] inherit
[***@ohmster recoverybox]#

A backup would probably really save the day now, but the only place that
a backup might exist is on the disk itself. This fellow seems to have
done just that:
---------------------------------------------------------------------
# John Says:
September 10th, 2006 at 6:23 pm

THANK YOU! After reading your solution I managed to recover my harddisk.

I installed a new linux on a new disk and was planning to mount the old
one. I never heard of LVM and such and before long I had tried to run
vgcreate, pvcreate and lvcreate, rendering my old partition unmountable :
( Additionaly I had no backup available of the old system, and was
therefore stuck.

The solution was to copy the old (unmountable) disk with “dd if=/dev/hdb2
of=/backup/olddisk.bak.dd”. I then opened the binary file in a editor,
and to my surprise and joy, the partition information was readable in the
beginning. I managed to copy/paste a complete backup-file (the one made
when I run my first vgcreate) and use it with vgcfgrestore.

Hope someone else can benefit from this,

/John
http://blog.john.nu/
---------------------------------------------------------------------
"I hope someone else can benefit from this." Too bad he did not go into
any details on exactly how he did it, like a howto or something like
that. I would be benefitting like a motherf*cker right about now but that
is a huge amount of blind work, to copy the entire disk to a file and
then edit it, with what? and then copy/paste a complete backup file, what
does that look like, exactly? ...ugh. This looks like the only way to
restore the drive and there are no details. The URL to John's website is
in some foreign language. :(

This is looking pretty grim, noi. I am starting to doubt if this drive
can be recovered by me or not. I will hang on to it, I am not in need of
the space right now and am willing to experiment, but this is really
starting to look pretty bad. Hey I really appreciate your hanging in
there but am running out of ideas on what do do. Man I had no idea that
this LVM stuff would kick my ass so darned bad. I was really doing pretty
good until this. I have some minor stuff backed up like my httpd.conf
file and I can use that I guess, recreate the users and then try to make
the wget lines again. So sad. Thanks buddy.
(So much shit down the toilet! ...sob.)
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-08 21:33:08 UTC
Permalink
Post by Ohmster
[snip]
Post by noi
Ok so the vg on hdb has been renamed and now we're hoping to recover
the
Post by noi
logical volume which should be logvol01?
Try that apt-get for Knoppix on the wiki to install LVM2 then you can
try mounting the LVM under Knoppix.
Well yeah. I downloaded the Gentoo Live CD because it has LVM2 support
built in.
http://www.gentoo.org/
I burned the CD and booted to it. Nice looking and all, it got me online,
but I will be dammed if I know how to work it. There is a boot option for
lvm support but once you boot, you are in a pretty xwindow gnome desktop
as user "gentoo". Not good for running lvm commands. I found the terminal
but what is the root password? Dammed if I know. That would have been good
too, booting to a live CD with LVM support. Still not sure if I can save
the drive, though. One fellow did it by using pvcreate to recreate the
physical volumes on his disk and then by specifying the same name that
they were originally. Said he got his volumes back with all of the data
intact. I don't know what the logical volumes were named originally and do
not have a back up as the new system did not make any because the volume
groups had the same name. Dam.
Yeah I didn't know Gentoo had lvm2 and Knoppix didn't until a couple of
days back. Knoppix doesn't have a root password and I think Gentoo
must not have one either. Just login as root and press enter.
Post by Ohmster
http://codeworks.gnomedia.com/archives/2005/general/lvm_recovery/
"3agBFX-D3N0-Bp3c-I7se-JVLY-ZIIa-fqMcIF" seqno = 1 status =
["RESIZEABLE", "READ", "WRITE"] extent_size = 65536 max_lv = 0 max_pv =
0
physical_volumes {
pv0 {
id = "v40FVM-IWMU-T26b-I9eD-UprZ-WNqu-a9MTGq" device = "/dev/hda2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 6074
}
}
recoverybox]#
Are you saying that this is a copy of your original FC3 when it was
/dev/hda? If true this is the one you should use to try and recreate as
the vgcfgrestore

I don't think it's the extent_size that matters only the pe_count
that matters. The pe_count for volgroup01 is larger than the pe_count for
volgroup00 which IMO the logical blocks (LE) and physical blocks (PE)
are different between vg00 (larger) and vg01 (smaller). So if by chance
you reset the PE to 6074 maybe you can recover your data.
Post by Ohmster
That is when the disk was in it's original contition as /dev/hda. It
does not list the logical volumes though. Neither does the file when it
was named as VolGroup01.
"Pu8j7l-2dEd-GhU7-tBAr-HDq7-r6OF-23O8Jo" seqno = 1 status =
["RESIZEABLE", "READ", "WRITE"] extent_size = 8192 max_lv = 0 max_pv = 0
physical_volumes {
pv0 {
id = "xE0F6K-q9r4-1K3o-iYuh-NlWc-9597-8WGobu" device = "/dev/hdb2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 48593
}
}
recoverybox]#
I don't really understand this stuff but it looks like there is a lot
extent_size = 65536
extent_size = 8192
I would hate to restore the drive to the condition it is already. I had
a lot of stuff on there and the way it is now, the disk shows as just
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free] PV
/dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free] Total: 2
[376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
ACTIVE '/dev/VolGroup00/LogVol00' [184.22 GB] inherit
ACTIVE
'/dev/VolGroup00/LogVol01' [1.94 GB] inherit
A backup would probably really save the day now, but the only place that
a backup might exist is on the disk itself. This fellow seems to have
--------------------------------------------------------------------- #
September 10th, 2006 at 6:23 pm
THANK YOU! After reading your solution I managed to recover my harddisk.
You need to backtrack the solution referred to by John in his post for
the HOWTO.
Post by Ohmster
I installed a new linux on a new disk and was planning to mount the old
one. I never heard of LVM and such and before long I had tried to run
vgcreate, pvcreate and lvcreate, rendering my old partition unmountable
: ( Additionaly I had no backup available of the old system, and was
therefore stuck.
The solution was to copy the old (unmountable) disk with “dd
if=/dev/hdb2 of=/backup/olddisk.bak.dd”. I then opened the binary file
in a editor, and to my surprise and joy, the partition information was
readable in the beginning. I managed to copy/paste a complete
backup-file (the one made when I run my first vgcreate) and use it with
vgcfgrestore.
What he did was copy the data blocks on /dev/hdb2 to a folder on another
drive called /backup as file olddisk.bak.dd In the begining of file
olddisk.bak.dd he found a copy of the partition information, etc.
Post by Ohmster
Hope someone else can benefit from this,
/John
http://blog.john.nu/
--------------------------------------------------------------------- "I
hope someone else can benefit from this." Too bad he did not go into any
details on exactly how he did it, like a howto or something like that. I
would be benefitting like a motherf*cker right about now but that is a
huge amount of blind work, to copy the entire disk to a file and then
edit it, with what? and then copy/paste a complete backup file, what
does that look like, exactly? ...ugh. This looks like the only way to
restore the drive and there are no details. The URL to John's website is
in some foreign language. :(
This is looking pretty grim, noi. I am starting to doubt if this drive
can be recovered by me or not. I will hang on to it, I am not in need of
the space right now and am willing to experiment, but this is really
starting to look pretty bad. Hey I really appreciate your hanging in
there but am running out of ideas on what do do. Man I had no idea that
this LVM stuff would kick my ass so darned bad. I was really doing
pretty good until this. I have some minor stuff backed up like my
httpd.conf file and I can use that I guess, recreate the users and then
try to make the wget lines again. So sad. Thanks buddy. (So much shit
down the toilet! ...sob.)
The FC3 drive is still good so until you format the drive you
can keep trying to recover the data. You can use the FC5, Gentoo or
Knoppix until you get the data back.
noi
2006-10-08 23:42:49 UTC
Permalink
Post by noi
Post by Ohmster
[snip]
Post by noi
Ok so the vg on hdb has been renamed and now we're hoping to recover
the
Post by noi
logical volume which should be logvol01?
Try that apt-get for Knoppix on the wiki to install LVM2 then you can
try mounting the LVM under Knoppix.
Well yeah. I downloaded the Gentoo Live CD because it has LVM2 support
built in.
http://www.gentoo.org/
I burned the CD and booted to it. Nice looking and all, it got me
online, but I will be dammed if I know how to work it. There is a boot
option for lvm support but once you boot, you are in a pretty xwindow
gnome desktop as user "gentoo". Not good for running lvm commands. I
found the terminal but what is the root password? Dammed if I know. That
would have been good too, booting to a live CD with LVM support. Still
not sure if I can save the drive, though. One fellow did it by using
pvcreate to recreate the physical volumes on his disk and then by
specifying the same name that they were originally. Said he got his
volumes back with all of the data intact. I don't know what the logical
volumes were named originally and do not have a back up as the new
system did not make any because the volume groups had the same name.
Dam.
Yeah I didn't know Gentoo had lvm2 and Knoppix didn't until a couple of
days back. Knoppix doesn't have a root password and I think Gentoo must
not have one either. Just login as root and press enter.
Post by Ohmster
http://codeworks.gnomedia.com/archives/2005/general/lvm_recovery/
"3agBFX-D3N0-Bp3c-I7se-JVLY-ZIIa-fqMcIF" seqno = 1 status =
["RESIZEABLE", "READ", "WRITE"] extent_size = 65536 max_lv = 0 max_pv =
0
physical_volumes {
pv0 {
id = "v40FVM-IWMU-T26b-I9eD-UprZ-WNqu-a9MTGq" device = "/dev/hda2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 6074
}
}
recoverybox]#
Are you saying that this is a copy of your original FC3 when it was
/dev/hda? If true this is the one you should use to try and recreate as
the vgcfgrestore
I don't think it's the extent_size that matters only the pe_count that
matters. The pe_count for volgroup01 is larger than the pe_count for
volgroup00 which IMO the logical blocks (LE) and physical blocks (PE) are
different between vg00 (larger) and vg01 (smaller). So if by chance you
reset the PE to 6074 maybe you can recover your data.
Not quite what I meant. These 2 work together to specify the
configuration of the physical volume, like cluster size of FAT32
partition. Larger size with smaller number of blocks vs
small extent size with larger number of blocks but both describe the
about the same size physical volume. Vgcfgrestore, mount, fsck, etc.

Another recovery story:
http://blog.herlo.org/2006/09/15/lvm-from-failure-to-recovery/
Post by noi
Post by Ohmster
That is when the disk was in it's original contition as /dev/hda. It
does not list the logical volumes though. Neither does the file when it
was named as VolGroup01.
"Pu8j7l-2dEd-GhU7-tBAr-HDq7-r6OF-23O8Jo" seqno = 1 status =
["RESIZEABLE", "READ", "WRITE"] extent_size = 8192 max_lv = 0 max_pv = 0
physical_volumes {
pv0 {
id = "xE0F6K-q9r4-1K3o-iYuh-NlWc-9597-8WGobu" device = "/dev/hdb2"
status = ["ALLOCATABLE"]
pe_start = 384
pe_count = 48593
}
}
recoverybox]#
I don't really understand this stuff but it looks like there is a lot
extent_size = 65536
extent_size = 8192
I would hate to restore the drive to the condition it is already. I had
a lot of stuff on there and the way it is now, the disk shows as just
PV /dev/hdb2 VG VolGroup01 lvm2 [189.82 GB / 189.82 GB free] PV
/dev/hda2 VG VolGroup00 lvm2 [186.19 GB / 32.00 MB free] Total: 2
[376.00 GB] / in use: 2 [376.00 GB] / in no VG: 0 [0 ]
ACTIVE '/dev/VolGroup00/LogVol00' [184.22 GB] inherit
ACTIVE
'/dev/VolGroup00/LogVol01' [1.94 GB] inherit
A backup would probably really save the day now, but the only place that
a backup might exist is on the disk itself. This fellow seems to have
--------------------------------------------------------------------- #
September 10th, 2006 at 6:23 pm
THANK YOU! After reading your solution I managed to recover my harddisk.
You need to backtrack the solution referred to by John in his post for the
HOWTO.
Post by Ohmster
I installed a new linux on a new disk and was planning to mount the old
one. I never heard of LVM and such and before long I had tried to run
vgcreate, pvcreate and lvcreate, rendering my old partition unmountable
: ( Additionaly I had no backup available of the old system, and was
therefore stuck.
The solution was to copy the old (unmountable) disk with “dd
if=/dev/hdb2 of=/backup/olddisk.bak.dd”. I then opened the binary file
in a editor, and to my surprise and joy, the partition information was
readable in the beginning. I managed to copy/paste a complete
backup-file (the one made when I run my first vgcreate) and use it with
vgcfgrestore.
What he did was copy the data blocks on /dev/hdb2 to a folder on another
drive called /backup as file olddisk.bak.dd In the begining of file
olddisk.bak.dd he found a copy of the partition information, etc.
Post by Ohmster
Hope someone else can benefit from this,
/John
http://blog.john.nu/
--------------------------------------------------------------------- "I
hope someone else can benefit from this." Too bad he did not go into any
details on exactly how he did it, like a howto or something like that. I
would be benefitting like a motherf*cker right about now but that is a
huge amount of blind work, to copy the entire disk to a file and then
edit it, with what? and then copy/paste a complete backup file, what
does that look like, exactly? ...ugh. This looks like the only way to
restore the drive and there are no details. The URL to John's website is
in some foreign language. :(
This is looking pretty grim, noi. I am starting to doubt if this drive
can be recovered by me or not. I will hang on to it, I am not in need of
the space right now and am willing to experiment, but this is really
starting to look pretty bad. Hey I really appreciate your hanging in
there but am running out of ideas on what do do. Man I had no idea that
this LVM stuff would kick my ass so darned bad. I was really doing
pretty good until this. I have some minor stuff backed up like my
httpd.conf file and I can use that I guess, recreate the users and then
try to make the wget lines again. So sad. Thanks buddy. (So much shit
down the toilet! ...sob.)
The FC3 drive is still good so until you format the drive you can keep
trying to recover the data. You can use the FC5, Gentoo or Knoppix until
you get the data back.
Ohmster
2006-10-09 00:41:49 UTC
Permalink
noi <***@siam.com> wrote in news:Z1gWg.20942$Ij.5578
@newssvr14.news.prodigy.com:
[snip]
Post by noi
Not quite what I meant. These 2 work together to specify the
configuration of the physical volume, like cluster size of FAT32
partition. Larger size with smaller number of blocks vs
small extent size with larger number of blocks but both describe the
about the same size physical volume. Vgcfgrestore, mount, fsck, etc.
http://blog.herlo.org/2006/09/15/lvm-from-failure-to-recovery/
[snip]

This story looks good. Lots of details that may be helpful. I will try to
do something using this URL. Thank you noi.
(God this is overwhelming, but I will try.)
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Ohmster
2006-10-09 03:25:37 UTC
Permalink
Post by noi
Not quite what I meant. These 2 work together to specify the
configuration of the physical volume, like cluster size of FAT32
partition. Larger size with smaller number of blocks vs
small extent size with larger number of blocks but both describe the
about the same size physical volume. Vgcfgrestore, mount, fsck, etc.
http://blog.herlo.org/2006/09/15/lvm-from-failure-to-recovery/
Oh that was it, that was it. That URL did the trick and I did it! Do you
hear me, I DID IT!

The drive is restored and I have all of my data back! Thank you so much
noi, I really could not have done this without you my friend. See new post
for details. Thanks again.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Ohmster
2006-10-04 01:12:47 UTC
Permalink
noi <***@siam.com> wrote in news:zzcUg.7769$***@newssvr29.news.prodigy.net:

[snip]
Post by Ohmster
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM
snip
Post by Ohmster
You know, knoppix might not be a bad idea. I will try it later, have
to go to work now.
Yeah but make sure you don't change file permissions, uids, gids on
either FC3 or FC5. Major headaches if that happens..
snip
Post by Ohmster
I hear ya.
snip
Post by Ohmster
Will try that when I get home later. Thanks for the advice.
You can see the hdb partitions using fdisk on FC5
Are you sure you can't mount the hdb2 now on FC5?
I mean case closed if you can mount FC3 on FC5
[***@ohmster mnt]# mount -t ext3 -o ro,defaults /dev/hdb2 /mnt/old_sys
mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
missing codepage or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

[***@ohmster mnt]#

No, it does not work.
Post by Ohmster
I didn't mention it first because using
$ vgextend volgroup /dev/hdb2
should have added FC3 as an extension to your FC5 volgroup
but you should be able to turn off lvm vgchange -an.
$ man vgchange
I do not know if all that will work because my current file system is
also LVM.

[***@ohmster mnt]# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
187117284 4303304 173155612 3% /
/dev/hda1 101086 14122 81745 15% /boot
tmpfs 777820 0 777820 0% /dev/shm
[***@ohmster mnt]#


I will try it though, as well as try knoppix to see if the disk will
mount. I think that webmin destroyed the FAT for the drive if there is
such a thing with LVM. What I did had not taken enough time to delete all
the files but now the files are no longer accessible. It may be time to
consider hard drive recovery now, even though fdisk says that the
partitions are intact and still as a LMV file system.

[***@ohmster mnt]# fdisk -l /dev/hdb

Disk /dev/hdb: 203.9 GB, 203928109056 bytes
255 heads, 63 sectors/track, 24792 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 24792 199037317+ 8e Linux LVM
[***@ohmster mnt]#
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Bit Twister
2006-10-04 01:27:06 UTC
Permalink
Post by Ohmster
mount: wrong fs type, bad option, bad superblock on /dev/hdb2,
Last chance attempt I would try
mount -t auto /dev/hdb2 /mnt/old_sys
Ohmster
2006-10-04 03:59:05 UTC
Permalink
Post by Bit Twister
Last chance attempt I would try
mount -t auto /dev/hdb2 /mnt/old_sys
[***@ohmster mnt]# mount -t auto /dev/hdb2 /mnt/old_sys
mount: you must specify the filesystem type
[***@ohmster mnt]#

Bit, I think that the FAT or whatever LVM uses to keep track of the files
got wiped when I messed around with webmin. I did boot the box with
knoppix and knoppix does try to mount all of your drives at read only.
When I got to hdb1, it mounted fine and you could see all the boot files.
When it got to hdb2, same crap, need to specify the file system type as
knoppix could not figure it out.

This is a real problem, I need to come up with some kind of linux disk
recovery tools to try and get that second partition restored. I did try
testdisk...

http://www.cgsecurity.org/wiki/TestDisk

And ran it on the hard drive. It finds both drives. I then choose hdb,
then specify the partition type, Intel. I get to choose to Analyze,
Advanced, Geometry, Options, MBR Code, Delete, Quit. I choose analyze and
then get to see the partitions.
---------------------------------------------------------------------
Disk /dev/hdb - 203 GB / 189 GiB - CHS 24792 255 63
Current partition structure:
Partition Start End Size in sectors
1 * Linux 0 1 1 12 254 63 208782 [/boot]
2 P Linux LVM 13 0 1 24791 254 63 398074635
---------------------------------------------------------------------
I pick partition 2. P meand Primary and can then proceed or save. I
proceed.
---------------------------------------------------------------------
TestDisk 6.4, Data Recovery Utility, June 2006
Christophe GRENIER <***@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdb - 203 GB / 189 GiB - CHS 24792 255 63
Partition Start End Size in sectors
* Linux 0 1 1 12 254 63 208782 [/boot]
P Linux LVM 13 0 1 24791 254 63 398074635

Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable P=Primary L=Logical E=Extended D=Deleted
Keys A: add partition, L: load backup, T: change type,
Enter: to continue
LVM2, 203 GB / 189 GiB
---------------------------------------------------------------------
I enter and get to Quit, Search, or Write.
---------------------------------------------------------------------
Disk /dev/hdb - 203 GB / 189 GiB - CHS 24792 255 63

Partition Start End Size in sectors
1 * Linux 0 1 1 12 254 63 208782 [/boot]
2 P Linux LVM 13 0 1 24791 254 63 398074635

[ Quit ] [Search! ] [ Write ]
Search deeper, try to find more partitions
---------------------------------------------------------------------
There are no more partitions, so I would write to the disk and make it
so.
---------------------------------------------------------------------
Write partition table, confirm ? (Y/N)


You will have to reboot for the change to take effect.
---------------------------------------------------------------------
I say okay, write, and find that I have to reboot for change to take
effect. I do, but nothing has changed, the disk seems to be just as it
was. No change that I can see has happened. I go back to webmin to look
at the logical drives, I see that group 00 is my FC5 disk and it contains
a physical volume, hda2, and two logical volumes, vol 00 and 01. 00 being
the boot partition and 01 being the rest of the drive.

I then look at group 01 (This used to also be named 00 but I was able to
change this with webmin to 01), it has a physical volume of hdb2. I see
that it has no logical volumes in it and if I want to, I can create a new
logical volume if I want. That is where my FC3 logical volumes used to
be. How can I get them back, all of my FC3 stuff is there!

That testdisk does not seem to do crap, or maybe it did, I need to see
the logical volumes that used to be written there. What kind of utility
can restore accidentally deleted linux logical volumes? This is like the
old DOS days when you lose your FAT, the files are still there but with
both copies of the file allocation table gone, it would appear to the
system that the entire drive is free and empty, even though it contains
files. This appears to be a similar situation. :(

Dammit, I should have not messed with it in webmin and then used knoppix
or some other utility to read the disk and copy it to some usable medium
instead of this Goddammed stupid LVM disk. :(
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Ohmster
2006-10-04 04:19:30 UTC
Permalink
Post by Ohmster
This is a real problem, I need to come up with some kind of linux disk
recovery tools to try and get that second partition restored. I did try
testdisk...
http://www.cgsecurity.org/wiki/TestDisk
This is interesting. I am still running testdisk on the drive and decided
to try advanced. In there I can change the file type (Will not be written
to the disk.) I choose linux, 83 instead of LVM 8e. The disk is scanning
now, not sure of what it is doing but it is going at it. See here:
---------------------------------------------------------------------
TestDisk 6.4, Data Recovery Utility, June 2006
Christophe GRENIER <***@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdb - 203 GB / 189 GiB - CHS 24792 255 63
Partition Start End Size in sectors
2 P Linux 13 0 1 24791 254 63 398074635


Search EXT2/EXT3 superblock 163210601/398074635 41%
Ext2 superblock found at sector 49154 (block=6144, blocksize=4096)

Stop
---------------------------------------------------------------------

Well it is at 51% now, let's see what it does. If it won't write this
change to disk, then what good is this I cannot tell you but it is going
at it now.

Well, here are the results.
---------------------------------------------------------------------
TestDisk 6.4, Data Recovery Utility, June 2006
Christophe GRENIER <***@cgsecurity.org>
http://www.cgsecurity.org

Disk /dev/hdb - 203 GB / 189 GiB - CHS 24792 255 63

Partition Start End Size in sectors
Linux 16 15 15 24537 126 52 393936896
superblock 0, blocksize=4096

[ Quit ]
Return to Advanced menu
---------------------------------------------------------------------
Exactly what good this is is beyond me. I still cannot get at my files,
nor is this filesytem type change permenent or written to disk. ...sigh.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi
2006-10-01 17:09:00 UTC
Permalink
snip
Well, I am learning about LVMs now. That was the default Fedora install, I
don't remember being asked if I wanted LVM or not. I just installed FC5
and took the default install and ended up with an LVM again. I think that
a serious problem is that both LVM volumes have the same name. I really
don't understand this stuff enough to get the volume mounted though.
Yeah the LVM stuff is tough
Post by noi
Could post lvdisplay, pvdisplay, fdisk -l /dev/hda and /dev/hdb ?
Sure. It is a bit difficult now as the new setup is not complete. I don't
have the domains setup, ssh is not setup, samba is not working yet, etc.,
so I think I can run those commands and catch the output, email that to
myself, then post them for you here. AT least I got my desktop terminals
back. FC5 does not even offer term windows in x anymore by default and I
went back to booting to run level 3 instead of run level 5 and starting x
with startx.
Can't you $ command 1> /tmp/out.txt && cat /tmp/out.txt ?
---------------------------------------------------------------------
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00 VG Name
VolGroup00
LV UUID AEkIRn-4p4I-pjo1-OI8I-GPGx-RUzf-K7iI9G LV Write
Access read/write
LV Status available
# open 1
LV Size 184.22 GB
Current LE 5895
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01 VG Name
VolGroup00
LV UUID ghCyjf-gFRp-qN2Z-QyBc-eEl3-TAO0-ReRTnz LV Write
Access read/write
LV Status available
# open 1
LV Size 1.94 GB
Current LE 62
Segments 1
Allocation inherit
Read ahead sectors 0
Block device 253:1
---------------------------------------------------------------------
--- Physical volume ---
PV Name /dev/hda2
VG Name VolGroup00
PV Size 186.19 GB / not usable 0 Allocatable yes
PE Size (KByte) 32768
Total PE 5958
Free PE 1
Allocated PE 5957
PV UUID 85v0Vl-MK33-Kbhl-mW22-kBhT-Uv6B-967SbT
---------------------------------------------------------------------
Disk /dev/hda: 200.0 GB, 200049647616 bytes 255 heads, 63 sectors/track,
24321 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux /dev/hda2
---------------------------------------------------------------------
Disk /dev/hdb: 203.9 GB, 203928109056 bytes 255 heads, 63 sectors/track,
24792 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux /dev/hdb2
--------------------------------------------------------------------- This
is freaking me out man. I really need to get the servers up and running
and all the rest of the stuff that is on the old FC3 disk drive. All the
configs are there and the old system will boot and run again if I pull the
IDE cable from the new drive and plug it back to the old drive as first in
line (Cable select method.). There has got to be some way to mount that
old system, I was googling and reading and someone else had this problem
and they figured that they could not mount the partition because the
volume group had the same name as the current volume group. That is the
situation that I have because I went with the default Fedora install.
If you don't want LVM in FC during install you have to go into the manual
partitioning menus, delete the LVM volgroup and voldisks, so you only see
the partitions you want. I have dual boot with XP and explorefs doesn't
work with LVM.
In x, there is an admin tool for Logical Volume Managment. It is graphical
and it shows my current volume groups as well as "Uninitialized Entries".
/dev/hdb1 and /dev/hdb2 are shown. The only thing that the application
will do for me is to "Initialize the Entry". If I try to do that, I get a
warning that "All data on disk entry /dev/hdb2 will be lost, continue?"
Hell no!
Please help me with this.
Assume you've backuped hdb and "do not run pvcreate".

I used this last year fooling around with LVLM.
http://www.tldp.org/HOWTO/LVM-HOWTO/index.html

The recipes in chapter 13 may be better suited for you, ie,
moving LVMs, replacing LVM.
http://www.tldp.org/HOWTO/LVM-HOWTO/recipes.html

AIU, you can mount /dev/hdb but not add it to the LVM on hda
read the manuals but as examples

Don't think /dev/hdb should be mounted when you do

$ vgextend /dev/VolGroup00_group /dev/hdb1

adds /dev/hdb1 to you logical volume group on hda
also because there is a lvgroup and partition on hdb "you don't run
pvcreate."
Ohmster
2006-10-01 18:04:03 UTC
Permalink
noi <***@siam.com> wrote in news:MCSTg.18578$***@newssvr14.news.prodigy.com:

[snip]
Post by noi
Post by Ohmster
Well, I am learning about LVMs now. That was the default Fedora
install, I don't remember being asked if I wanted LVM or not. I just
installed FC5 and took the default install and ended up with an LVM
again. I think that a serious problem is that both LVM volumes have
the same name. I really don't understand this stuff enough to get the
volume mounted though.
Yeah the LVM stuff is tough
No shit.
Post by noi
Post by Ohmster
Post by noi
Could post lvdisplay, pvdisplay, fdisk -l /dev/hda and /dev/hdb ?
Sure. It is a bit difficult now as the new setup is not complete. I
don't have the domains setup, ssh is not setup, samba is not working
yet, etc., so I think I can run those commands and catch the output,
email that to myself, then post them for you here. AT least I got my
desktop terminals back. FC5 does not even offer term windows in x
anymore by default and I went back to booting to run level 3 instead
of run level 5 and starting x with startx.
Can't you $ command 1> /tmp/out.txt && cat /tmp/out.txt ?
This results in a zero bit file called /tmp/out.txt.

[snip]
Post by noi
If you don't want LVM in FC during install you have to go into the
manual partitioning menus, delete the LVM volgroup and voldisks, so
you only see the partitions you want. I have dual boot with XP and
explorefs doesn't work with LVM.
Yeah I think so. I might have to reinstall FC5 with advanced options and
choose not to use LVM if possible.
Post by noi
Post by Ohmster
In x, there is an admin tool for Logical Volume Managment. It is
graphical and it shows my current volume groups as well as
"Uninitialized Entries". /dev/hdb1 and /dev/hdb2 are shown. The only
thing that the application will do for me is to "Initialize the
Entry". If I try to do that, I get a warning that "All data on disk
entry /dev/hdb2 will be lost, continue?" Hell no!
Please help me with this.
Assume you've backuped hdb and "do not run pvcreate".
I used this last year fooling around with LVLM.
http://www.tldp.org/HOWTO/LVM-HOWTO/index.html
I have that bookmarked now.
Post by noi
The recipes in chapter 13 may be better suited for you, ie,
moving LVMs, replacing LVM.
http://www.tldp.org/HOWTO/LVM-HOWTO/recipes.html
I don't know, that may help. It is worth a try.
Post by noi
AIU, you can mount /dev/hdb but not add it to the LVM on hda
read the manuals but as examples
Don't think /dev/hdb should be mounted when you do
$ vgextend /dev/VolGroup00_group /dev/hdb1
adds /dev/hdb1 to you logical volume group on hda
also because there is a lvgroup and partition on hdb "you don't run
pvcreate."
I don't really understand the above in what you are saying but am trying to
learn it. Thanks for your help noi.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
noi <***@siam.com> wrote in news:MCSTg.18578$***@newssvr14.news.prodigy.com:

[snip]
Post by noi
Post by Ohmster
Well, I am learning about LVMs now. That was the default Fedora
install, I don't remember being asked if I wanted LVM or not. I just
installed FC5 and took the default install and ended up with an LVM
again. I think that a serious problem is that both LVM volumes have
the same name. I really don't understand this stuff enough to get the
volume mounted though.
Yeah the LVM stuff is tough
No shit.
Post by noi
Post by Ohmster
Post by noi
Could post lvdisplay, pvdisplay, fdisk -l /dev/hda and /dev/hdb ?
Sure. It is a bit difficult now as the new setup is not complete. I
don't have the domains setup, ssh is not setup, samba is not working
yet, etc., so I think I can run those commands and catch the output,
email that to myself, then post them for you here. AT least I got my
desktop terminals back. FC5 does not even offer term windows in x
anymore by default and I went back to booting to run level 3 instead
of run level 5 and starting x with startx.
Can't you $ command 1> /tmp/out.txt && cat /tmp/out.txt ?
This results in a zero bit file called /tmp/out.txt.

[snip]
Post by noi
If you don't want LVM in FC during install you have to go into the
manual partitioning menus, delete the LVM volgroup and voldisks, so
you only see the partitions you want. I have dual boot with XP and
explorefs doesn't work with LVM.
Yeah I think so. I might have to reinstall FC5 with advanced options and
choose not to use LVM if possible.
Post by noi
Post by Ohmster
In x, there is an admin tool for Logical Volume Managment. It is
graphical and it shows my current volume groups as well as
"Uninitialized Entries". /dev/hdb1 and /dev/hdb2 are shown. The only
thing that the application will do for me is to "Initialize the
Entry". If I try to do that, I get a warning that "All data on disk
entry /dev/hdb2 will be lost, continue?" Hell no!
Please help me with this.
Assume you've backuped hdb and "do not run pvcreate".
I used this last year fooling around with LVLM.
http://www.tldp.org/HOWTO/LVM-HOWTO/index.html
I have that bookmarked now.
Post by noi
The recipes in chapter 13 may be better suited for you, ie,
moving LVMs, replacing LVM.
http://www.tldp.org/HOWTO/LVM-HOWTO/recipes.html
I don't know, that may help. It is worth a try.
Post by noi
AIU, you can mount /dev/hdb but not add it to the LVM on hda
read the manuals but as examples
Don't think /dev/hdb should be mounted when you do
$ vgextend /dev/VolGroup00_group /dev/hdb1
adds /dev/hdb1 to you logical volume group on hda
also because there is a lvgroup and partition on hdb "you don't run
pvcreate."
I don't really understand the above in what you are saying but am trying to
learn it. Thanks for your help noi.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
J.O. Aho
2006-10-01 18:34:02 UTC
Permalink
Post by Ohmster
Post by noi
$ vgextend /dev/VolGroup00_group /dev/hdb1
adds /dev/hdb1 to you logical volume group on hda
also because there is a lvgroup and partition on hdb "you don't run
pvcreate."
I don't really understand the above in what you are saying but am trying to
learn it. Thanks for your help noi.
He wants you to add the FC3 LVM to your FC5 LVM volume group, I would advice
against this before you have rescued the data you want to keep and cleaned the
hard drive of data, as there could be risk with double data and you won't know
which file be used, the one from FC3 or FC5 and your system could fail badly.


//Aho
Ohmster
2006-10-01 19:53:38 UTC
Permalink
Post by J.O. Aho
He wants you to add the FC3 LVM to your FC5 LVM volume group, I would
advice against this before you have rescued the data you want to keep
and cleaned the hard drive of data, as there could be risk with double
data and you won't know which file be used, the one from FC3 or FC5
and your system could fail badly.
Agreed. Thank you.
--
~Ohmster
theohmster at comcast dot net
Put "messageforohmster" in message body
to pass my spam filter.
Loading...