9075 Improve ZFS pool import/load process and corrupted pool recovery
[unleashed.git] / usr / src / test / zfs-tests / tests / functional / cli_root / zpool_import / zpool_import.cfg
blob193c32c8ce2f6761f762fc91ca3a1220e2a00a4c
2 # CDDL HEADER START
4 # The contents of this file are subject to the terms of the
5 # Common Development and Distribution License (the "License").
6 # You may not use this file except in compliance with the License.
8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 # or http://www.opensolaris.org/os/licensing.
10 # See the License for the specific language governing permissions
11 # and limitations under the License.
13 # When distributing Covered Code, include this CDDL HEADER in each
14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 # If applicable, add the following below this CDDL HEADER, with the
16 # fields enclosed by brackets "[]" replaced with your own identifying
17 # information: Portions Copyright [yyyy] [name of copyright owner]
19 # CDDL HEADER END
23 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
24 # Use is subject to license terms.
28 # Copyright (c) 2012, 2016 by Delphix. All rights reserved.
31 . $STF_SUITE/include/libtest.shlib
33 typeset -a disk_array=($(find_disks $DISKS))
34 case "${#disk_array[*]}" in
36         #
37         # on stf_configure, disk_freelist returns empty.
38         #
39         DISK_COUNT=0
40         ;;
42         # We need to repartition the single disk to two slices.
43         DISK_COUNT=1
44         ZFS_DISK1=${disk_array[0]}
45         ZFSSIDE_DISK1=${ZFS_DISK1}s0
46         ZFS_DISK2=${disk_array[0]}
47         ZFSSIDE_DISK2=${ZFS_DISK2}s1
48         ;;
50         # We need to repartition the single disk to two slices.
51         DISK_COUNT=2
52         ZFS_DISK1=${disk_array[0]}
53         ZFSSIDE_DISK1=${ZFS_DISK1}s0
54         ZFS_DISK2=${disk_array[1]}
55         ZFSSIDE_DISK2=${ZFS_DISK2}s0
56         ;;
57 esac
59 export DISK_COUNT ZFS_DISK1 ZFSSIDE_DISK1 ZFS_DISK2 ZFSSIDE_DISK2
61 export FS_SIZE=2gb
62 export FILE_SIZE=$MINVDEVSIZE
63 export SLICE_SIZE="$((MINVDEVSIZE / (1024 * 1024)))m"
64 export MAX_NUM=5
65 export GROUP_NUM=3
66 export DEVICE_DIR=/dev_import-test
67 export BACKUP_DEVICE_DIR=$DEVICE_DIR/backup
68 export DEVICE_FILE=disk
69 export DEVICE_ARCHIVE=archive_import-test
70 export MYTESTFILE=$STF_SUITE/include/libtest.shlib
72 export CPATH=/var/tmp/cachefile.$$
73 export CPATHBKP=/var/tmp/cachefile.$$.bkp
74 export CPATHBKP2=/var/tmp/cachefile.$$.bkp2
75 export MD5FILE=/var/tmp/md5sums.$$
76 export MD5FILE2=/var/tmp/md5sums.$$.2
78 typeset -i num=0
79 while (( num < $GROUP_NUM )); do
80         DEVICE_FILES="$DEVICE_FILES ${DEVICE_DIR}/${DEVICE_FILE}$num"
81         (( num = num + 1 ))
82 done
83 export DEVICE_FILES
85 export VDEV0=$DEVICE_DIR/${DEVICE_FILE}0
86 export VDEV1=$DEVICE_DIR/${DEVICE_FILE}1
87 export VDEV2=$DEVICE_DIR/${DEVICE_FILE}2
88 export VDEV3=$DEVICE_DIR/${DEVICE_FILE}3
89 export VDEV4=$DEVICE_DIR/${DEVICE_FILE}4
91 export ALTER_ROOT=/alter_import-test