1#!/bin/sh 2# $FreeBSD$ 3 4dir=`dirname $0` 5. ${dir}/../../misc.sh 6 7echo "1..70" 8 9disks_create 6 10names_create 1 11 12expect_fl ${ZPOOL} create ${name0} ${disk0} mirror ${disk1} ${disk2} 13expect_fl ${ZPOOL} status -x ${name0} 14expect_fl ${ZPOOL} destroy ${name0} 15 16expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} mirror ${disk1} ${disk2} 17expect_ok ${ZPOOL} status -x ${name0} 18expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 19exp=`( 20 echo " pool: ${name0}" 21 echo " state: ONLINE" 22 echo " scrub: none requested" 23 echo "config:" 24 echo " NAME STATE READ WRITE CKSUM" 25 echo " ${name0} ONLINE 0 0 0" 26 echo " ${disk0} ONLINE 0 0 0" 27 echo " mirror ONLINE 0 0 0" 28 echo " ${disk1} ONLINE 0 0 0" 29 echo " ${disk2} ONLINE 0 0 0" 30 echo "errors: No known data errors" 31)` 32expect "${exp}" ${ZPOOL} status ${name0} 33expect_ok ${ZPOOL} destroy ${name0} 34expect_fl ${ZPOOL} status -x ${name0} 35expect_fl ${ZPOOL} destroy ${name0} 36 37expect_fl ${ZPOOL} create ${name0} ${disk0} ${disk1} mirror ${disk2} ${disk3} 38expect_fl ${ZPOOL} status -x ${name0} 39expect_fl ${ZPOOL} destroy ${name0} 40 41expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} ${disk1} mirror ${disk2} ${disk3} 42expect_ok ${ZPOOL} status -x ${name0} 43expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 44exp=`( 45 echo " pool: ${name0}" 46 echo " state: ONLINE" 47 echo " scrub: none requested" 48 echo "config:" 49 echo " NAME STATE READ WRITE CKSUM" 50 echo " ${name0} ONLINE 0 0 0" 51 echo " ${disk0} ONLINE 0 0 0" 52 echo " ${disk1} ONLINE 0 0 0" 53 echo " mirror ONLINE 0 0 0" 54 echo " ${disk2} ONLINE 0 0 0" 55 echo " ${disk3} ONLINE 0 0 0" 56 echo "errors: No known data errors" 57)` 58expect "${exp}" ${ZPOOL} status ${name0} 59expect_ok ${ZPOOL} destroy ${name0} 60expect_fl ${ZPOOL} status -x ${name0} 61expect_fl ${ZPOOL} destroy ${name0} 62 63expect_fl ${ZPOOL} create ${name0} ${disk0} raidz ${disk1} ${disk2} ${disk3} 64expect_fl ${ZPOOL} status -x ${name0} 65expect_fl ${ZPOOL} destroy ${name0} 66 67expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} raidz ${disk1} ${disk2} ${disk3} 68expect_ok ${ZPOOL} status -x ${name0} 69expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 70exp=`( 71 echo " pool: ${name0}" 72 echo " state: ONLINE" 73 echo " scrub: none requested" 74 echo "config:" 75 echo " NAME STATE READ WRITE CKSUM" 76 echo " ${name0} ONLINE 0 0 0" 77 echo " ${disk0} ONLINE 0 0 0" 78 echo " raidz1 ONLINE 0 0 0" 79 echo " ${disk1} ONLINE 0 0 0" 80 echo " ${disk2} ONLINE 0 0 0" 81 echo " ${disk3} ONLINE 0 0 0" 82 echo "errors: No known data errors" 83)` 84expect "${exp}" ${ZPOOL} status ${name0} 85expect_ok ${ZPOOL} destroy ${name0} 86expect_fl ${ZPOOL} status -x ${name0} 87expect_fl ${ZPOOL} destroy ${name0} 88 89expect_fl ${ZPOOL} create ${name0} ${disk0} ${disk1} raidz1 ${disk2} ${disk3} ${disk4} 90expect_fl ${ZPOOL} status -x ${name0} 91expect_fl ${ZPOOL} destroy ${name0} 92 93expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} ${disk1} raidz1 ${disk2} ${disk3} ${disk4} 94expect_ok ${ZPOOL} status -x ${name0} 95expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 96exp=`( 97 echo " pool: ${name0}" 98 echo " state: ONLINE" 99 echo " scrub: none requested" 100 echo "config:" 101 echo " NAME STATE READ WRITE CKSUM" 102 echo " ${name0} ONLINE 0 0 0" 103 echo " ${disk0} ONLINE 0 0 0" 104 echo " ${disk1} ONLINE 0 0 0" 105 echo " raidz1 ONLINE 0 0 0" 106 echo " ${disk2} ONLINE 0 0 0" 107 echo " ${disk3} ONLINE 0 0 0" 108 echo " ${disk4} ONLINE 0 0 0" 109 echo "errors: No known data errors" 110)` 111expect "${exp}" ${ZPOOL} status ${name0} 112expect_ok ${ZPOOL} destroy ${name0} 113expect_fl ${ZPOOL} status -x ${name0} 114expect_fl ${ZPOOL} destroy ${name0} 115 116expect_fl ${ZPOOL} create ${name0} ${disk0} raidz2 ${disk1} ${disk2} ${disk3} ${disk4} 117expect_fl ${ZPOOL} status -x ${name0} 118expect_fl ${ZPOOL} destroy ${name0} 119 120expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} raidz2 ${disk1} ${disk2} ${disk3} ${disk4} 121expect_ok ${ZPOOL} status -x ${name0} 122expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 123exp=`( 124 echo " pool: ${name0}" 125 echo " state: ONLINE" 126 echo " scrub: none requested" 127 echo "config:" 128 echo " NAME STATE READ WRITE CKSUM" 129 echo " ${name0} ONLINE 0 0 0" 130 echo " ${disk0} ONLINE 0 0 0" 131 echo " raidz2 ONLINE 0 0 0" 132 echo " ${disk1} ONLINE 0 0 0" 133 echo " ${disk2} ONLINE 0 0 0" 134 echo " ${disk3} ONLINE 0 0 0" 135 echo " ${disk4} ONLINE 0 0 0" 136 echo "errors: No known data errors" 137)` 138expect "${exp}" ${ZPOOL} status ${name0} 139expect_ok ${ZPOOL} destroy ${name0} 140expect_fl ${ZPOOL} status -x ${name0} 141expect_fl ${ZPOOL} destroy ${name0} 142 143expect_fl ${ZPOOL} create ${name0} ${disk0} ${disk1} raidz2 ${disk2} ${disk3} ${disk4} ${disk5} 144expect_fl ${ZPOOL} status -x ${name0} 145expect_fl ${ZPOOL} destroy ${name0} 146 147expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} ${disk1} raidz2 ${disk2} ${disk3} ${disk4} ${disk5} 148expect_ok ${ZPOOL} status -x ${name0} 149expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 150exp=`( 151 echo " pool: ${name0}" 152 echo " state: ONLINE" 153 echo " scrub: none requested" 154 echo "config:" 155 echo " NAME STATE READ WRITE CKSUM" 156 echo " ${name0} ONLINE 0 0 0" 157 echo " ${disk0} ONLINE 0 0 0" 158 echo " ${disk1} ONLINE 0 0 0" 159 echo " raidz2 ONLINE 0 0 0" 160 echo " ${disk2} ONLINE 0 0 0" 161 echo " ${disk3} ONLINE 0 0 0" 162 echo " ${disk4} ONLINE 0 0 0" 163 echo " ${disk5} ONLINE 0 0 0" 164 echo "errors: No known data errors" 165)` 166expect "${exp}" ${ZPOOL} status ${name0} 167expect_ok ${ZPOOL} destroy ${name0} 168expect_fl ${ZPOOL} status -x ${name0} 169expect_fl ${ZPOOL} destroy ${name0} 170 171add_msg="# TODO Sun CR 6726091, Lustre bug 16873" 172expect_fl ${ZPOOL} create ${name0} ${disk0} log ${disk1} mirror ${disk2} ${disk3} 173expect_fl ${ZPOOL} status -x ${name0} 174expect_fl ${ZPOOL} destroy ${name0} 175add_msg="" 176 177expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} log ${disk1} mirror ${disk2} ${disk3} 178expect_ok ${ZPOOL} status -x ${name0} 179expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 180exp=`( 181 echo " pool: ${name0}" 182 echo " state: ONLINE" 183 echo " scrub: none requested" 184 echo "config:" 185 echo " NAME STATE READ WRITE CKSUM" 186 echo " ${name0} ONLINE 0 0 0" 187 echo " ${disk0} ONLINE 0 0 0" 188 echo " logs ONLINE 0 0 0" 189 echo " ${disk1} ONLINE 0 0 0" 190 echo " mirror ONLINE 0 0 0" 191 echo " ${disk2} ONLINE 0 0 0" 192 echo " ${disk3} ONLINE 0 0 0" 193 echo "errors: No known data errors" 194)` 195expect "${exp}" ${ZPOOL} status ${name0} 196expect_ok ${ZPOOL} destroy ${name0} 197expect_fl ${ZPOOL} status -x ${name0} 198expect_fl ${ZPOOL} destroy ${name0} 199 200disks_destroy 201