]> git.ipfire.org Git - thirdparty/mdadm.git/blame - tests/07revert-grow
tests: add a test for reverting reshapes
[thirdparty/mdadm.git] / tests / 07revert-grow
CommitLineData
aef14b9e
N
1set -e -x
2
3# revert a reshape that is increasing the number of devices,
4# raid5, raid6, and raid10
5
6# RAID5
7mdadm -CR --assume-clean $md0 -l5 -n4 -x1 $devlist4
8check raid5
9testdev $md0 3 $mdsize1 512
10mdadm -G $md0 -n 5
11sleep 3
12mdadm -S $md0
13mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=/tmp/md-backup
14check wait
15check raid5
16testdev $md0 3 $mdsize1 512
17mdadm -S $md0
18
19# RAID6
20mdadm -CR --assume-clean $md0 -l6 -n4 -x1 $devlist4
21check raid6
22testdev $md0 2 $mdsize1 512
23mdadm -G $md0 -n 5
24sleep 3
25mdadm -S $md0
26mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=/tmp/md-backup
27check wait
28check raid6
29testdev $md0 2 $mdsize1 512
30mdadm -S $md0
31
32# RAID10
33mdadm -CR --assume-clean $md0 -l10 -n4 -x1 $devlist4
34check raid10
35testdev $md0 2 $mdsize1 512
36mdadm -G $md0 -n 5
37sleep 3
38mdadm -S $md0
39strace -o /tmp/str ./mdadm -A $md0 --update=revert-reshape $devlist4
40check wait
41check raid10
42testdev $md0 2 $mdsize1 512
43mdadm -S $md0