]> git.ipfire.org Git - thirdparty/mdadm.git/blame - tests/01r1fail
Manage: be more careful about --add attempts.
[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
8453e704 23mdadm --zero-superblock $dev2
dab6685f
NB
24mdadm $md0 -a $dev2
25check recovery
26check wait
27check state UUUU
5e7519fa 28
dab6685f 29mdadm -S $md0