3 # create a raid1, remove a drive, and readd it.
4 # resync should be instant.
5 # Then do some IO first. Resync should still be very fast
9 mdadm -B $md0 -l1 -n2 -b$bmf -d1 $dev1 $dev2
12 testdev $md0 1 $size 1
18 mdadm $md0 --re-add $dev2
24 testdev $md0 1 $size 1
25 mdadm $md0 --re-add $dev2
27 cmp --bytes=$[$mdsize0*1024] $dev1 $dev2
29 mdadm $md0 -f $dev2; sleep 1
31 if dd if=/dev/zero of=$md0 ; then : ; fi
32 mdadm $md0 --re-add $dev2
35 # should BLKFLSBUF and then read $dev1/$dev2...
36 cmp --bytes=$[$mdsize0*1024] $file1 $file2