--detail --test exit status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I've hit the same problem as this one:
https://www.mail-archive.com/linux-raid@xxxxxxxxxxxxxxx/msg06567.html

Basically with raid1 "mdadm --detail --test /dev/md0" returns 0 even if
only one drive is still alive.

I think it's coming from the enough() function from util.c:

int enough(int level, int raid_disks, int layout, int clean, char
*avail)

/.../
 case 1:
                 return avail_disks >= 1;
/.../

It's called from Detail.c:
       if (c->test && !enough(array.level, array.raid_disks, array.layout,
		1, avail))
			rv = 2;

I think each time we print DEGRADED or FAILED, we should modify rv
accordingly.

I am missing something?

-- 
Xavier Nicollet
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux