]>
Commit | Line | Data |
---|---|---|
8f0ac9d7 N |
1 | set -e -x |
2 | ||
3 | # revert a reshape that is decreasing the number of devices, | |
4 | # raid5, raid6, and raid10 | |
5 | ||
6 | bu=$targetdir/md-backup | |
7 | rm -f $bu | |
8 | # RAID5 | |
9 | mdadm -CR --assume-clean $md0 -l5 -n5 $devlist4 | |
10 | check raid5 | |
11 | testdev $md0 4 $mdsize1 512 | |
12 | mdadm --grow $md0 --array-size 56832 | |
13 | testdev $md0 3 $mdsize1 512 | |
14 | mdadm -G $md0 -n 4 --backup=$bu | |
15 | sleep 3 | |
16 | mdadm -S $md0 | |
17 | mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=$bu | |
18 | check wait | |
19 | check raid5 | |
20 | fsck -f -n $md0 | |
21 | testdev $md0 4 $mdsize1 512 | |
22 | mdadm -S $md0 | |
23 | ||
24 | #FIXME | |
25 | rm -f $bu | |
26 | # RAID6 | |
27 | mdadm -CR --assume-clean $md0 -l6 -n5 $devlist4 | |
28 | check raid6 | |
29 | testdev $md0 3 $mdsize1 512 | |
30 | mdadm --grow $md0 --array-size 37888 | |
31 | testdev $md0 2 $mdsize1 512 | |
32 | mdadm -G $md0 -n 4 --backup=$bu | |
33 | sleep 2 | |
34 | mdadm -S $md0 | |
35 | mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=$bu | |
36 | check wait | |
37 | check raid6 | |
38 | fsck -f -n $md0 | |
39 | testdev $md0 3 $mdsize1 512 | |
40 | mdadm -S $md0 | |
41 | ||
42 | # RAID10 | |
43 | mdadm -CR --assume-clean $md0 -l10 -n6 $devlist5 | |
44 | check raid10 | |
45 | testdev $md0 3 $mdsize1 512 | |
46 | mdadm --grow $md0 --array-size 36864 | |
47 | testdev $md0 2 $mdsize1 512 | |
48 | mdadm -G $md0 -n 4 | |
49 | sleep 3 | |
50 | mdadm -S $md0 | |
51 | mdadm -A $md0 --update=revert-reshape $devlist5 | |
52 | check wait | |
53 | check raid10 | |
54 | fsck -f -n $md0 | |
55 | testdev $md0 3 $mdsize1 512 | |
56 | mdadm -S $md0 |