Recovering data on RAID 5 with semi-faulty hdd
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?