blob: f0f8349f8ccff96d0624f03cbe7b319015918c7d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#
# create a raid1 array, version 1 superblock, add an internal bitmap
#
mdadm --create --run $md0 -e1 -l 1 -n 2 $dev1 $dev2
check wait
testdev $md0 1 $mdsize1b 64
#mdadm -E $dev1
mdadm --grow $md0 --bitmap=internal --bitmap-chunk=4 --delay=1
sleep 4
dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
testdev $md0 1 $mdsize1b 64
sleep 4
dirty2=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
if [ $dirty1 -ne 0 -o $dirty2 -ne 0 ]
then echo >&2 "ERROR bad 'dirty' counts: dirty1 $dirty1, dirty2 $dirty2"
exit 1
fi
# now to remove the bitmap
check bitmap
mdadm --grow $md0 --bitmap=none
check nobitmap
mdadm -S $md0
|