2 # create a raid1, fail and remove a drive during initial sync
3 # Add two more, fail and remove one
4 # wait for sync to complete, fail, remove, re-add
6 mdadm -CR $md0 -l1 -n4 $dev0 $dev1 $dev2 missing
8 mdadm $md0 --fail $dev2
10 mdadm $md0 --fail $dev1
14 mdadm $md0 --add $dev4 $dev3
16 # there could be two separate recoveries, one for each dev
19 mdadm $md0 --remove $dev2 $dev1
23 mdadm --zero-superblock $dev2