From: Zhilong Liu <zlliu@suse.com>
To: Jes.Sorensen@gmail.com
Cc: linux-raid@vger.kernel.org, gqjiang@suse.com,
Zhilong Liu <zlliu@suse.com>
Subject: [PATCH 19/19] clustermd_tests: add test case to test switch-recovery against cluster-raid10
Date: Fri, 2 Feb 2018 14:11:03 +0800 [thread overview]
Message-ID: <1517551863-1511-20-git-send-email-zlliu@suse.com> (raw)
In-Reply-To: <1517551863-1511-1-git-send-email-zlliu@suse.com>
03r10_switch-recovery:
Create new array with 2 active and 1 spare disk, set 1 active disk as 'fail',
it triggers recovery and the spare disk would replace the failure disk, then
stop the array in doing recovery node, the other node would take it over and
continue to complete the recovery.
Signed-off-by: Zhilong Liu <zlliu@suse.com>
---
clustermd_tests/03r10_switch-recovery | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 clustermd_tests/03r10_switch-recovery
diff --git a/clustermd_tests/03r10_switch-recovery b/clustermd_tests/03r10_switch-recovery
new file mode 100644
index 0000000..867388d
--- /dev/null
+++ b/clustermd_tests/03r10_switch-recovery
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+mdadm -CR $md0 -l10 -b clustered --layout n2 -n2 -x1 $dev0 $dev1 $dev2 --assume-clean
+ssh $NODE2 mdadm -A $md0 $dev0 $dev1 $dev2
+check all nosync
+check all raid10
+check all bitmap
+check all spares 1
+check all state UU
+check all dmesg
+mdadm --manage $md0 --fail $dev0
+sleep 0.2
+check $NODE1 recovery
+stop_md $NODE1 $md0
+check $NODE2 recovery
+check $NODE2 wait
+check $NODE2 state UU
+check all dmesg
+stop_md $NODE2 $md0
+
+exit 0
--
2.6.6
prev parent reply other threads:[~2018-02-02 6:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-02 6:10 [PATCH 00/19] mdadm/clustermd_tests: update the testing part Zhilong Liu
2018-02-02 6:10 ` [PATCH 01/19] mdadm/test: improve filtering r10 from raid1 in raidtype Zhilong Liu
2018-02-02 6:10 ` [PATCH 02/19] mdadm/test: add disk metadata infos in save_log Zhilong Liu
2018-02-02 6:10 ` [PATCH 03/19] mdadm/test: add do_clean to ensure each case only catch its own testlog Zhilong Liu
2018-02-02 6:10 ` [PATCH 04/19] mdadm/clustermd_tests: add nobitmap in check Zhilong Liu
2018-02-02 6:10 ` [PATCH 05/19] mdadm/clustermd_tests: delete meaningless commands " Zhilong Liu
2018-02-02 6:10 ` [PATCH 06/19] manpage: add prompt in --zero-superblock against clustered raid Zhilong Liu
2018-02-02 6:10 ` [PATCH 07/19] clustermd_tests: add test case to test switching bitmap against cluster-raid1 Zhilong Liu
2018-02-02 6:10 ` [PATCH 08/19] clustermd_tests: add test case to test switching bitmap against cluster-raid10 Zhilong Liu
2018-02-02 6:10 ` [PATCH 09/19] clustermd_tests: add test case to test grow_add against cluster-raid1 Zhilong Liu
2018-02-02 6:10 ` [PATCH 10/19] clustermd_tests: add test case to test manage_add " Zhilong Liu
2018-02-02 6:10 ` [PATCH 11/19] clustermd_tests: add test case to test manage_add against cluster-raid10 Zhilong Liu
2018-02-02 6:10 ` [PATCH 12/19] clustermd_tests: add test case to test manage_add-spare against cluster-raid1 Zhilong Liu
2018-02-02 6:10 ` [PATCH 13/19] clustermd_tests: add test case to test manage_add-spare against cluster-raid10 Zhilong Liu
2018-02-02 6:10 ` [PATCH 14/19] clustermd_tests: add test case to test manage_re-add against cluster-raid1 Zhilong Liu
2018-02-02 6:10 ` [PATCH 15/19] clustermd_tests: add test case to test manage_re-add against cluster-raid10 Zhilong Liu
2018-02-02 6:11 ` [PATCH 16/19] clustermd_tests: add test case to test switch-resync against cluster-raid1 Zhilong Liu
2018-02-02 6:11 ` [PATCH 17/19] clustermd_tests: add test case to test switch-resync against cluster-raid10 Zhilong Liu
2018-02-02 6:11 ` [PATCH 18/19] clustermd_tests: add test case to test switch-recovery against cluster-raid1 Zhilong Liu
2018-02-02 6:11 ` Zhilong Liu [this message]
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=1517551863-1511-20-git-send-email-zlliu@suse.com \
--to=zlliu@suse.com \
--cc=Jes.Sorensen@gmail.com \
--cc=gqjiang@suse.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).