On Tue Sep 04, 2012 at 02:26:24PM +0200, Mikael Abrahamsson wrote: > On Tue, 4 Sep 2012, David Brown wrote: > > > The "raid1" copy you mention will one day be possible with "hot replace" > > <http://neil.brown.name/blog/20110216044002#2> > > > > I don't know how far along this idea is at the moment. > > https://lwn.net/Articles/465048/ > > "hot-replace support for RAID4/5/6: > > In order to activate hot-replace you need to mark the device as > 'replaceable'. This happens automatically when a write error is recorded > in a bad-block log (if you happen to have one). > > It can be achieved manually by > echo replaceable > /sys/block/mdXX/md/dev-YYY/state > > This makes YYY, in XX, replaceable." > > I don't know if it actually made it into 3.2, I believe I saw somewhere > that it was available for 3.3, but Neil Brown should know more. > I'm currently upgrading my RAID-6 arrays via hot-replacement. The process I followed (to replace device YYY in array mdXX) is: - add the new disk to the array as a spare - echo want_replacement > /sys/block/mdXX/md/dev-YYY/state That kicks off the recovery (a straight disk-to-disk copy from YYY to the new disk). After the rebuild is complete, YYY gets failed in the array, so can be safely removed: - mdadm -r /dev/mdXX /dev/mdYYY That's worked fine so far, and looks to run at the single disk write speed. There were no errors on the old disks though, so I've not seen how that gets handled (it _should_ just do a parity-based recovery from the remaining disks and continue). Cheers, Robin -- ___ ( ' } | Robin Hill <robin@xxxxxxxxxxxxxxx> | / / ) | Little Jim says .... | // !! | "He fallen in de water !!" |
Attachment:
pgpALvoXDn12h.pgp
Description: PGP signature