1
0
Fork 0
mdadm/tests/05r1-grow-internal
Daniel Baumann dfe7ded19c
Merging upstream version 4.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-02-14 06:38:13 +01:00

28 lines
699 B
Text

#
# create a raid1 array, add an internal bitmap
#
mdadm --create --run $md0 -l 1 -n 2 $dev1 $dev2
check wait
testdev $md0 1 $mdsize1a 64
#mdadm -E $dev1
mdadm --grow $md0 --bitmap=internal --bitmap-chunk=4 --delay=1 || { mdadm -X $dev2 ; exit 1; }
sleep 6
dirty1=`mdadm -X $dev2 | sed -n -e 's/.*Bitmap.* \([0-9]*\) dirty.*/\1/p'`
testdev $md0 1 $mdsize1a 64
sleep 6
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"
echo bad dirty counts
exit 1
fi
# now to remove the bitmap
check bitmap
mdadm --grow $md0 --bitmap=none
check nobitmap
mdadm -S $md0