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