ZFS: fix the zpool_add_010_pos test
The test is necessarily racy, because it depends on being able to complete a "zpool add" before a previous resilver finishes. But it was racier than it needed to be. Move the first "zpool add" to before the resilver starts. MFC after: 2 weeks Sponsored by: Axcient
This commit is contained in:
parent
eadfb49fe1
commit
d2cb9c7641
@ -48,8 +48,8 @@ create_pool $TESTPOOL mirror ${DISK0} ${DISK1}
|
||||
# is complete. We don't want that to happen during this test, so write some
|
||||
# data just to slow down resilvering.
|
||||
$TIMEOUT 60s $DD if=/dev/zero of=/$TESTPOOL/zerofile bs=128k
|
||||
log_must $ZPOOL replace $TESTPOOL ${DISK0} ${DISK2}
|
||||
log_must $ZPOOL add $TESTPOOL spare ${DISK3}
|
||||
log_must $ZPOOL replace $TESTPOOL ${DISK0} ${DISK2}
|
||||
log_must $ZPOOL replace $TESTPOOL ${DISK0} ${DISK3}
|
||||
log_must $ZPOOL add $TESTPOOL spare ${DISK4}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user