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