]> git.ipfire.org Git - thirdparty/mdadm.git/commit - monitor.c
FIX: imsm: Rebuild does not start on second failed disk
authorKrzysztof Wojcik <krzysztof.wojcik@intel.com>
Wed, 23 Mar 2011 15:04:20 +0000 (16:04 +0100)
committerNeilBrown <neilb@suse.de>
Wed, 23 Mar 2011 23:10:56 +0000 (10:10 +1100)
commit3a5d04735bf36af7fdbca9e516472e14fb80d803
tree604fc0e536f87bf33a7587a5e0f16fbdce7225a5
parenta28232b83f0f78898220c403600f6c2b1e51bdde
FIX: imsm: Rebuild does not start on second failed disk

Problem:
If we have an array with two failed disks and the array is in degraded
state (now it is possible only for raid10 with 2 degraded mirrors) and
we have two spare devices in the container, recovery process should be
triggered on booth failed disks. It does not.
Recovery is triggered only for first failed disk.
Second failed disk remains unchanged although the spare drive exists
in the container and is ready to recovery.

Root cause:
mdmon does not check if the array is degraded after recovery of first
drive is completed.

Resolution:
Check if current number of disks in the array equals target number of disks.
If not, trigger degradation check and then recovery process.

Signed-off-by: Krzysztof Wojcik <krzysztof.wojcik@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
monitor.c