* [MDADM PATCH -v5 0/1] add one mdadm test case
@ 2017-10-10 11:32 Xiao Ni
2017-10-10 11:32 ` [MDADM PATCH -v5 1/1] mdadm/test: Add one test case for raid5 reshape Xiao Ni
0 siblings, 1 reply; 3+ messages in thread
From: Xiao Ni @ 2017-10-10 11:32 UTC (permalink / raw)
To: linux-raid; +Cc: jes.sorensen, zlliu
Hi all
Sorry for forgeting this patch. It adds one test case for
raid5 reshape. Please review.
Xiao Ni (1):
mdadm/test: Add one test case for raid5 reshape
test | 7 +++++++
tests/02r5grow | 17 +++++++++++++++++
2 files changed, 24 insertions(+)
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* [MDADM PATCH -v5 1/1] mdadm/test: Add one test case for raid5 reshape
2017-10-10 11:32 [MDADM PATCH -v5 0/1] add one mdadm test case Xiao Ni
@ 2017-10-10 11:32 ` Xiao Ni
2017-10-10 20:23 ` Jes Sorensen
0 siblings, 1 reply; 3+ messages in thread
From: Xiao Ni @ 2017-10-10 11:32 UTC (permalink / raw)
To: linux-raid; +Cc: jes.sorensen, zlliu
This case tries to allow raid5 reshape to use backwards direction.
It changes chunksize after reshape and stops the raid. Then starts
the raid again.
Signed-off-by: Xiao Ni <xni@redhat.com>
Suggested-by: Jes Sorensen <jes.sorensen@gmail.com>
Suggested-by: Zhilong Liu <zlliu@suse.com>
Suggested-by: Paul Menzel <pmenzel@molgen.mpg.de>
---
test | 7 +++++++
tests/02r5grow | 17 +++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/test b/test
index 25268a0..e74bbe5 100755
--- a/test
+++ b/test
@@ -320,6 +320,13 @@ check() {
grep -sq "inactive" /proc/mdstat ||
die "array is not inactive!"
;;
+ # It only can be used when there is only one raid
+ chunk )
+ chunk_size=`awk -F',' '/chunk/{print $2}' /proc/mdstat | awk -F'[a-z]' '{print $1}'`
+ if [ "$chunk_size" -ne "$2" ] ; then
+ die "chunksize should be $2, but it's $chunk_size"
+ fi
+ ;;
* )
die "unknown check $1"
;;
diff --git a/tests/02r5grow b/tests/02r5grow
index 386e82e..bb9bd6d 100644
--- a/tests/02r5grow
+++ b/tests/02r5grow
@@ -34,3 +34,20 @@ check nosync
sh tests/testdev $md0 3 $[size/2] 128
mdadm -S $md0
+
+# create a raid5 array and change the chunk
+mdadm -CR $md0 --level raid5 --metadata=1.1 --chunk=32 --raid-disks 3 --size $[size/2] $dev1 $dev2 $dev3
+check wait
+check state UUU
+check chunk 32
+
+mdadm $md0 --grow --chunk=64
+check reshape
+check wait
+check chunk 64
+
+mdadm -S $md0
+mdadm -A $md0 $dev1 $dev2 $dev3
+check state UUU
+check chunk 64
+mdadm -S $md0
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [MDADM PATCH -v5 1/1] mdadm/test: Add one test case for raid5 reshape
2017-10-10 11:32 ` [MDADM PATCH -v5 1/1] mdadm/test: Add one test case for raid5 reshape Xiao Ni
@ 2017-10-10 20:23 ` Jes Sorensen
0 siblings, 0 replies; 3+ messages in thread
From: Jes Sorensen @ 2017-10-10 20:23 UTC (permalink / raw)
To: Xiao Ni, linux-raid; +Cc: zlliu
On 10/10/2017 07:32 AM, Xiao Ni wrote:
> This case tries to allow raid5 reshape to use backwards direction.
> It changes chunksize after reshape and stops the raid. Then starts
> the raid again.
>
> Signed-off-by: Xiao Ni <xni@redhat.com>
> Suggested-by: Jes Sorensen <jes.sorensen@gmail.com>
> Suggested-by: Zhilong Liu <zlliu@suse.com>
> Suggested-by: Paul Menzel <pmenzel@molgen.mpg.de>
> ---
> test | 7 +++++++
> tests/02r5grow | 17 +++++++++++++++++
> 2 files changed, 24 insertions(+)
I find the choice of 1.1 metadata kinda odd for these tests, but
otherwise I think it's fine, so I applied it.
Jes
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-10 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-10 11:32 [MDADM PATCH -v5 0/1] add one mdadm test case Xiao Ni
2017-10-10 11:32 ` [MDADM PATCH -v5 1/1] mdadm/test: Add one test case for raid5 reshape Xiao Ni
2017-10-10 20:23 ` Jes Sorensen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.