1# vim: filetype=sh 2# 3# CDDL HEADER START 4# 5# The contents of this file are subject to the terms of the 6# Common Development and Distribution License (the "License"). 7# You may not use this file except in compliance with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22 23# 24# Copyright 2009 Sun Microsystems, Inc. All rights reserved. 25# Use is subject to license terms. 26 27. $STF_SUITE/include/libtest.kshlib 28 29verify_disk_count "$DISKS" 2 30set -A disk_array $(find_disks $DISKS) 31case "${#disk_array[@]}" in 322) 33 FS_DISK0=${disk_array[0]} 34 FS_DISK1=${disk_array[1]} 35 FS_DISK2=${disk_array[0]} 36 FS_DISK3=${disk_array[1]} 37 FS_SIDE0=${FS_DISK0}p1 38 FS_SIDE1=${FS_DISK0}p2 39 FS_SIDE2=${FS_DISK1}p1 40 FS_SIDE3=${FS_DISK1}p2 41 disk0="$FS_SIDE0" 42 disk1="$FS_SIDE1" 43 disk2="$FS_SIDE2" 44 disk3="$FS_SIDE3" 45 disktargets="$disk0 $disk2" 46 rawdisk0="$FS_SIDE0" 47 rawdisk1="$FS_SIDE1" 48 rawdisk2="$FS_SIDE2" 49 rawdisk3="$FS_SIDE3" 50 rawtargets="$rawdisk0 $rawdisk2" 51 vdisks="$FS_DISK0" 52 sdisks="$FS_DISK1" 53 vslices="$FS_SIDE0 $FS_SIDE1 $FS_SIDE2" 54 sslices="$FS_SIDE3" 55 ;; 563) 57 FS_DISK0=${disk_array[0]} 58 FS_DISK1=${disk_array[1]} 59 FS_DISK2=${disk_array[2]} 60 FS_DISK3=${disk_array[0]} 61 FS_SIDE0=${FS_DISK0}p1 62 FS_SIDE1=${FS_DISK0}p2 63 FS_SIDE2=${FS_DISK1}p1 64 FS_SIDE3=${FS_DISK2}p1 65 disk0="$FS_SIDE0" 66 disk1="$FS_SIDE1" 67 disk2="$FS_SIDE2" 68 disk3="$FS_SIDE3" 69 disktargets="$disk0 $disk2 $disk3" 70 rawdisk0="$FS_SIDE0" 71 rawdisk1="$FS_SIDE1" 72 rawdisk2="$FS_SIDE2" 73 rawdisk3="$FS_SIDE3" 74 rawtargets="$rawdisk0 $rawdisk2 $rawdisk3" 75 vdisks="$FS_DISK0 $FS_DISK1" 76 sdisks="$FS_DISK2" 77 vslices="$FS_SIDE0 $FS_SIDE2 $FS_SIDE3" 78 sslices="$FS_SIDE1" 79 ;; 80*) 81 FS_DISK0=${disk_array[0]} 82 FS_DISK1=${disk_array[1]} 83 FS_DISK2=${disk_array[2]} 84 FS_DISK3=${disk_array[3]} 85 FS_SIDE0=${FS_DISK0}p1 86 FS_SIDE1=${FS_DISK1}p1 87 FS_SIDE2=${FS_DISK2}p1 88 FS_SIDE3=${FS_DISK3}p1 89 disk0="$FS_SIDE0" 90 disk1="$FS_SIDE1" 91 disk2="$FS_SIDE2" 92 disk3="$FS_SIDE3" 93 disktargets="$disk0 $disk1 $disk2 $disk3" 94 rawdisk0="$FS_SIDE0" 95 rawdisk1="$FS_SIDE1" 96 rawdisk2="$FS_SIDE2" 97 rawdisk3="$FS_SIDE3" 98 rawtargets="$rawdisk0 $rawdisk1 $rawdisk2 $rawdisk3" 99 vdisks="$FS_DISK0 $FS_DISK1 $FS_DISK2" 100 sdisks="$FS_DISK3" 101 vslices="$FS_SIDE0 $FS_SIDE1 $FS_SIDE2" 102 sslices="$FS_SIDE3" 103 ;; 104esac 105 106export FS_DISK0 FS_DISK1 FS_DISK2 FS_DISK3 SINGLE_DISK 107export FS_SIDE0 FS_SIDE1 FS_SIDE2 FS_SIDE3 108export disk0 disk1 disk2 disk3 disktargets 109export rawdisk0 rawdisk1 rawdisk2 rawdisk3 rawtargets 110export vdisks sdisks vslices sslices 111 112export UFSMP=$TESTDIR/testinuseufsdump 113export FS_SIZE=1g 114export PREVDUMPDEV="" 115export PIDUFSDUMP="" 116export PIDUFSRESTORE="" 117# size of block to be written to test file - currently 1mb 118export BLOCK_SIZE=$(( 1024 * 1024 )) 119# number of blocks to write == size of file 120export BLOCK_COUNT=100 121export STF_TIMEOUT=1200 # 20 minutes max. 122