From: Xavier Nicollet <nicollet@jeru.org>
To: linux-raid@vger.kernel.org
Subject: --detail --test exit status
Date: Wed, 29 Jun 2016 23:19:22 +0200 [thread overview]
Message-ID: <20160629211922.GE18087@jeru.org> (raw)
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
reply other threads:[~2016-06-29 21:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160629211922.GE18087@jeru.org \
--to=nicollet@jeru.org \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).