linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [mdadm PATCH 1/1] mdadm/test: Add one test case for raid5 reshape
@ 2017-07-13  9:14 Xiao Ni
  2017-07-13 14:27 ` Jes Sorensen
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Ni @ 2017-07-13  9:14 UTC (permalink / raw)
  To: linux-raid; +Cc: jes.sorensen, shli

This case trys to allow raid5 reshape to use backwards direction.
It changes chunksize after reshape and stop the raid. Then start
the raid again.

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

diff --git a/tests/02r5grow b/tests/02r5grow
index 386e82e..14d05d6 100644
--- a/tests/02r5grow
+++ b/tests/02r5grow
@@ -34,3 +34,15 @@ 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
+
+mdadm $md0 --grow --chunk=64
+mdadm --wait $md0
+
+mdadm -S $md0
+mdadm -As
+mdadm -Ss
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [mdadm PATCH 1/1] mdadm/test: Add one test case for raid5 reshape
  2017-07-13  9:14 [mdadm PATCH 1/1] mdadm/test: Add one test case for raid5 reshape Xiao Ni
@ 2017-07-13 14:27 ` Jes Sorensen
  0 siblings, 0 replies; 2+ messages in thread
From: Jes Sorensen @ 2017-07-13 14:27 UTC (permalink / raw)
  To: Xiao Ni, linux-raid; +Cc: shli

On 07/13/2017 05:14 AM, Xiao Ni wrote:
> This case trys to allow raid5 reshape to use backwards direction.
> It changes chunksize after reshape and stop the raid. Then start
> the raid again.
> 
> Signed-off-by: Xiao Ni <xni@redhat.com>
> ---
>   tests/02r5grow | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
> 
> diff --git a/tests/02r5grow b/tests/02r5grow
> index 386e82e..14d05d6 100644
> --- a/tests/02r5grow
> +++ b/tests/02r5grow
> @@ -34,3 +34,15 @@ 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
> +
> +mdadm $md0 --grow --chunk=64
> +mdadm --wait $md0

You are not checking the outcome of your chunk change operation. Running 
a test and not making sure it succeeds kinda makes it useless.

Cheers,
Jes


> +
> +mdadm -S $md0
> +mdadm -As
> +mdadm -Ss
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-13 14:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-13  9:14 [mdadm PATCH 1/1] mdadm/test: Add one test case for raid5 reshape Xiao Ni
2017-07-13 14:27 ` Jes Sorensen

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