LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 08-22-2008, 11:31 AM   #1
megamojo
LQ Newbie
 
Registered: Aug 2008
Location: Des Moines, IA
Distribution: Slackware
Posts: 5

Rep: Reputation: 1
Recover LVM VG after hardware failure


I recently installed LVM2 to my slackware 10.2 machine and converted several stand-alone drives into a 3TB volume group (VG) and a couple logical volumes (LVs). As my luck would have it, one of the drives somehow developed bad sectors a few days later, and it's looking like it's not salvageable in the least. The drive in question is a 250GB Seagate IDE drive and I've run spinrite on it overnight and it's only made it through a couple of MB's, saying that several sectors are completely un-recoverable. The drive in question is hanging off a simple pci card. The card can do simple RAID 0/1 but I'm just using the drives as stand-alone. I moved this drive to the main IDE controller on the mobo so spinrite would have direct access to the SMART info on the drive, but spinrite said the drive was blank and nothing could be done with it. I moved it back to the card and spinrite could see and work on it, though not very well as I mentioned above. I can live without the 250 GB of data on that drive, but how do I recover the rest of the VG? Note that my system drive containing /, /boot, /home, etc. is a completely separate physical drive not in the VG, so getting into the system is not a problem. The last time I booted i got several "0x40 uncorrectable error" messages about the harddrive, but eventually it said XFS recovery complete and successfully activated the VG and mounted the LVs. At this point I thought things were looking up, so I booted the spinrite CD to take a look. As I mentioned above, the spinrite results are not encouraging. Should I just boot again, wait for the filesystem recovery to finish, and then attempt a pvmove operation to pull any data I can off the bad drive? I do have enough free physical extents (PEs) left in the VG to cover the bad drive, and I also have an unused identical drive I could swap in. Would it be better to do a dd from the bad drive to the spare I have and then somehow use uuidfixer or other tools to swap the bad drive with the spare in my VG? As I said, my main interest is in getting the VG working, without losing a couple TB worth of data. If I can also recover the 250 GB off the bad drive, that would just be icing on the cake.

This is my first post so I apologize if I posted in the wrong forum.
 
Old 08-23-2008, 12:42 AM   #2
megamojo
LQ Newbie
 
Registered: Aug 2008
Location: Des Moines, IA
Distribution: Slackware
Posts: 5

Original Poster
Rep: Reputation: 1
For those of you interested, I followed the instructions on this page under the "Disk Permanently Removed" section and they worked just perfectly.
http://www.novell.com/coolsolutions/appnote/19386.html

Having google for possible recovery options before setting this whole thing up, and then in a panic when I actually needed the recovery, I was very dissapointed in google and the internet for not having much on the subject. The only way I found these instructions was first trying my pvmove idea (which was a spectacular failure as pretty much none of the data could be read off the bad drive) and then googling the resulting error messages. I found that page pretty easily in the search results, followed the instructions, and had my volume group happily working within about 5 minutes. I did lose some data (although I haven't really noticed much missing), but I most certainly did not lose the entire 2 TB of the volume group, so those instructions were a real life saver. Hopefully this thread will hang around for a while and show up in google searches for other people and save them the frustration I had to go through.

Mods, please move this to the appropriate forum section is this is not it.
Thanks all,
Matt
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Messed up an LVM - is there a way to recover? BrianK Linux - General 3 05-09-2007 07:45 PM
HD Failure and LVM, how much can I recover? vaaccess Linux - Hardware 10 01-12-2007 02:12 AM
HD Failure in LVM - What can I recover? vaaccess Linux - General 1 01-05-2007 02:22 PM
How to recover LVM asheesh.tyagi Linux - Newbie 1 05-27-2006 10:22 AM
Need to recover data from a LVM volume deyv Linux - General 13 07-25-2005 06:43 PM


All times are GMT -5. The time now is 03:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration