PDA

View Full Version : Fixing erorrs related to not being able to find LVM group - How to mount a lost LVM



blainehilton
18th August 2008, 12:57 PM
I've had a basic file server that has been working well, however now I can not get it to boot, it tells me:


Red Hat nash version 4.2.15 starting

reading all physical volumes. This may take a while
Couldn't find device with uuid 'a9sKLH-92FF-F2pi-cdJK-Glmk-uEHi-PC2gG8'
Couldn't find all physical volumes for volume group VolGroup00.
couldn't find device with uuid 'a9sKLH-92FF-F2pi-cdJK-Glmk-uEHi-PC2gG8'.
Couldn't find all physical volumes for volume group VolGroup00.
Volume group "VolGroup00" not found
Error: /bin/lvm exited abnormally with value 5 ! (pid 497)
Couldn't find device with uuid 'a9sKLH-92FF-F2pi-cdJK-Glmk-uEHi-PC2gG8'
Couldn't find all physical volumes for volume group VolGroup00.
couldn't find device with uuid 'a9sKLH-92FF-F2pi-cdJK-Glmk-uEHi-PC2gG8'.
Couldn't find all physical volumes for volume group VolGroup00.
Volume group "VolGroup00" not found
Error: /bin/lvm exited abnormally with value 5 ! (pid 501)

mount: error 6 mounting ext3
ERROR opening /dev/console!!!!: 2
error dup2'ing fd of 0 to 0
error dup2'ing fd of 0 to 1
error dup2'ing fd of 0 to 2
switchroot: mount failed: 22
Kernel panic - not syncing: Attempted to kill init!



How do I get this resolved?

I have a backup, but it is a bit outdated and I could really use the information since the last backup, so I need to recover the data which is the most important thing. There are some mySQL databases, as well as a couple of subversion repositories that I would at least like to recover the latest version of. Ideally though someone can walk me through running a couple of commands and having the system work as it did yesterday.

I've tried using the SystemRestore CD with the TestDrive utility and it says the LVM partition is there and is ok.

It is an older Fedora Core 2 system.


We moved offices and its not booting now, thats the only change. We didn't even move far, it was less then a 10 minute car drive.

I don't think the disk failed. How would I check?

I downloaded the restore CD at http://www.sysresccd.org/, I do not have the original media any more. This is a Fedora Core 2 install I believe. I thought I could try the TestDisk
(http://www.cgsecurity.org/wiki/TestDisk) utility to repair it, but it looks like it is good, so I just quit it without making any changes.

I'm not very familiar at all with LVM, so I really have no clue what to do, can you walk me through how to try mounting LVM? I can get to a full command prompt using that sysresccd.org CD

One thought I had is that it may have been turned off without being shutdown. The server runs without a monitor usually and I did a "shutdown -h now" by SSH and waited a little while and then powered off.


There are two drives, although the one was added recently and never actually used. The LVM is just on the one drive (I believe).

The BIOS does see both drives

When I am in the command prompt with the restore CD and I run a "vgdisplay" I get the same type of errors:

Couldn't find device with uuid 'a9sKLH-92FF-F2pi-cdJK-Glmk-uEHi-PC2gG8'
Couldn't find all physical volumes for volume group VolGroup00.
couldn't find device with uuid 'a9sKLH-92FF-F2pi-cdJK-Glmk-uEHi-PC2gG8'.
Couldn't find all physical volumes for volume group VolGroup00.



A couple of months ago I was running out of disk space and added the new hard drive (Drive 2), although I did not know how to grow the LVM to go onto the new hard drive as well, so I just kind of left it and started moving to a newer/faster/larger capacity server.

There were still some databases though on this old server that were not moved. Big mistake I see now.

What I'm thinking though is I probably have not powered down the server since then. It's on a battery backup and is rock solid stable for me. So this is really the first time rebooting it, even though it was installed months ago.

I can't quite remember what I did after installing the new drive. I believe I tried creating a new volume group, or might have tried growing the 00 one, or moving it?

I'm not sure where to go from here. I've been reading and learning quite abit about LVM now.

Some commands I'm considering trying, but don't fully understand include:

vgreduce --removemissing
pvscan --partial
lvm --partial
vgreduce
e2fsck -f /dev/VolGroup00/LogVol00 (From http://dailypackage.fedorabook.com/index.php?/archives/159-System-Recovery-Week-Using-LVM-In-Rescue-Mode.html )





Lastly I am also asking about this at Experts Exchange with 500 points on the line if anyone can help and is a part of that system you can post at http://www.experts-exchange.com/OS/Linux/Distributions/Red_Hat/Q_23655122.html#a22250858.


Thanks in advance. Any help is greatly appreciated.

glennzo
18th August 2008, 01:18 PM
Just a suggestion as I have little knowledge of the LVM scheme. I've been playing around with a spare Fedora 9 box just to learn a little, very little up to this point. Even though you say you think that this is a Fedora Core 2 machine, how about downloading the Fedora 8 or 9 rescue CD and booting rescue mode with it. Maybe a Fedora 8 or 9 Live CD may be helpful? Anyhow, boot rescue mode then when you reach the prompt, sh-3.2# try chroot /mnt/sysimage and then lvscan. I'm not telling you that this will fix your errors but at least it may enable you to take a different path away from this dark road that you are now on. One step at a time.

blainehilton
18th August 2008, 02:06 PM
Thank you for your quick respone glennzo. I am downloading the Fedora 9 DVD right now and should have it in 3 hours.

I'm going to try to boot with the restore CD though and that gives me a command line, perhaps then I can do the chroot /mnt/sysimage and then lvscan

glennzo
18th August 2008, 02:16 PM
Good. Keep in mind that this may well be the blind leading the blind if you know what I mean. Although the level of Linux help here is superior to most other forums there doesn't seem to be many users here that know much about LVM so I guess I'll be learning something right along side of you. Only difference is that if my spare box explodes I can just throw it out the window. You, on the other hand, can't.

blainehilton
18th August 2008, 05:52 PM
Okay, some success!

I was able to find the Fedora Core 2 Rescure CD on the Internet and boot into it and see the files!

Now I am going to rsync it over to a different computer.

The biggest question that remains for me right now though, is I have a bunch of mySQL databases that I want to copy over as well, how do I do that if the mysql database is off? Or do I need to start up the mySQL server daemon first?


After I get the backups made I will try lvscan