• Goldwyn Rodrigues's avatar
    md: re-add a failed disk · a6da4ef8
    Goldwyn Rodrigues authored
    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: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
    Signed-off-by: default avatarNeilBrown <neilb@suse.de>
    a6da4ef8
md.c 232 KB