diff options
author | BingJing Chang <bingjingc@synology.com> | 2018-06-28 18:40:11 +0800 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2018-06-28 13:04:49 -0700 |
commit | bda3153998f3eb2cafa4a6311971143628eacdbc (patch) | |
tree | 3173d0034e81cd77c4f55bc929bec4d1eb5a0250 /net/l2tp | |
parent | bfc9dfdcb6e9493de5d4fe0d3ed3ce57672f8d07 (diff) | |
download | talos-obmc-linux-bda3153998f3eb2cafa4a6311971143628eacdbc.tar.gz talos-obmc-linux-bda3153998f3eb2cafa4a6311971143628eacdbc.zip |
md/raid10: fix that replacement cannot complete recovery after reassemble
During assemble, the spare marked for replacement is not checked.
conf->fullsync cannot be updated to be 1. As a result, recovery will
treat it as a clean array. All recovering sectors are skipped. Original
device is replaced with the not-recovered spare.
mdadm -C /dev/md0 -l10 -n4 -pn2 /dev/loop[0123]
mdadm /dev/md0 -a /dev/loop4
mdadm /dev/md0 --replace /dev/loop0
mdadm -S /dev/md0 # stop array during recovery
mdadm -A /dev/md0 /dev/loop[01234]
After reassemble, you can see recovery go on, but it completes
immediately. In fact, recovery is not actually processed.
To solve this problem, we just add the missing logics for replacment
spares. (In raid1.c or raid5.c, they have already been checked.)
Reported-by: Alex Chen <alexchen@synology.com>
Reviewed-by: Alex Wu <alexwu@synology.com>
Reviewed-by: Chung-Chiang Cheng <cccheng@synology.com>
Signed-off-by: BingJing Chang <bingjingc@synology.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'net/l2tp')
0 files changed, 0 insertions, 0 deletions