]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/cli_root/zpool_add/zpool_add_004_pos.ksh
Add ashift validation when adding devices to a pool
[mirror_zfs.git] / tests / zfs-tests / tests / functional / cli_root / zpool_add / zpool_add_004_pos.ksh
index fbaed2af13c57b842d2bb6cf3980d848654f12f2..cecda56ab125e429d248b114c7c73d13d4158cd2 100755 (executable)
@@ -70,8 +70,12 @@ if is_freebsd; then
        recursive=$(get_tunable VOL_RECURSIVE)
        log_must set_tunable64 VOL_RECURSIVE 1
 fi
-log_must zpool add $TESTPOOL $ZVOL_DEVDIR/$TESTPOOL1/$TESTVOL
+log_must zpool add --allow-ashift-mismatch $TESTPOOL $ZVOL_DEVDIR/$TESTPOOL1/$TESTVOL
 
 log_must vdevs_in_pool "$TESTPOOL" "$ZVOL_DEVDIR/$TESTPOOL1/$TESTVOL"
 
+# Give zed a chance to finish processing the event, otherwise
+# a race condition can lead to stuck "zpool destroy $TESTPOOL"
+sleep 1
+
 log_pass "'zpool add <pool> <vdev> ...' adds zfs volume to the pool successfully"