linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 07/19] clustermd_tests: add test case to test switching bitmap against cluster-raid1
Date: Fri,  2 Feb 2018 14:10:51 +0800	[thread overview]
Message-ID: <1517551863-1511-8-git-send-email-zlliu@suse.com> (raw)
In-Reply-To: <1517551863-1511-1-git-send-email-zlliu@suse.com>

01r1_Grow_bitmap-switch:
It tests switching bitmap during three modes include of
clustered, none and internal, this case is testing the
clustered raid1.

Signed-off-by: Zhilong Liu <zlliu@suse.com>
---
 clustermd_tests/01r1_Grow_bitmap-switch | 51 +++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 clustermd_tests/01r1_Grow_bitmap-switch

diff --git a/clustermd_tests/01r1_Grow_bitmap-switch b/clustermd_tests/01r1_Grow_bitmap-switch
new file mode 100644
index 0000000..3b363d9
--- /dev/null
+++ b/clustermd_tests/01r1_Grow_bitmap-switch
@@ -0,0 +1,51 @@
+#!/bin/bash
+
+mdadm -CR $md0 -l1 -b clustered -n2 $dev0 $dev1 --assume-clean
+ssh $NODE2 mdadm -A $md0 $dev0 $dev1
+check all nosync
+check all raid1
+check all bitmap
+check all state UU
+
+# switch 'clustered' bitmap to 'none', and then 'none' to 'internal'
+stop_md $NODE2 $md0
+mdadm --grow $md0 --bitmap=none
+[ $? -eq '0' ] ||
+	die "$NODE1: change bitmap 'clustered' to 'none' failed."
+mdadm -X $dev0 $dev1 &> /dev/null
+[ $? -eq '0' ] &&
+	die "$NODE1: bitmap still exists in member_disks."
+check all nobitmap
+mdadm --grow $md0 --bitmap=internal
+[ $? -eq '0' ] ||
+	die "$NODE1: change bitmap 'none' to 'internal' failed."
+sleep 2
+mdadm -X $dev0 $dev1 &> /dev/null
+[ $? -eq '0' ] ||
+	die "$NODE1: create 'internal' bitmap failed."
+check $NODE1 bitmap
+
+# switch 'internal' bitmap to 'none', and then 'none' to 'clustered'
+mdadm --grow $md0 --bitmap=none
+[ $? -eq '0' ] ||
+	die "$NODE1: change bitmap 'internal' to 'none' failed."
+mdadm -X $dev0 $dev1 &> /dev/null
+[ $? -eq '0' ] &&
+	die "$NODE1: bitmap still exists in member_disks."
+check $NODE1 nobitmap
+mdadm --grow $md0 --bitmap=clustered
+[ $? -eq '0' ] ||
+	die "$NODE1: change bitmap 'none' to 'clustered' failed."
+ssh $NODE2 mdadm -A $md0 $dev0 $dev1
+sleep 2
+for ip in $NODES
+do
+	ssh $ip "mdadm -X $dev0 $dev1 | grep -q 'Cluster name'" ||
+		die "$ip: create 'clustered' bitmap failed."
+done
+check all bitmap
+check all state UU
+check all dmesg
+stop_md all $md0
+
+exit 0
-- 
2.6.6


  parent reply	other threads:[~2018-02-02  6:10 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 ` Zhilong Liu [this message]
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 ` [PATCH 19/19] clustermd_tests: add test case to test switch-recovery against cluster-raid10 Zhilong Liu

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-8-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).