diff options
author | NeilBrown <neilb@suse.de> | 2013-07-02 08:19:52 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-07-04 09:10:36 +0200 |
commit | aef14b9e498ca5a9c6f46cbf422b4b73ec935d62 (patch) | |
tree | d1f9b45786a6dbd9ce15ceff0335b1844ea11e6f /tests/07revert-grow | |
parent | Stop: improve synchronising of reshape with whole stripes. (diff) | |
download | mdadm-aef14b9e498ca5a9c6f46cbf422b4b73ec935d62.tar.xz mdadm-aef14b9e498ca5a9c6f46cbf422b4b73ec935d62.zip |
tests: add a test for reverting reshapes
Only reverting reshapes that grow the array so far.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'tests/07revert-grow')
-rw-r--r-- | tests/07revert-grow | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/07revert-grow b/tests/07revert-grow new file mode 100644 index 00000000..2dee738e --- /dev/null +++ b/tests/07revert-grow @@ -0,0 +1,43 @@ +set -e -x + +# revert a reshape that is increasing the number of devices, +# raid5, raid6, and raid10 + +# RAID5 +mdadm -CR --assume-clean $md0 -l5 -n4 -x1 $devlist4 +check raid5 +testdev $md0 3 $mdsize1 512 +mdadm -G $md0 -n 5 +sleep 3 +mdadm -S $md0 +mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=/tmp/md-backup +check wait +check raid5 +testdev $md0 3 $mdsize1 512 +mdadm -S $md0 + +# RAID6 +mdadm -CR --assume-clean $md0 -l6 -n4 -x1 $devlist4 +check raid6 +testdev $md0 2 $mdsize1 512 +mdadm -G $md0 -n 5 +sleep 3 +mdadm -S $md0 +mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=/tmp/md-backup +check wait +check raid6 +testdev $md0 2 $mdsize1 512 +mdadm -S $md0 + +# RAID10 +mdadm -CR --assume-clean $md0 -l10 -n4 -x1 $devlist4 +check raid10 +testdev $md0 2 $mdsize1 512 +mdadm -G $md0 -n 5 +sleep 3 +mdadm -S $md0 +strace -o /tmp/str ./mdadm -A $md0 --update=revert-reshape $devlist4 +check wait +check raid10 +testdev $md0 2 $mdsize1 512 +mdadm -S $md0 |