md: re-add a failed disk
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Tue, 14 Apr 2015 15:45:22 +0000 (10:45 -0500)
committerNeilBrown <neilb@suse.de>
Tue, 21 Apr 2015 21:59:39 +0000 (07:59 +1000)
commita6da4ef85cef0382244fc588c901e133a2ec5109
treeed620e13534f9d28d93cf7650d123c9bd68f70b8
parent88bcfef7be513e8bf5448e0025330fdd97c4c708
md: re-add a failed disk

This adds the capability of re-adding a failed disk by
writing "re-add" to /sys/block/mdXX/md/dev-YYY/state.

This facilitates adding disks which have encountered a temporary
error such as a network disconnection/hiccup in an iSCSI device,
or a SAN cable disconnection which has been restored. In such
a situation, you do not need to remove and re-add the device.
Writing re-add to the failed device's state would add it again
to the array and perform the recovery of only the blocks which
were written after the device failed.

This works for generic md, and is not related to clustering. However,
this patch is to ease re-add operations listed above in clustering
environments.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c