NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: replacing a failed RAID component



On Sat, 7 Nov 2009, Steven Bellovin wrote:
On Sat, 7 Nov 2009, Steven Bellovin wrote:
I'm using RAIDFRAME in a RAID 1 configuration. One of the disks has failed and needs to be replaced; the question is how, precisely, I do it. More specifically, how do I prepare the new disk? My assumption is that I have to set up the proper fdisk label (including the boot block); I then have to use disklabel to make the 'e' partition of type RAID. The last thing I should do is use 'raidctl -R' to reconstruct the RAID set.

Do I need to do anything else? Do I need to do something to initialize the replacement disk's RAID stuff?

A cheap hack is to use dd to copy the first few sectors (i.e. including mbr code, fdisk partition table and diskabel) from one disk to the other.

Then use raidctl -a, raidctl -F, etc. to rebuild the array.

-a and -F? I was assuming I could just do -R. I confess that I'm quite unclear about the difference here.

-R fails a component (if necessary) and rebuilds back onto that component. -a adds a hot spare and then -F fails a component and rebuilds onto the hot spare. Chances are your components are currently something like /dev/wd0e and component1, you would need to add /dev/wd1e and then fail component1. You couldn't just use -R on the failed component as the new disk won't have the component label on it at boot time.

--
Stephen



Home | Main Index | Thread Index | Old Index