linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xiao Ni <xni@redhat.com>
To: linux-raid@vger.kernel.org
Cc: jes.sorensen@gmail.com
Subject: [MDADM PATCH] A sanity check for missing device
Date: Fri,  2 Feb 2018 11:57:38 +0800	[thread overview]
Message-ID: <1517543858-6937-1-git-send-email-xni@redhat.com> (raw)

If we don't check the number of missing devices and create raid device
with all missing devices, it gives the error message:
[root@storageqe-15 mdadm]# ./test --tests=00raid1
Testing on linux-3.10.0-830.el7.x86_64 kernel
tests/00raid1...
ERROR: dmesg prints errors when testing 00raid1!

FAILED - see /var/tmp/00raid1.log and /var/tmp/fail00raid1.log for details

After checking the missing devices number, the test case can pass. And it
gives a error log in log file:
++ /root/mdadm/mdadm --quiet -CR /dev/md0 -l 1 -n2 missing missing --auto=yes
++ rv=1
++ case  in
++ cat /var/tmp/stderr
mdadm: Subdevs can't be all missing

Signed-off-by: Xiao Ni <xni@redhat.com>
---
 tests/00raid1 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/00raid1 b/tests/00raid1
index c93465d..752bbbf 100644
--- a/tests/00raid1
+++ b/tests/00raid1
@@ -3,6 +3,9 @@
 # test version0, version1, and no super
 # test resync and recovery.
 
+# It's just a sanity check. This command shouldn't run successfully
+mdadm -CR $md0 -l 1 -n2 missing missing
+
 mdadm -CR $md0 -l 1 -n2 $dev0 $dev1
 check resync
 check raid1
-- 
2.7.4


             reply	other threads:[~2018-02-02  3:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-02  3:57 Xiao Ni [this message]
2018-02-07 19:53 ` [MDADM PATCH] A sanity check for missing device Jes Sorensen
2018-02-08  7:20   ` Xiao Ni

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=1517543858-6937-1-git-send-email-xni@redhat.com \
    --to=xni@redhat.com \
    --cc=jes.sorensen@gmail.com \
    --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).