1#!/bin/sh 2 3dir=`dirname $0` 4. ${dir}/../../misc.sh 5 6echo "1..160" 7 8disks_create 6 9files_create 2 10names_create 1 11 12expect_fl ${ZPOOL} create ${name0} ${disk0} ${file0} 13expect_fl ${ZPOOL} status -x ${name0} 14expect_fl ${ZPOOL} destroy ${name0} 15 16expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} ${file0} 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 " ${file0} ONLINE 0 0 0" 28 echo "errors: No known data errors" 29)` 30expect "${exp}" ${ZPOOL} status ${name0} 31expect_ok ${ZPOOL} destroy ${name0} 32expect_fl ${ZPOOL} status -x ${name0} 33expect_fl ${ZPOOL} destroy ${name0} 34 35expect_fl ${ZPOOL} create ${name0} ${file0} ${disk0} 36expect_fl ${ZPOOL} status -x ${name0} 37expect_fl ${ZPOOL} destroy ${name0} 38 39expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${file0} ${disk0} 40expect_ok ${ZPOOL} status -x ${name0} 41expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 42exp=`( 43 echo " pool: ${name0}" 44 echo " state: ONLINE" 45 echo " scrub: none requested" 46 echo "config:" 47 echo " NAME STATE READ WRITE CKSUM" 48 echo " ${name0} ONLINE 0 0 0" 49 echo " ${file0} ONLINE 0 0 0" 50 echo " ${disk0} ONLINE 0 0 0" 51 echo "errors: No known data errors" 52)` 53expect "${exp}" ${ZPOOL} status ${name0} 54expect_ok ${ZPOOL} destroy ${name0} 55expect_fl ${ZPOOL} status -x ${name0} 56expect_fl ${ZPOOL} destroy ${name0} 57 58expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${file0} 59expect_fl ${ZPOOL} status -x ${name0} 60expect_fl ${ZPOOL} destroy ${name0} 61 62expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${file0} 63expect_ok ${ZPOOL} status -x ${name0} 64expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 65exp=`( 66 echo " pool: ${name0}" 67 echo " state: ONLINE" 68 echo " scrub: none requested" 69 echo "config:" 70 echo " NAME STATE READ WRITE CKSUM" 71 echo " ${name0} ONLINE 0 0 0" 72 echo " mirror ONLINE 0 0 0" 73 echo " ${disk0} ONLINE 0 0 0" 74 echo " ${file0} ONLINE 0 0 0" 75 echo "errors: No known data errors" 76)` 77expect "${exp}" ${ZPOOL} status ${name0} 78expect_ok ${ZPOOL} destroy ${name0} 79expect_fl ${ZPOOL} status -x ${name0} 80expect_fl ${ZPOOL} destroy ${name0} 81 82expect_fl ${ZPOOL} create ${name0} mirror ${file0} ${disk0} 83expect_fl ${ZPOOL} status -x ${name0} 84expect_fl ${ZPOOL} destroy ${name0} 85 86expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${file0} ${disk0} 87expect_ok ${ZPOOL} status -x ${name0} 88expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 89exp=`( 90 echo " pool: ${name0}" 91 echo " state: ONLINE" 92 echo " scrub: none requested" 93 echo "config:" 94 echo " NAME STATE READ WRITE CKSUM" 95 echo " ${name0} ONLINE 0 0 0" 96 echo " mirror ONLINE 0 0 0" 97 echo " ${file0} ONLINE 0 0 0" 98 echo " ${disk0} ONLINE 0 0 0" 99 echo "errors: No known data errors" 100)` 101expect "${exp}" ${ZPOOL} status ${name0} 102expect_ok ${ZPOOL} destroy ${name0} 103expect_fl ${ZPOOL} status -x ${name0} 104expect_fl ${ZPOOL} destroy ${name0} 105 106expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${file0} ${file1} 107expect_fl ${ZPOOL} status -x ${name0} 108expect_fl ${ZPOOL} destroy ${name0} 109 110expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${file0} ${file1} 111expect_ok ${ZPOOL} status -x ${name0} 112expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 113exp=`( 114 echo " pool: ${name0}" 115 echo " state: ONLINE" 116 echo " scrub: none requested" 117 echo "config:" 118 echo " NAME STATE READ WRITE CKSUM" 119 echo " ${name0} ONLINE 0 0 0" 120 echo " mirror ONLINE 0 0 0" 121 echo " ${disk0} ONLINE 0 0 0" 122 echo " ${file0} ONLINE 0 0 0" 123 echo " ${file1} ONLINE 0 0 0" 124 echo "errors: No known data errors" 125)` 126expect "${exp}" ${ZPOOL} status ${name0} 127expect_ok ${ZPOOL} destroy ${name0} 128expect_fl ${ZPOOL} status -x ${name0} 129expect_fl ${ZPOOL} destroy ${name0} 130 131expect_fl ${ZPOOL} create ${name0} mirror ${file0} ${disk0} ${disk1} 132expect_fl ${ZPOOL} status -x ${name0} 133expect_fl ${ZPOOL} destroy ${name0} 134 135expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${file0} ${disk0} ${disk1} 136expect_ok ${ZPOOL} status -x ${name0} 137expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 138exp=`( 139 echo " pool: ${name0}" 140 echo " state: ONLINE" 141 echo " scrub: none requested" 142 echo "config:" 143 echo " NAME STATE READ WRITE CKSUM" 144 echo " ${name0} ONLINE 0 0 0" 145 echo " mirror ONLINE 0 0 0" 146 echo " ${file0} ONLINE 0 0 0" 147 echo " ${disk0} ONLINE 0 0 0" 148 echo " ${disk1} ONLINE 0 0 0" 149 echo "errors: No known data errors" 150)` 151expect "${exp}" ${ZPOOL} status ${name0} 152expect_ok ${ZPOOL} destroy ${name0} 153expect_fl ${ZPOOL} status -x ${name0} 154expect_fl ${ZPOOL} destroy ${name0} 155 156expect_fl ${ZPOOL} create ${name0} raidz1 ${disk0} ${file0} 157expect_fl ${ZPOOL} status -x ${name0} 158expect_fl ${ZPOOL} destroy ${name0} 159 160expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${disk0} ${file0} 161expect_ok ${ZPOOL} status -x ${name0} 162expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 163exp=`( 164 echo " pool: ${name0}" 165 echo " state: ONLINE" 166 echo " scrub: none requested" 167 echo "config:" 168 echo " NAME STATE READ WRITE CKSUM" 169 echo " ${name0} ONLINE 0 0 0" 170 echo " raidz1 ONLINE 0 0 0" 171 echo " ${disk0} ONLINE 0 0 0" 172 echo " ${file0} ONLINE 0 0 0" 173 echo "errors: No known data errors" 174)` 175expect "${exp}" ${ZPOOL} status ${name0} 176expect_ok ${ZPOOL} destroy ${name0} 177expect_fl ${ZPOOL} status -x ${name0} 178expect_fl ${ZPOOL} destroy ${name0} 179 180expect_fl ${ZPOOL} create ${name0} raidz1 ${file0} ${disk0} 181expect_fl ${ZPOOL} status -x ${name0} 182expect_fl ${ZPOOL} destroy ${name0} 183 184expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${file0} ${disk0} 185expect_ok ${ZPOOL} status -x ${name0} 186expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 187exp=`( 188 echo " pool: ${name0}" 189 echo " state: ONLINE" 190 echo " scrub: none requested" 191 echo "config:" 192 echo " NAME STATE READ WRITE CKSUM" 193 echo " ${name0} ONLINE 0 0 0" 194 echo " raidz1 ONLINE 0 0 0" 195 echo " ${file0} ONLINE 0 0 0" 196 echo " ${disk0} ONLINE 0 0 0" 197 echo "errors: No known data errors" 198)` 199expect "${exp}" ${ZPOOL} status ${name0} 200expect_ok ${ZPOOL} destroy ${name0} 201expect_fl ${ZPOOL} status -x ${name0} 202expect_fl ${ZPOOL} destroy ${name0} 203 204expect_fl ${ZPOOL} create ${name0} raidz1 ${disk0} ${file0} ${file1} 205expect_fl ${ZPOOL} status -x ${name0} 206expect_fl ${ZPOOL} destroy ${name0} 207 208expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${disk0} ${file0} ${file1} 209expect_ok ${ZPOOL} status -x ${name0} 210expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 211exp=`( 212 echo " pool: ${name0}" 213 echo " state: ONLINE" 214 echo " scrub: none requested" 215 echo "config:" 216 echo " NAME STATE READ WRITE CKSUM" 217 echo " ${name0} ONLINE 0 0 0" 218 echo " raidz1 ONLINE 0 0 0" 219 echo " ${disk0} ONLINE 0 0 0" 220 echo " ${file0} ONLINE 0 0 0" 221 echo " ${file1} ONLINE 0 0 0" 222 echo "errors: No known data errors" 223)` 224expect "${exp}" ${ZPOOL} status ${name0} 225expect_ok ${ZPOOL} destroy ${name0} 226expect_fl ${ZPOOL} status -x ${name0} 227expect_fl ${ZPOOL} destroy ${name0} 228 229expect_fl ${ZPOOL} create ${name0} raidz1 ${file0} ${disk0} ${disk1} 230expect_fl ${ZPOOL} status -x ${name0} 231expect_fl ${ZPOOL} destroy ${name0} 232 233expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${file0} ${disk0} ${disk1} 234expect_ok ${ZPOOL} status -x ${name0} 235expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 236exp=`( 237 echo " pool: ${name0}" 238 echo " state: ONLINE" 239 echo " scrub: none requested" 240 echo "config:" 241 echo " NAME STATE READ WRITE CKSUM" 242 echo " ${name0} ONLINE 0 0 0" 243 echo " raidz1 ONLINE 0 0 0" 244 echo " ${file0} ONLINE 0 0 0" 245 echo " ${disk0} ONLINE 0 0 0" 246 echo " ${disk1} 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 254expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0} ${file0} ${file1} 255expect_fl ${ZPOOL} status -x ${name0} 256expect_fl ${ZPOOL} destroy ${name0} 257 258expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${disk0} ${file0} ${file1} 259expect_ok ${ZPOOL} status -x ${name0} 260expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 261exp=`( 262 echo " pool: ${name0}" 263 echo " state: ONLINE" 264 echo " scrub: none requested" 265 echo "config:" 266 echo " NAME STATE READ WRITE CKSUM" 267 echo " ${name0} ONLINE 0 0 0" 268 echo " raidz2 ONLINE 0 0 0" 269 echo " ${disk0} ONLINE 0 0 0" 270 echo " ${file0} ONLINE 0 0 0" 271 echo " ${file1} ONLINE 0 0 0" 272 echo "errors: No known data errors" 273)` 274expect "${exp}" ${ZPOOL} status ${name0} 275expect_ok ${ZPOOL} destroy ${name0} 276expect_fl ${ZPOOL} status -x ${name0} 277expect_fl ${ZPOOL} destroy ${name0} 278 279expect_fl ${ZPOOL} create ${name0} raidz2 ${file0} ${disk0} ${disk1} 280expect_fl ${ZPOOL} status -x ${name0} 281expect_fl ${ZPOOL} destroy ${name0} 282 283expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${file0} ${disk0} ${disk1} 284expect_ok ${ZPOOL} status -x ${name0} 285expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 286exp=`( 287 echo " pool: ${name0}" 288 echo " state: ONLINE" 289 echo " scrub: none requested" 290 echo "config:" 291 echo " NAME STATE READ WRITE CKSUM" 292 echo " ${name0} ONLINE 0 0 0" 293 echo " raidz2 ONLINE 0 0 0" 294 echo " ${file0} ONLINE 0 0 0" 295 echo " ${disk0} ONLINE 0 0 0" 296 echo " ${disk1} ONLINE 0 0 0" 297 echo "errors: No known data errors" 298)` 299expect "${exp}" ${ZPOOL} status ${name0} 300expect_ok ${ZPOOL} destroy ${name0} 301expect_fl ${ZPOOL} status -x ${name0} 302expect_fl ${ZPOOL} destroy ${name0} 303 304expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${file0} ${file1} 305expect_fl ${ZPOOL} status -x ${name0} 306expect_fl ${ZPOOL} destroy ${name0} 307 308expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${disk0} ${disk1} ${file0} ${file1} 309expect_ok ${ZPOOL} status -x ${name0} 310expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 311exp=`( 312 echo " pool: ${name0}" 313 echo " state: ONLINE" 314 echo " scrub: none requested" 315 echo "config:" 316 echo " NAME STATE READ WRITE CKSUM" 317 echo " ${name0} ONLINE 0 0 0" 318 echo " raidz2 ONLINE 0 0 0" 319 echo " ${disk0} ONLINE 0 0 0" 320 echo " ${disk1} ONLINE 0 0 0" 321 echo " ${file0} ONLINE 0 0 0" 322 echo " ${file1} ONLINE 0 0 0" 323 echo "errors: No known data errors" 324)` 325expect "${exp}" ${ZPOOL} status ${name0} 326expect_ok ${ZPOOL} destroy ${name0} 327expect_fl ${ZPOOL} status -x ${name0} 328expect_fl ${ZPOOL} destroy ${name0} 329 330expect_fl ${ZPOOL} create ${name0} raidz2 ${file0} ${disk0} ${file1} ${disk1} 331expect_fl ${ZPOOL} status -x ${name0} 332expect_fl ${ZPOOL} destroy ${name0} 333 334expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${file0} ${disk0} ${file1} ${disk1} 335expect_ok ${ZPOOL} status -x ${name0} 336expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 337exp=`( 338 echo " pool: ${name0}" 339 echo " state: ONLINE" 340 echo " scrub: none requested" 341 echo "config:" 342 echo " NAME STATE READ WRITE CKSUM" 343 echo " ${name0} ONLINE 0 0 0" 344 echo " raidz2 ONLINE 0 0 0" 345 echo " ${file0} ONLINE 0 0 0" 346 echo " ${disk0} ONLINE 0 0 0" 347 echo " ${file1} ONLINE 0 0 0" 348 echo " ${disk1} ONLINE 0 0 0" 349 echo "errors: No known data errors" 350)` 351expect "${exp}" ${ZPOOL} status ${name0} 352expect_ok ${ZPOOL} destroy ${name0} 353expect_fl ${ZPOOL} status -x ${name0} 354expect_fl ${ZPOOL} destroy ${name0} 355 356add_msg="# TODO Sun CR 6726091, Lustre bug 16873" 357expect_fl ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${file0} 358expect_fl ${ZPOOL} status -x ${name0} 359expect_fl ${ZPOOL} destroy ${name0} 360add_msg="" 361 362expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} log mirror ${disk1} ${file0} 363expect_ok ${ZPOOL} status -x ${name0} 364expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 365exp=`( 366 echo " pool: ${name0}" 367 echo " state: ONLINE" 368 echo " scrub: none requested" 369 echo "config:" 370 echo " NAME STATE READ WRITE CKSUM" 371 echo " ${name0} ONLINE 0 0 0" 372 echo " ${disk0} ONLINE 0 0 0" 373 echo " logs ONLINE 0 0 0" 374 echo " mirror ONLINE 0 0 0" 375 echo " ${disk1} ONLINE 0 0 0" 376 echo " ${file0} ONLINE 0 0 0" 377 echo "errors: No known data errors" 378)` 379expect "${exp}" ${ZPOOL} status ${name0} 380expect_ok ${ZPOOL} destroy ${name0} 381expect_fl ${ZPOOL} status -x ${name0} 382expect_fl ${ZPOOL} destroy ${name0} 383 384add_msg="# TODO Sun CR 6726091, Lustre bug 16873" 385expect_fl ${ZPOOL} create ${name0} ${file0} log mirror ${file1} ${disk0} 386expect_fl ${ZPOOL} status -x ${name0} 387expect_fl ${ZPOOL} destroy ${name0} 388add_msg="" 389 390expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${file0} log mirror ${file1} ${disk0} 391expect_ok ${ZPOOL} status -x ${name0} 392expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 393exp=`( 394 echo " pool: ${name0}" 395 echo " state: ONLINE" 396 echo " scrub: none requested" 397 echo "config:" 398 echo " NAME STATE READ WRITE CKSUM" 399 echo " ${name0} ONLINE 0 0 0" 400 echo " ${file0} ONLINE 0 0 0" 401 echo " logs ONLINE 0 0 0" 402 echo " mirror ONLINE 0 0 0" 403 echo " ${file1} ONLINE 0 0 0" 404 echo " ${disk0} ONLINE 0 0 0" 405 echo "errors: No known data errors" 406)` 407expect "${exp}" ${ZPOOL} status ${name0} 408expect_ok ${ZPOOL} destroy ${name0} 409expect_fl ${ZPOOL} status -x ${name0} 410expect_fl ${ZPOOL} destroy ${name0} 411 412disks_destroy 413files_destroy 414