X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=tests%2Fzfs-tests%2Ftests%2Ffunctional%2Fcli_root%2Fzpool_resilver%2Fzpool_resilver_restart.ksh;h=cfafbb6b54cbcfcb647ca02b12f84fec1397c07b;hb=99b0b5bc3fe5a566d73ed2eed53137f97d684e84;hp=de9e5ecdf49b528072f0fad6ce96e6f2e1856c41;hpb=80a91e7469669e2a5da5873b8f09a752f7869062;p=mirror_zfs.git diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver_restart.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver_restart.ksh index de9e5ecdf..cfafbb6b5 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver_restart.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_resilver/zpool_resilver_restart.ksh @@ -33,25 +33,19 @@ # "Verify 'zpool resilver' restarts in-progress resilvers" # # STRATEGY: -# 1. Write some data and detatch the first drive so it has resilver +# 1. Write some data and detach the first drive so it has resilver # work to do # 2. Repeat the process with a second disk # 3. Reattach the drives, causing the second drive's resilver to be # deferred # 4. Manually restart the resilver with all drives # -# NOTES: -# Artificially limit the scrub speed by setting the zfs_scan_vdev_limit -# low and adding a 50ms zio delay in order to ensure that the resilver -# does not complete early. -# verify_runnable "global" function cleanup { - log_must zinject -c all - log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_DEFAULT + log_must set_tunable32 zfs_scan_suspend_progress 0 log_must rm -f $mntpnt/biggerfile1 log_must rm -f $mntpnt/biggerfile2 } @@ -62,7 +56,7 @@ log_assert "Verify 'zpool resilver' restarts in-progress resilvers" mntpnt=$(get_prop mountpoint $TESTPOOL/$TESTFS) -# 1. Write some data and detatch the first drive so it has resilver work to do +# 1. Write some data and detach the first drive so it has resilver work to do log_must file_write -b 524288 -c 1024 -o create -d 0 -f $mntpnt/biggerfile1 log_must sync log_must zpool detach $TESTPOOL $DISK2 @@ -73,22 +67,19 @@ log_must sync log_must zpool detach $TESTPOOL $DISK3 # 3. Reattach the drives, causing the second drive's resilver to be deferred -log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_SLOW +log_must set_tunable32 zfs_scan_suspend_progress 1 log_must zpool attach $TESTPOOL $DISK1 $DISK2 -log_must zinject -d $DISK2 -D50:1 $TESTPOOL log_must is_pool_resilvering $TESTPOOL true log_must zpool attach $TESTPOOL $DISK1 $DISK3 -log_must zinject -d $DISK3 -D50:1 $TESTPOOL log_must is_pool_resilvering $TESTPOOL true # 4. Manually restart the resilver with all drives log_must zpool resilver $TESTPOOL -log_must zinject -c all -log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_DEFAULT -log_must wait_for_resilver_end $TESTPOOL $MAXTIMEOUT log_must is_deferred_scan_started $TESTPOOL +log_must set_tunable32 zfs_scan_suspend_progress 0 +log_must wait_for_resilver_end $TESTPOOL $MAXTIMEOUT log_must check_state $TESTPOOL "$DISK2" "online" log_must check_state $TESTPOOL "$DISK3" "online"