1185029Spjd#!/bin/sh 2185029Spjd# $FreeBSD: releng/10.3/tools/regression/zfs/zpool/add/option-f_size_mismatch.t 185029 2008-11-17 20:49:29Z pjd $ 3185029Spjd 4185029Spjddir=`dirname $0` 5185029Spjd. ${dir}/../../misc.sh 6185029Spjd 7185029Spjdecho "1..100" 8185029Spjd 9185029Spjddisks_create 7 10185029Spjddisks_create 1 64M 11185029Spjdfiles_create 7 12185029Spjdfiles_create 1 64M 13185029Spjdnames_create 1 14185029Spjd 15185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 16185029Spjdexpect_fl ${ZPOOL} add ${name0} mirror ${disk7} ${disk2} 17185029Spjdexp=`( 18185029Spjd echo " pool: ${name0}" 19185029Spjd echo " state: ONLINE" 20185029Spjd echo " scrub: none requested" 21185029Spjd echo "config:" 22185029Spjd echo " NAME STATE READ WRITE CKSUM" 23185029Spjd echo " ${name0} ONLINE 0 0 0" 24185029Spjd echo " mirror ONLINE 0 0 0" 25185029Spjd echo " ${disk0} ONLINE 0 0 0" 26185029Spjd echo " ${disk1} ONLINE 0 0 0" 27185029Spjd echo "errors: No known data errors" 28185029Spjd)` 29185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 30185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 31185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 32185029Spjd 33185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 34185029Spjdexpect_ok ${ZPOOL} add -f ${name0} mirror ${disk7} ${disk2} 35185029Spjdexp=`( 36185029Spjd echo " pool: ${name0}" 37185029Spjd echo " state: ONLINE" 38185029Spjd echo " scrub: none requested" 39185029Spjd echo "config:" 40185029Spjd echo " NAME STATE READ WRITE CKSUM" 41185029Spjd echo " ${name0} ONLINE 0 0 0" 42185029Spjd echo " mirror ONLINE 0 0 0" 43185029Spjd echo " ${disk0} ONLINE 0 0 0" 44185029Spjd echo " ${disk1} ONLINE 0 0 0" 45185029Spjd echo " mirror ONLINE 0 0 0" 46185029Spjd echo " ${disk7} ONLINE 0 0 0" 47185029Spjd echo " ${disk2} ONLINE 0 0 0" 48185029Spjd echo "errors: No known data errors" 49185029Spjd)` 50185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 51185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 52185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 53185029Spjd 54185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${file0} ${file1} 55185029Spjdexpect_fl ${ZPOOL} add ${name0} mirror ${file7} ${file2} 56185029Spjdexp=`( 57185029Spjd echo " pool: ${name0}" 58185029Spjd echo " state: ONLINE" 59185029Spjd echo " scrub: none requested" 60185029Spjd echo "config:" 61185029Spjd echo " NAME STATE READ WRITE CKSUM" 62185029Spjd echo " ${name0} ONLINE 0 0 0" 63185029Spjd echo " mirror ONLINE 0 0 0" 64185029Spjd echo " ${file0} ONLINE 0 0 0" 65185029Spjd echo " ${file1} ONLINE 0 0 0" 66185029Spjd echo "errors: No known data errors" 67185029Spjd)` 68185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 69185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 70185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 71185029Spjd 72185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${file0} ${file1} 73185029Spjdexpect_ok ${ZPOOL} add -f ${name0} mirror ${file7} ${file2} 74185029Spjdexp=`( 75185029Spjd echo " pool: ${name0}" 76185029Spjd echo " state: ONLINE" 77185029Spjd echo " scrub: none requested" 78185029Spjd echo "config:" 79185029Spjd echo " NAME STATE READ WRITE CKSUM" 80185029Spjd echo " ${name0} ONLINE 0 0 0" 81185029Spjd echo " mirror ONLINE 0 0 0" 82185029Spjd echo " ${file0} ONLINE 0 0 0" 83185029Spjd echo " ${file1} ONLINE 0 0 0" 84185029Spjd echo " mirror ONLINE 0 0 0" 85185029Spjd echo " ${file7} ONLINE 0 0 0" 86185029Spjd echo " ${file2} ONLINE 0 0 0" 87185029Spjd echo "errors: No known data errors" 88185029Spjd)` 89185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 90185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 91185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 92185029Spjd 93185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 94185029Spjdexpect_fl ${ZPOOL} add ${name0} raidz1 ${disk3} ${disk7} ${disk4} 95185029Spjdexp=`( 96185029Spjd echo " pool: ${name0}" 97185029Spjd echo " state: ONLINE" 98185029Spjd echo " scrub: none requested" 99185029Spjd echo "config:" 100185029Spjd echo " NAME STATE READ WRITE CKSUM" 101185029Spjd echo " ${name0} ONLINE 0 0 0" 102185029Spjd echo " raidz1 ONLINE 0 0 0" 103185029Spjd echo " ${disk0} ONLINE 0 0 0" 104185029Spjd echo " ${disk1} ONLINE 0 0 0" 105185029Spjd echo " ${disk2} ONLINE 0 0 0" 106185029Spjd echo "errors: No known data errors" 107185029Spjd)` 108185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 109185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 110185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 111185029Spjd 112185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 113185029Spjdexpect_ok ${ZPOOL} add -f ${name0} raidz1 ${disk3} ${disk7} ${disk4} 114185029Spjdexp=`( 115185029Spjd echo " pool: ${name0}" 116185029Spjd echo " state: ONLINE" 117185029Spjd echo " scrub: none requested" 118185029Spjd echo "config:" 119185029Spjd echo " NAME STATE READ WRITE CKSUM" 120185029Spjd echo " ${name0} ONLINE 0 0 0" 121185029Spjd echo " raidz1 ONLINE 0 0 0" 122185029Spjd echo " ${disk0} ONLINE 0 0 0" 123185029Spjd echo " ${disk1} ONLINE 0 0 0" 124185029Spjd echo " ${disk2} ONLINE 0 0 0" 125185029Spjd echo " raidz1 ONLINE 0 0 0" 126185029Spjd echo " ${disk3} ONLINE 0 0 0" 127185029Spjd echo " ${disk7} ONLINE 0 0 0" 128185029Spjd echo " ${disk4} ONLINE 0 0 0" 129185029Spjd echo "errors: No known data errors" 130185029Spjd)` 131185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 132185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 133185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 134185029Spjd 135185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz1 ${file0} ${file1} ${file2} 136185029Spjdexpect_fl ${ZPOOL} add ${name0} raidz1 ${file3} ${file7} ${file4} 137185029Spjdexp=`( 138185029Spjd echo " pool: ${name0}" 139185029Spjd echo " state: ONLINE" 140185029Spjd echo " scrub: none requested" 141185029Spjd echo "config:" 142185029Spjd echo " NAME STATE READ WRITE CKSUM" 143185029Spjd echo " ${name0} ONLINE 0 0 0" 144185029Spjd echo " raidz1 ONLINE 0 0 0" 145185029Spjd echo " ${file0} ONLINE 0 0 0" 146185029Spjd echo " ${file1} ONLINE 0 0 0" 147185029Spjd echo " ${file2} ONLINE 0 0 0" 148185029Spjd echo "errors: No known data errors" 149185029Spjd)` 150185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 151185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 152185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 153185029Spjd 154185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz1 ${file0} ${file1} ${file2} 155185029Spjdexpect_ok ${ZPOOL} add -f ${name0} raidz1 ${file3} ${file7} ${file4} 156185029Spjdexp=`( 157185029Spjd echo " pool: ${name0}" 158185029Spjd echo " state: ONLINE" 159185029Spjd echo " scrub: none requested" 160185029Spjd echo "config:" 161185029Spjd echo " NAME STATE READ WRITE CKSUM" 162185029Spjd echo " ${name0} ONLINE 0 0 0" 163185029Spjd echo " raidz1 ONLINE 0 0 0" 164185029Spjd echo " ${file0} ONLINE 0 0 0" 165185029Spjd echo " ${file1} ONLINE 0 0 0" 166185029Spjd echo " ${file2} ONLINE 0 0 0" 167185029Spjd echo " raidz1 ONLINE 0 0 0" 168185029Spjd echo " ${file3} ONLINE 0 0 0" 169185029Spjd echo " ${file7} ONLINE 0 0 0" 170185029Spjd echo " ${file4} ONLINE 0 0 0" 171185029Spjd echo "errors: No known data errors" 172185029Spjd)` 173185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 174185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 175185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 176185029Spjd 177185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 178185029Spjdexpect_fl ${ZPOOL} add ${name0} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} 179185029Spjdexp=`( 180185029Spjd echo " pool: ${name0}" 181185029Spjd echo " state: ONLINE" 182185029Spjd echo " scrub: none requested" 183185029Spjd echo "config:" 184185029Spjd echo " NAME STATE READ WRITE CKSUM" 185185029Spjd echo " ${name0} ONLINE 0 0 0" 186185029Spjd echo " raidz2 ONLINE 0 0 0" 187185029Spjd echo " ${disk0} ONLINE 0 0 0" 188185029Spjd echo " ${disk1} ONLINE 0 0 0" 189185029Spjd echo " ${disk2} ONLINE 0 0 0" 190185029Spjd echo " ${disk3} ONLINE 0 0 0" 191185029Spjd echo "errors: No known data errors" 192185029Spjd)` 193185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 194185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 195185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 196185029Spjd 197185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 198185029Spjdexpect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} 199185029Spjdexp=`( 200185029Spjd echo " pool: ${name0}" 201185029Spjd echo " state: ONLINE" 202185029Spjd echo " scrub: none requested" 203185029Spjd echo "config:" 204185029Spjd echo " NAME STATE READ WRITE CKSUM" 205185029Spjd echo " ${name0} ONLINE 0 0 0" 206185029Spjd echo " raidz2 ONLINE 0 0 0" 207185029Spjd echo " ${disk0} ONLINE 0 0 0" 208185029Spjd echo " ${disk1} ONLINE 0 0 0" 209185029Spjd echo " ${disk2} ONLINE 0 0 0" 210185029Spjd echo " ${disk3} ONLINE 0 0 0" 211185029Spjd echo " raidz2 ONLINE 0 0 0" 212185029Spjd echo " ${disk4} ONLINE 0 0 0" 213185029Spjd echo " ${disk5} ONLINE 0 0 0" 214185029Spjd echo " ${disk6} ONLINE 0 0 0" 215185029Spjd echo " ${disk7} ONLINE 0 0 0" 216185029Spjd echo "errors: No known data errors" 217185029Spjd)` 218185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 219185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 220185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 221185029Spjd 222185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} 223185029Spjdexpect_fl ${ZPOOL} add ${name0} raidz2 ${file4} ${file5} ${file6} ${file7} 224185029Spjdexp=`( 225185029Spjd echo " pool: ${name0}" 226185029Spjd echo " state: ONLINE" 227185029Spjd echo " scrub: none requested" 228185029Spjd echo "config:" 229185029Spjd echo " NAME STATE READ WRITE CKSUM" 230185029Spjd echo " ${name0} ONLINE 0 0 0" 231185029Spjd echo " raidz2 ONLINE 0 0 0" 232185029Spjd echo " ${file0} ONLINE 0 0 0" 233185029Spjd echo " ${file1} ONLINE 0 0 0" 234185029Spjd echo " ${file2} ONLINE 0 0 0" 235185029Spjd echo " ${file3} ONLINE 0 0 0" 236185029Spjd echo "errors: No known data errors" 237185029Spjd)` 238185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 239185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 240185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 241185029Spjd 242185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${file0} ${file1} ${file2} ${file3} 243185029Spjdexpect_ok ${ZPOOL} add -f ${name0} raidz2 ${file4} ${file5} ${file6} ${file7} 244185029Spjdexp=`( 245185029Spjd echo " pool: ${name0}" 246185029Spjd echo " state: ONLINE" 247185029Spjd echo " scrub: none requested" 248185029Spjd echo "config:" 249185029Spjd echo " NAME STATE READ WRITE CKSUM" 250185029Spjd echo " ${name0} ONLINE 0 0 0" 251185029Spjd echo " raidz2 ONLINE 0 0 0" 252185029Spjd echo " ${file0} ONLINE 0 0 0" 253185029Spjd echo " ${file1} ONLINE 0 0 0" 254185029Spjd echo " ${file2} ONLINE 0 0 0" 255185029Spjd echo " ${file3} ONLINE 0 0 0" 256185029Spjd echo " raidz2 ONLINE 0 0 0" 257185029Spjd echo " ${file4} ONLINE 0 0 0" 258185029Spjd echo " ${file5} ONLINE 0 0 0" 259185029Spjd echo " ${file6} ONLINE 0 0 0" 260185029Spjd echo " ${file7} ONLINE 0 0 0" 261185029Spjd echo "errors: No known data errors" 262185029Spjd)` 263185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 264185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 265185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 266185029Spjd 267185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} 268185029Spjdadd_msg="# TODO Sun CR 6726091, Lustre bug 16873" 269185029Spjdexpect_fl ${ZPOOL} add ${name0} log mirror ${disk1} ${disk7} 270185029Spjdexp=`( 271185029Spjd echo " pool: ${name0}" 272185029Spjd echo " state: ONLINE" 273185029Spjd echo " scrub: none requested" 274185029Spjd echo "config:" 275185029Spjd echo " NAME STATE READ WRITE CKSUM" 276185029Spjd echo " ${name0} ONLINE 0 0 0" 277185029Spjd echo " ${disk0} ONLINE 0 0 0" 278185029Spjd echo "errors: No known data errors" 279185029Spjd)` 280185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 281185029Spjdadd_msg="" 282185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 283185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 284185029Spjd 285185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} 286185029Spjdexpect_ok ${ZPOOL} add -f ${name0} log mirror ${disk1} ${disk7} 287185029Spjdexp=`( 288185029Spjd echo " pool: ${name0}" 289185029Spjd echo " state: ONLINE" 290185029Spjd echo " scrub: none requested" 291185029Spjd echo "config:" 292185029Spjd echo " NAME STATE READ WRITE CKSUM" 293185029Spjd echo " ${name0} ONLINE 0 0 0" 294185029Spjd echo " ${disk0} ONLINE 0 0 0" 295185029Spjd echo " logs ONLINE 0 0 0" 296185029Spjd echo " mirror ONLINE 0 0 0" 297185029Spjd echo " ${disk1} ONLINE 0 0 0" 298185029Spjd echo " ${disk7} ONLINE 0 0 0" 299185029Spjd echo "errors: No known data errors" 300185029Spjd)` 301185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 302185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 303185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 304185029Spjd 305185029Spjdexpect_ok ${ZPOOL} create ${name0} ${file0} 306185029Spjdadd_msg="# TODO Sun CR 6726091, Lustre bug 16873" 307185029Spjdexpect_fl ${ZPOOL} add ${name0} log mirror ${file1} ${file7} 308185029Spjdexp=`( 309185029Spjd echo " pool: ${name0}" 310185029Spjd echo " state: ONLINE" 311185029Spjd echo " scrub: none requested" 312185029Spjd echo "config:" 313185029Spjd echo " NAME STATE READ WRITE CKSUM" 314185029Spjd echo " ${name0} ONLINE 0 0 0" 315185029Spjd echo " ${file0} ONLINE 0 0 0" 316185029Spjd echo "errors: No known data errors" 317185029Spjd)` 318185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 319185029Spjdadd_msg="" 320185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 321185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 322185029Spjd 323185029Spjdexpect_ok ${ZPOOL} create ${name0} ${file0} 324185029Spjdexpect_ok ${ZPOOL} add -f ${name0} log mirror ${file1} ${file7} 325185029Spjdexp=`( 326185029Spjd echo " pool: ${name0}" 327185029Spjd echo " state: ONLINE" 328185029Spjd echo " scrub: none requested" 329185029Spjd echo "config:" 330185029Spjd echo " NAME STATE READ WRITE CKSUM" 331185029Spjd echo " ${name0} ONLINE 0 0 0" 332185029Spjd echo " ${file0} ONLINE 0 0 0" 333185029Spjd echo " logs ONLINE 0 0 0" 334185029Spjd echo " mirror ONLINE 0 0 0" 335185029Spjd echo " ${file1} ONLINE 0 0 0" 336185029Spjd echo " ${file7} ONLINE 0 0 0" 337185029Spjd echo "errors: No known data errors" 338185029Spjd)` 339185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 340185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 341185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 342185029Spjd 343185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} 344185029Spjdadd_msg="# TODO Sun CR 6726091, Lustre bug 16873" 345185029Spjdexpect_fl ${ZPOOL} add ${name0} log mirror ${disk3} ${disk7} 346185029Spjdexp=`( 347185029Spjd echo " pool: ${name0}" 348185029Spjd echo " state: ONLINE" 349185029Spjd echo " scrub: none requested" 350185029Spjd echo "config:" 351185029Spjd echo " NAME STATE READ WRITE CKSUM" 352185029Spjd echo " ${name0} ONLINE 0 0 0" 353185029Spjd echo " ${disk0} ONLINE 0 0 0" 354185029Spjd echo " logs ONLINE 0 0 0" 355185029Spjd echo " mirror ONLINE 0 0 0" 356185029Spjd echo " ${disk1} ONLINE 0 0 0" 357185029Spjd echo " ${disk2} ONLINE 0 0 0" 358185029Spjd echo "errors: No known data errors" 359185029Spjd)` 360185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 361185029Spjdadd_msg="" 362185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 363185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 364185029Spjd 365185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} 366185029Spjdexpect_ok ${ZPOOL} add -f ${name0} log mirror ${disk3} ${disk7} 367185029Spjdexp=`( 368185029Spjd echo " pool: ${name0}" 369185029Spjd echo " state: ONLINE" 370185029Spjd echo " scrub: none requested" 371185029Spjd echo "config:" 372185029Spjd echo " NAME STATE READ WRITE CKSUM" 373185029Spjd echo " ${name0} ONLINE 0 0 0" 374185029Spjd echo " ${disk0} ONLINE 0 0 0" 375185029Spjd echo " logs ONLINE 0 0 0" 376185029Spjd echo " mirror ONLINE 0 0 0" 377185029Spjd echo " ${disk1} ONLINE 0 0 0" 378185029Spjd echo " ${disk2} ONLINE 0 0 0" 379185029Spjd echo " mirror ONLINE 0 0 0" 380185029Spjd echo " ${disk3} ONLINE 0 0 0" 381185029Spjd echo " ${disk7} ONLINE 0 0 0" 382185029Spjd echo "errors: No known data errors" 383185029Spjd)` 384185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 385185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 386185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 387185029Spjd 388185029Spjdexpect_ok ${ZPOOL} create ${name0} ${file0} log mirror ${file1} ${file2} 389185029Spjdadd_msg="# TODO Sun CR 6726091, Lustre bug 16873" 390185029Spjdexpect_fl ${ZPOOL} add ${name0} log mirror ${file3} ${file7} 391185029Spjdexp=`( 392185029Spjd echo " pool: ${name0}" 393185029Spjd echo " state: ONLINE" 394185029Spjd echo " scrub: none requested" 395185029Spjd echo "config:" 396185029Spjd echo " NAME STATE READ WRITE CKSUM" 397185029Spjd echo " ${name0} ONLINE 0 0 0" 398185029Spjd echo " ${file0} ONLINE 0 0 0" 399185029Spjd echo " logs ONLINE 0 0 0" 400185029Spjd echo " mirror ONLINE 0 0 0" 401185029Spjd echo " ${file1} ONLINE 0 0 0" 402185029Spjd echo " ${file2} ONLINE 0 0 0" 403185029Spjd echo "errors: No known data errors" 404185029Spjd)` 405185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 406185029Spjdadd_msg="" 407185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 408185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 409185029Spjd 410185029Spjdexpect_ok ${ZPOOL} create ${name0} ${file0} log mirror ${file1} ${file2} 411185029Spjdexpect_ok ${ZPOOL} add -f ${name0} log mirror ${file3} ${file7} 412185029Spjdexp=`( 413185029Spjd echo " pool: ${name0}" 414185029Spjd echo " state: ONLINE" 415185029Spjd echo " scrub: none requested" 416185029Spjd echo "config:" 417185029Spjd echo " NAME STATE READ WRITE CKSUM" 418185029Spjd echo " ${name0} ONLINE 0 0 0" 419185029Spjd echo " ${file0} ONLINE 0 0 0" 420185029Spjd echo " logs ONLINE 0 0 0" 421185029Spjd echo " mirror ONLINE 0 0 0" 422185029Spjd echo " ${file1} ONLINE 0 0 0" 423185029Spjd echo " ${file2} ONLINE 0 0 0" 424185029Spjd echo " mirror ONLINE 0 0 0" 425185029Spjd echo " ${file3} ONLINE 0 0 0" 426185029Spjd echo " ${file7} ONLINE 0 0 0" 427185029Spjd echo "errors: No known data errors" 428185029Spjd)` 429185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 430185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 431185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 432185029Spjd 433185029Spjddisks_destroy 434185029Spjdfiles_destroy 435