]> git.ipfire.org Git - thirdparty/mdadm.git/commit
Detail: Report state of FAILED when an array has too few devices to work.
authorNeilBrown <neilb@suse.de>
Fri, 29 Jan 2010 04:45:36 +0000 (15:45 +1100)
committerNeilBrown <neilb@suse.de>
Fri, 29 Jan 2010 04:46:23 +0000 (15:46 +1100)
commitd998adc316299efc44cb6e70ecc2e04bffb76d17
treed1dd39b203d2af87adb1b3df5081a8da09f4e22d
parenta1331cc4068d4c0723dd46f3a170ed100adba000
Detail:  Report state of FAILED when an array has too few devices to work.

We already have a call to 'enough' in Detail which is the check for
"do we have enough devices".  We just need to calculate the required
data a bit earlier, then use the same 'enough' call to possibly
print FAILED.

This is motivated by Debian bug 495755.
The other request in that bug is not practical.

    It would be very nice if output of `mdadm' is more clear in case of a
    broken array.

    Currently the only hint you get from `mdadm' that your array is broken
    is this:

    # mdadm -A /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1
    mdadm: /dev/md0 assembled from 1 drive and 3 spares - not enough to start the
    array.

    It could say something like `Your array is broken, you can't use it anymore'

It is not valid to report that array as 'broken' if the user hasn't
listed all the devices, which could be the case here.

Resolves-Debian-Bug: 495755
Signed-off-by: NeilBrown <neilb@suse.de>
Detail.c