Assemble: avoid a consistency check when --force is given.
mdadm will normally not include a device into an array if that device reports that the "best" device has failed, as this normally implies some sort of inconsistency. However when --force is given it means that the given drives really should be assembled if at all possible so in that case the test should be avoided. The particular case where this was a problem was a RAID5 were all devices had the same event count but three of them reported that the first two had failed. As they all had the same event count the first was taken as the 'best' and that caused the later ones to be excluded. Listing one of the later ones first allowed the array to be assembled. So in this case the test clearly just got in the way and did nothing useful. Reported-by: "Marek Jaros" <mjaros1@nbox.cz> Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
parent
8f0ac9d793
commit
eb20ecf101
|
@ -1472,7 +1472,7 @@ try_again:
|
|||
/* If this device thinks that 'most_recent' has failed, then
|
||||
* we must reject this device.
|
||||
*/
|
||||
if (j != most_recent &&
|
||||
if (j != most_recent && !c->force &&
|
||||
content->array.raid_disks > 0 &&
|
||||
devices[most_recent].i.disk.raid_disk >= 0 &&
|
||||
devmap[j * content->array.raid_disks + devices[most_recent].i.disk.raid_disk] == 0) {
|
||||
|
|
Loading…
Reference in New Issue