]> git.ipfire.org Git - thirdparty/mdadm.git/blame - tests/01r1fail
--wait or -W will wait for resync activity to finish on the given devices.
[thirdparty/mdadm.git] / tests / 01r1fail
CommitLineData
5e7519fa 1
5e7519fa
NB
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
5
dab6685f
NB
6mdadm -CR $md0 -l1 -n4 $dev0 $dev1 $dev2 missing
7check resync
8mdadm $md0 --fail $dev2
9check resync
10mdadm $md0 --fail $dev1
5e7519fa 11sleep 1
dab6685f
NB
12check nosync
13check state U___
14mdadm $md0 --add $dev4 $dev3
15check recovery
5e7519fa 16# there could be two separate recoveries, one for each dev
dab6685f
NB
17check wait
18check wait
19mdadm $md0 --remove $dev2 $dev1
20check nosync
21check state UUU_
5e7519fa 22
dab6685f
NB
23mdadm $md0 -a $dev2
24check recovery
25check wait
26check state UUUU
5e7519fa 27
dab6685f 28mdadm -S $md0