1#!/bin/sh 2 3dir=`dirname $0` 4. ${dir}/../../misc.sh 5 6echo "1..104" 7 8disks_create 1 64M 9disks_create 4 10disks_create 3 64M 11files_create 1 64M 12files_create 4 13files_create 3 64M 14names_create 1 15 16expect_ok ${ZPOOL} create ${name0} ${disk0} ${disk1} 17expect_ok ${ZPOOL} status -x ${name0} 18expect_ok ${ZPOOL} destroy ${name0} 19 20expect_ok ${ZPOOL} create ${name0} ${file0} ${file1} 21expect_ok ${ZPOOL} status -x ${name0} 22expect_ok ${ZPOOL} destroy ${name0} 23 24expect_ok ${ZPOOL} create ${name0} mirror ${disk1} ${disk2} mirror ${disk0} ${disk5} 25expect_ok ${ZPOOL} status -x ${name0} 26expect_ok ${ZPOOL} destroy ${name0} 27 28expect_ok ${ZPOOL} create ${name0} mirror ${file1} ${file2} mirror ${file0} ${file5} 29expect_ok ${ZPOOL} status -x ${name0} 30expect_ok ${ZPOOL} destroy ${name0} 31 32expect_ok ${ZPOOL} create ${name0} raidz1 ${disk1} ${disk2} ${disk3} raidz1 ${disk0} ${disk5} ${disk6} 33expect_ok ${ZPOOL} status -x ${name0} 34expect_ok ${ZPOOL} destroy ${name0} 35 36expect_ok ${ZPOOL} create ${name0} raidz1 ${file1} ${file2} ${file3} raidz1 ${file0} ${file5} ${file6} 37expect_ok ${ZPOOL} status -x ${name0} 38expect_ok ${ZPOOL} destroy ${name0} 39 40expect_ok ${ZPOOL} create ${name0} raidz2 ${disk1} ${disk2} ${disk3} ${disk4} raidz2 ${disk0} ${disk5} ${disk6} ${disk7} 41expect_ok ${ZPOOL} status -x ${name0} 42expect_ok ${ZPOOL} destroy ${name0} 43 44expect_ok ${ZPOOL} create ${name0} raidz2 ${file1} ${file2} ${file3} ${file4} raidz2 ${file0} ${file5} ${file6} ${file7} 45expect_ok ${ZPOOL} status -x ${name0} 46expect_ok ${ZPOOL} destroy ${name0} 47 48expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 49expect_fl ${ZPOOL} status -x ${name0} 50expect_fl ${ZPOOL} destroy ${name0} 51 52expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} 53expect_ok ${ZPOOL} status -x ${name0} 54expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 55exp=`( 56 echo " pool: ${name0}" 57 echo " state: ONLINE" 58 echo " scrub: none requested" 59 echo "config:" 60 echo " NAME STATE READ WRITE CKSUM" 61 echo " ${name0} ONLINE 0 0 0" 62 echo " mirror ONLINE 0 0 0" 63 echo " ${disk0} ONLINE 0 0 0" 64 echo " ${disk1} ONLINE 0 0 0" 65 echo "errors: No known data errors" 66)` 67expect "${exp}" ${ZPOOL} status ${name0} 68expect_ok ${ZPOOL} destroy ${name0} 69expect_fl ${ZPOOL} status -x ${name0} 70expect_fl ${ZPOOL} destroy ${name0} 71 72expect_fl ${ZPOOL} create ${name0} mirror ${file0} ${file1} 73expect_fl ${ZPOOL} status -x ${name0} 74expect_fl ${ZPOOL} destroy ${name0} 75 76expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${file0} ${file1} 77expect_ok ${ZPOOL} status -x ${name0} 78expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 79exp=`( 80 echo " pool: ${name0}" 81 echo " state: ONLINE" 82 echo " scrub: none requested" 83 echo "config:" 84 echo " NAME STATE READ WRITE CKSUM" 85 echo " ${name0} ONLINE 0 0 0" 86 echo " mirror ONLINE 0 0 0" 87 echo " ${file0} ONLINE 0 0 0" 88 echo " ${file1} ONLINE 0 0 0" 89 echo "errors: No known data errors" 90)` 91expect "${exp}" ${ZPOOL} status ${name0} 92expect_ok ${ZPOOL} destroy ${name0} 93expect_fl ${ZPOOL} status -x ${name0} 94expect_fl ${ZPOOL} destroy ${name0} 95 96expect_fl ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 97expect_fl ${ZPOOL} status -x ${name0} 98expect_fl ${ZPOOL} destroy ${name0} 99 100expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${disk0} ${disk1} ${disk2} 101expect_ok ${ZPOOL} status -x ${name0} 102expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 103exp=`( 104 echo " pool: ${name0}" 105 echo " state: ONLINE" 106 echo " scrub: none requested" 107 echo "config:" 108 echo " NAME STATE READ WRITE CKSUM" 109 echo " ${name0} ONLINE 0 0 0" 110 echo " raidz1 ONLINE 0 0 0" 111 echo " ${disk0} ONLINE 0 0 0" 112 echo " ${disk1} ONLINE 0 0 0" 113 echo " ${disk2} ONLINE 0 0 0" 114 echo "errors: No known data errors" 115)` 116expect "${exp}" ${ZPOOL} status ${name0} 117expect_ok ${ZPOOL} destroy ${name0} 118expect_fl ${ZPOOL} status -x ${name0} 119expect_fl ${ZPOOL} destroy ${name0} 120 121expect_fl ${ZPOOL} create ${name0} raidz1 ${file0} ${file1} ${file2} 122expect_fl ${ZPOOL} status -x ${name0} 123expect_fl ${ZPOOL} destroy ${name0} 124 125expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${file0} ${file1} ${file2} 126expect_ok ${ZPOOL} status -x ${name0} 127expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 128exp=`( 129 echo " pool: ${name0}" 130 echo " state: ONLINE" 131 echo " scrub: none requested" 132 echo "config:" 133 echo " NAME STATE READ WRITE CKSUM" 134 echo " ${name0} ONLINE 0 0 0" 135 echo " raidz1 ONLINE 0 0 0" 136 echo " ${file0} ONLINE 0 0 0" 137 echo " ${file1} ONLINE 0 0 0" 138 echo " ${file2} ONLINE 0 0 0" 139 echo "errors: No known data errors" 140)` 141expect "${exp}" ${ZPOOL} status ${name0} 142expect_ok ${ZPOOL} destroy ${name0} 143expect_fl ${ZPOOL} status -x ${name0} 144expect_fl ${ZPOOL} destroy ${name0} 145 146expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 147expect_fl ${ZPOOL} status -x ${name0} 148expect_fl ${ZPOOL} destroy ${name0} 149 150expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 151expect_ok ${ZPOOL} status -x ${name0} 152expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 153exp=`( 154 echo " pool: ${name0}" 155 echo " state: ONLINE" 156 echo " scrub: none requested" 157 echo "config:" 158 echo " NAME STATE READ WRITE CKSUM" 159 echo " ${name0} ONLINE 0 0 0" 160 echo " raidz2 ONLINE 0 0 0" 161 echo " ${disk0} ONLINE 0 0 0" 162 echo " ${disk1} ONLINE 0 0 0" 163 echo " ${disk2} ONLINE 0 0 0" 164 echo " ${disk3} ONLINE 0 0 0" 165 echo "errors: No known data errors" 166)` 167expect "${exp}" ${ZPOOL} status ${name0} 168expect_ok ${ZPOOL} destroy ${name0} 169expect_fl ${ZPOOL} status -x ${name0} 170expect_fl ${ZPOOL} destroy ${name0} 171 172expect_fl ${ZPOOL} create ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} 173expect_fl ${ZPOOL} status -x ${name0} 174expect_fl ${ZPOOL} destroy ${name0} 175 176expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} 177expect_ok ${ZPOOL} status -x ${name0} 178expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 179exp=`( 180 echo " pool: ${name0}" 181 echo " state: ONLINE" 182 echo " scrub: none requested" 183 echo "config:" 184 echo " NAME STATE READ WRITE CKSUM" 185 echo " ${name0} ONLINE 0 0 0" 186 echo " raidz2 ONLINE 0 0 0" 187 echo " ${file0} ONLINE 0 0 0" 188 echo " ${file1} ONLINE 0 0 0" 189 echo " ${file2} ONLINE 0 0 0" 190 echo " ${file3} ONLINE 0 0 0" 191 echo "errors: No known data errors" 192)` 193expect "${exp}" ${ZPOOL} status ${name0} 194expect_ok ${ZPOOL} destroy ${name0} 195expect_fl ${ZPOOL} status -x ${name0} 196expect_fl ${ZPOOL} destroy ${name0} 197 198add_msg="# TODO Sun CR 6726091, Lustre bug 16873" 199expect_fl ${ZPOOL} create ${name0} ${disk1} log mirror ${disk0} ${disk2} 200expect_fl ${ZPOOL} status -x ${name0} 201expect_fl ${ZPOOL} destroy ${name0} 202add_msg="" 203 204expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk1} log mirror ${disk0} ${disk2} 205expect_ok ${ZPOOL} status -x ${name0} 206expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 207exp=`( 208 echo " pool: ${name0}" 209 echo " state: ONLINE" 210 echo " scrub: none requested" 211 echo "config:" 212 echo " NAME STATE READ WRITE CKSUM" 213 echo " ${name0} ONLINE 0 0 0" 214 echo " ${disk1} ONLINE 0 0 0" 215 echo " logs ONLINE 0 0 0" 216 echo " mirror ONLINE 0 0 0" 217 echo " ${disk0} ONLINE 0 0 0" 218 echo " ${disk2} ONLINE 0 0 0" 219 echo "errors: No known data errors" 220)` 221expect "${exp}" ${ZPOOL} status ${name0} 222expect_ok ${ZPOOL} destroy ${name0} 223expect_fl ${ZPOOL} status -x ${name0} 224expect_fl ${ZPOOL} destroy ${name0} 225 226add_msg="# TODO Sun CR 6726091, Lustre bug 16873" 227expect_fl ${ZPOOL} create ${name0} ${file1} log mirror ${file0} ${file2} 228expect_fl ${ZPOOL} status -x ${name0} 229expect_fl ${ZPOOL} destroy ${name0} 230add_msg="" 231 232expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${file1} log mirror ${file0} ${file2} 233expect_ok ${ZPOOL} status -x ${name0} 234expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 235exp=`( 236 echo " pool: ${name0}" 237 echo " state: ONLINE" 238 echo " scrub: none requested" 239 echo "config:" 240 echo " NAME STATE READ WRITE CKSUM" 241 echo " ${name0} ONLINE 0 0 0" 242 echo " ${file1} ONLINE 0 0 0" 243 echo " logs ONLINE 0 0 0" 244 echo " mirror ONLINE 0 0 0" 245 echo " ${file0} ONLINE 0 0 0" 246 echo " ${file2} ONLINE 0 0 0" 247 echo "errors: No known data errors" 248)` 249expect "${exp}" ${ZPOOL} status ${name0} 250expect_ok ${ZPOOL} destroy ${name0} 251expect_fl ${ZPOOL} status -x ${name0} 252expect_fl ${ZPOOL} destroy ${name0} 253 254disks_destroy 255files_destroy 256