]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/cli_root/zpool_import/setup.ksh
Distributed Spare (dRAID) Feature
[mirror_zfs.git] / tests / zfs-tests / tests / functional / cli_root / zpool_import / setup.ksh
index 6d7b0e156904078c4d9608cf4a88d12fc20365e5..22e619d7411b4c4250bfb842a563b40f8bd482c4 100755 (executable)
 . $STF_SUITE/tests/functional/cli_root/zpool_import/zpool_import.cfg
 
 verify_runnable "global"
-verify_disk_count "$DISKS" 2
 
-if ! $(is_physical_device $ZFS_DISK1) ; then
-       log_unsupported "Only partitionable physical disks can be used"
-fi
-
-DISK=${DISKS%% *}
-
-for dev in $ZFS_DISK1 $ZFS_DISK2 ; do
-       log_must cleanup_devices $dev
-done
-
-typeset -i i=0
-while (( i <= $GROUP_NUM )); do
-       if ! is_linux && ! is_freebsd; then
-               if (( i == 2 )); then
-                       (( i = i + 1 ))
-                       continue
-               fi
-       fi
-       log_must set_partition $i "$cyl" $SLICE_SIZE $ZFS_DISK1
-       cyl=$(get_endslice $ZFS_DISK1 $i)
-       (( i = i + 1 ))
-done
-
-create_pool "$TESTPOOL" "$ZFSSIDE_DISK1"
+create_pool "$TESTPOOL" "$DISK"
 
 if [[ -d $TESTDIR ]]; then
        rm -rf $TESTDIR  || log_unresolved Could not remove $TESTDIR
@@ -73,7 +49,7 @@ log_must zfs set mountpoint=$TESTDIR $TESTPOOL/$TESTFS
 
 i=0
 while (( i < $MAX_NUM )); do
-       log_must mkfile $FILE_SIZE ${DEVICE_DIR}/${DEVICE_FILE}$i
+       log_must truncate -s $FILE_SIZE ${DEVICE_DIR}/${DEVICE_FILE}$i
        (( i = i + 1 ))
 done