LinHES Forums
http://forum.linhes.org/

Formatted 1 drive in 2 drive LVM group and recovered!
http://forum.linhes.org/viewtopic.php?f=3&t=16797
Page 1 of 1

Author:  cecil [ Sun Sep 30, 2007 3:03 pm ]
Post subject:  Formatted 1 drive in 2 drive LVM group and recovered!

It was late at night... I was working on improves and I'd put a pitcher of margarita away. I should have probably gone to bed. But it drives me crazy when something doesn't work and I wanted to resolve the problem. So, I took my new ISO and did an auto upgrade (or so I thought) on my SBE. A reboot later, I went to recreate_lvm.sh only to have it complain about not being able to find a drive w/ UUID abcd-efgh-blah-blah-blah. What?! What happened? Was it my new kernel? No, it cannot be... What is going on?!

I checked /home/mythtv/ for .upgrade only to find it didn't exist. Then I checked for .configure. OH NO! Actually, I used 4 other letters. What to do, what to do?

Well, I search and found this. The problem was I didn't have a restore file. So, I figured what would happen if I did this:
Code:
pvcreate --uuid "<some_long_string>"  /dev/hda3
? The long string I got when I tried to recreate the volume. I ran recreate again and I got my volume back! I tried mounting it, but it wouldn't mount. More searching...

I than came across this! I read it and decided to try to fsck the volume, so off I went...
Code:
fsck.ext3 -y /dev/vg/myth
As the volume is almost 900 gigs, off I went to sleep. I woke up the next morning and mounted the volume. It mounted! I did an ls of /myth and I had lost+found. I did an ls of lost+found and saw:
Quote:
root@sbe:/home/mythtv# ls /myth/lost+found/
#130401 #130497 #130593 #133473 #139233 #180961 #4001
#130433 #130529 #130625 #133729 #153665 #206753 #6817
#130465 #130561 #130817 #136385 #156321 #206849


I looked through the directories and saw my data! But was it all there? I did a df -h and sure enough, it reported what I expected. So, I then went back to the configuration terminal and finished the configuration. After this was done, I existed mythfrontend. I figured out which directory contained what and moved it from lost+found/#6817 (for instance) to /myth/video and so on and so forth. Despite formatting a large chuck of my volume group and I was to recover! Nice!

Author:  tjc [ Sun Sep 30, 2007 7:48 pm ]
Post subject: 

I thought you were supposed to save the scary ghost stories for Halloween... :shock: Now I'm going to be up half the night wondering if my personal backup procedures are good enough... :(

Author:  mjl [ Mon Oct 01, 2007 10:08 am ]
Post subject: 

Hi,

That would send most folks back for the SECOND pitcher of margaritas!

Glad you were able to recover :)
Mike

Author:  Dale [ Mon Oct 01, 2007 3:56 pm ]
Post subject: 

Indeed, great work, Cecil.

Author:  cecil [ Mon Oct 01, 2007 10:21 pm ]
Post subject: 

Thanks! If I was going to head back, it would have been for the bottle and shot glass.

Author:  kmkittre [ Wed Oct 10, 2007 11:09 am ]
Post subject: 

Great success story. I've had some headaches with LVM...

I find the beginning of your story funny as well. I find myself in the same situation so many times. It's late at night, I've finished off a six pack, and something isn't working right. I will bang my head against it for hours trying to fix a problem. The really frustrating part is when I finally give up and when I wake up the next morning I find a silly mistake that likely would not have gone missed if I wasn't tired/inebriated...

Late nights and technology don't mix ;-)

Except for when you solve the problem that night, damn that feels good...

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/