LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Recovering data on RAID 5 with semi-faulty hdd (http://www.linuxquestions.org/questions/linux-hardware-18/recovering-data-on-raid-5-with-semi-faulty-hdd-483678/)

davidsaxton 09-15-2006 04:26 AM

Recovering data on RAID 5 with semi-faulty hdd
 
Hi everyone!

I have a raid 5 array from /dev/sd[abcd], with one redundant disc. After my computer crashed, I found the raid array being rebuilt for /dev/sdc.

However, about three-quarters the way through the rebuilding process (as determined by /proc/mdstat), I start getting kernel hdd errors from /dev/sdd, and the rebuilding process stops. This happens consistently (after restarting the computer).

I can mount the raid device, and all of my data appears usable - the errors on /dev/sdd only appear to occur when rebuilding the array. I intend to buy a new harddisk to replace /dev/sdd, and obviously I want to keep the data from the raid device. However, I do not know how best to replace /dev/sdd. I cannot simply swap out /dev/sdd with the new disk, since the raid array is not built on /dev/sdc and I cannot rebuild the array from only two discs.

Any ideas on how to keep my data? Should I attempt to mirror bit-for-bit the data on /dev/sdd to a new drive, while skipping faulty parts? (if so, how?). Or can I tell mdadm to skip the bad parts of /dev/hdd?

gdmellott 09-16-2006 01:50 PM

Recovering data on RAID 5 with semi-faulty hdd
 
I suspect the security/safety features are getting in the way of what should be a viable endeavor. (I wish such things could be turned off with a password or the likes). Anyway, I suspect the only way to get the data off is to mount the array as is is. (You say the data is still there. [Two drives in RAID 5 should have it all in it, if three was the active drive count. It is basically a RAID 0 with one extra drive holding a parity checking bit to allow recovery of one lost drive.]) And simply copy it over to another RAID array either on that machine over a network. Otherwise, one might copy to a non-redundant file system (poss. though a USB port). Personally, I lean to LINUX's software RAID 1 arrays. They are a lot happier working alone if nothing else. You just use a lot of drive going that route.

Sincerely,

Gregory D. MELLOTT

davidsaxton 09-16-2006 03:45 PM

Quote:

Originally Posted by gdmellott
And simply copy it over to another RAID array either on that machine over a network. Otherwise, one might copy to a non-redundant file system (poss. though a USB port).

Thanks for the suggestion, but unfortunately I don't have enough spare space to copy all the data (about 600GB) from the raid device. (Still though, the important data is backed up).

Nonetheless, a new harddrive has been bought, and that should be arriving in a few days. Hopefully, "ddrescue" should be able to copy most of the data from the failing harddrive, and then I can plug the new harddrive into the array instead. I think that this is my best/only option.


All times are GMT -5. The time now is 06:58 PM.