]> git.ipfire.org Git - thirdparty/mdadm.git/blame - tests/05r1-grow-internal-1
New test: 03r5assem-failed
[thirdparty/mdadm.git] / tests / 05r1-grow-internal-1
CommitLineData
c929c82e
NB
1
2#
3# create a raid1 array, version 1 superblock, add an internal bitmap
4#
5mdadm --create --run $md0 -e1 -l 1 -n 2 $dev1 $dev2
6check wait
ae6c05ad 7testdev $md0 1 $mdsize1b 64
c929c82e
NB
8
9#mdadm -E $dev1
b8ab2a50 10mdadm --grow $md0 --bitmap=internal --bitmap-chunk=4 --delay=1
c929c82e
NB
11dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
12sleep 4
13dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
14
ae6c05ad 15testdev $md0 1 $mdsize1b 64
c929c82e
NB
16dirty3=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
17sleep 4
18dirty4=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
19
20#echo $dirty1 $dirty2 $dirty3 $dirty4
21if [ $dirty2 -ne 0 -o $dirty4 -ne 0 -o $dirty3 -lt 400 ]
22then
23 echo bad dirty counts
24 exit 1
25fi
26
27# now to remove the bitmap
28check bitmap
29mdadm --grow $md0 --bitmap=none
30check nobitmap
31mdadm -S $md0