]> git.ipfire.org Git - thirdparty/mdadm.git/blob - tests/07revert-inplace
Free map to avoid resource leak issues
[thirdparty/mdadm.git] / tests / 07revert-inplace
1 set -e -x
2
3 # revert a reshape that is not changing the number of data devices,
4 # raid5, raid6, and raid10
5
6 # RAID5 -> RAID6
7 mdadm -CR --assume-clean $md0 -l5 -n4 -x1 $devlist4
8 check raid5
9 testdev $md0 3 $mdsize1 512
10 mdadm -G $md0 -l 6
11 sleep 2
12 mdadm -S $md0
13 mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=/tmp/md-backup
14 check wait
15 check raid6
16 check algorithm 18
17 testdev $md0 3 $mdsize1 512
18 mdadm -S $md0
19
20 # RAID6 -> RAID5
21 mdadm -CR --assume-clean $md0 -l6 -n5 $devlist4
22 check raid6
23 testdev $md0 3 $mdsize1 512
24 mdadm -G $md0 -l 5
25 sleep 2
26 mdadm -S $md0
27 mdadm -A $md0 --update=revert-reshape $devlist4 --backup-file=/tmp/md-backup
28 check wait
29 check raid6
30 testdev $md0 3 $mdsize1 512
31 mdadm -S $md0
32
33 # RAID10 - decrease chunk size
34 mdadm -CR --assume-clean $md0 -l10 -n6 -c 64 $devlist5
35 check raid10
36 testdev $md0 3 $mdsize1 64
37 mdadm -G $md0 -c 32
38 sleep 2
39 mdadm -S $md0
40 strace -o /tmp/str ./mdadm -A $md0 --update=revert-reshape $devlist5
41 check wait
42 check raid10
43 testdev $md0 3 $mdsize1 64
44 mdadm -S $md0