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]
23 # Copyright 2008 Sun Microsystems, Inc. All rights reserved.
24 # Use is subject to license terms.
28 # Copyright (c) 2013 by Delphix. All rights reserved.
31 . $STF_SUITE/include/libtest.shlib
33 set -A disk_array $(find_disks $DISKS)
34 case "${#disk_array[*]}" in
39 # We need to repartition the single disk to two slices
41 META_DISK0=${disk_array[0]}
42 SINGLE_DISK=$META_DISK0
43 META_DISK1=$META_DISK0
45 META_SIDE0=${SINGLE_DISK}s0
46 META_SIDE1=${SINGLE_DISK}s1
47 ZFS_SIDE2=${SINGLE_DISK}s3
50 # We need to repartition the single disk to two slices and allocate
53 META_DISK0=${disk_array[0]}
54 SINGLE_DISK=$META_DISK0
55 META_DISK1=$META_DISK0
56 ZFS_DISK2=${disk_array[1]}
57 META_SIDE0=${SINGLE_DISK}s0
58 META_SIDE1=${SINGLE_DISK}s1
59 ZFS_SIDE2=${ZFS_DISK2}s0
62 # In this case there are at least enough disks to use.
64 META_DISK0=${disk_array[0]}
65 META_DISK1=${disk_array[1]}
66 ZFS_DISK2=${disk_array[2]}
67 META_SIDE0=${META_DISK0}s0
68 META_SIDE1=${META_DISK1}s0
69 ZFS_SIDE2=${ZFS_DISK2}s0
73 export DISK_COUNT META_DISK0 META_DISK1 ZFS_DISK2
74 export META_SIDE0 META_SIDE1 ZFS_SIDE2 SINGLE_DISK
76 export TESTFILE=testfile
78 export META_DEVICE_ID=d99
79 export META_DEVICE_PATH=/dev/md/dsk/$META_DEVICE_ID
81 export FILE_SIZE=$(( 1024 * 1024 ))