Re: Safe disk replace

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

 



On Tue, Sep 04, 2012 at 04:33:42PM +0100, Robin Hill wrote:
> 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).

Thanks all, this is exactly what I was looking for!

Cheers,

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux