* --detail --test exit status
@ 2016-06-29 21:19 Xavier Nicollet
0 siblings, 0 replies; only message in thread
From: Xavier Nicollet @ 2016-06-29 21:19 UTC (permalink / raw)
To: linux-raid
Hi,
I've hit the same problem as this one:
https://www.mail-archive.com/linux-raid@vger.kernel.org/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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-06-29 21:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-29 21:19 --detail --test exit status Xavier Nicollet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).