1#!/bin/sh 2# $FreeBSD: releng/10.3/tools/regression/zfs/zpool/add/option-f_replication_level_mismatch_1.t 185029 2008-11-17 20:49:29Z pjd $ 3 4dir=`dirname $0` 5. ${dir}/../../misc.sh 6 7echo "1..182" 8 9disks_create 9 10names_create 1 11 12expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 13expect_fl ${ZPOOL} add ${name0} mirror ${disk2} ${disk3} ${disk4} 14exp=`( 15 echo " pool: ${name0}" 16 echo " state: ONLINE" 17 echo " scrub: none requested" 18 echo "config:" 19 echo " NAME STATE READ WRITE CKSUM" 20 echo " ${name0} ONLINE 0 0 0" 21 echo " mirror ONLINE 0 0 0" 22 echo " ${disk0} ONLINE 0 0 0" 23 echo " ${disk1} ONLINE 0 0 0" 24 echo "errors: No known data errors" 25)` 26expect "${exp}" ${ZPOOL} status ${name0} 27expect_ok ${ZPOOL} destroy ${name0} 28expect_fl ${ZPOOL} status -x ${name0} 29 30expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 31expect_ok ${ZPOOL} add -f ${name0} mirror ${disk2} ${disk3} ${disk4} 32exp=`( 33 echo " pool: ${name0}" 34 echo " state: ONLINE" 35 echo " scrub: none requested" 36 echo "config:" 37 echo " NAME STATE READ WRITE CKSUM" 38 echo " ${name0} ONLINE 0 0 0" 39 echo " mirror ONLINE 0 0 0" 40 echo " ${disk0} ONLINE 0 0 0" 41 echo " ${disk1} ONLINE 0 0 0" 42 echo " mirror ONLINE 0 0 0" 43 echo " ${disk2} ONLINE 0 0 0" 44 echo " ${disk3} ONLINE 0 0 0" 45 echo " ${disk4} ONLINE 0 0 0" 46 echo "errors: No known data errors" 47)` 48expect "${exp}" ${ZPOOL} status ${name0} 49expect_ok ${ZPOOL} destroy ${name0} 50expect_fl ${ZPOOL} status -x ${name0} 51 52expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} 53expect_fl ${ZPOOL} add ${name0} mirror ${disk3} ${disk4} 54exp=`( 55 echo " pool: ${name0}" 56 echo " state: ONLINE" 57 echo " scrub: none requested" 58 echo "config:" 59 echo " NAME STATE READ WRITE CKSUM" 60 echo " ${name0} ONLINE 0 0 0" 61 echo " mirror ONLINE 0 0 0" 62 echo " ${disk0} ONLINE 0 0 0" 63 echo " ${disk1} ONLINE 0 0 0" 64 echo " ${disk2} 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} 70 71expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} 72expect_ok ${ZPOOL} add -f ${name0} mirror ${disk3} ${disk4} 73exp=`( 74 echo " pool: ${name0}" 75 echo " state: ONLINE" 76 echo " scrub: none requested" 77 echo "config:" 78 echo " NAME STATE READ WRITE CKSUM" 79 echo " ${name0} ONLINE 0 0 0" 80 echo " mirror ONLINE 0 0 0" 81 echo " ${disk0} ONLINE 0 0 0" 82 echo " ${disk1} ONLINE 0 0 0" 83 echo " ${disk2} ONLINE 0 0 0" 84 echo " mirror ONLINE 0 0 0" 85 echo " ${disk3} ONLINE 0 0 0" 86 echo " ${disk4} ONLINE 0 0 0" 87 echo "errors: No known data errors" 88)` 89expect "${exp}" ${ZPOOL} status ${name0} 90expect_ok ${ZPOOL} destroy ${name0} 91expect_fl ${ZPOOL} status -x ${name0} 92 93expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 94expect_fl ${ZPOOL} add ${name0} raidz1 ${disk3} ${disk4} ${disk5} ${disk6} 95exp=`( 96 echo " pool: ${name0}" 97 echo " state: ONLINE" 98 echo " scrub: none requested" 99 echo "config:" 100 echo " NAME STATE READ WRITE CKSUM" 101 echo " ${name0} ONLINE 0 0 0" 102 echo " raidz1 ONLINE 0 0 0" 103 echo " ${disk0} ONLINE 0 0 0" 104 echo " ${disk1} ONLINE 0 0 0" 105 echo " ${disk2} ONLINE 0 0 0" 106 echo "errors: No known data errors" 107)` 108expect "${exp}" ${ZPOOL} status ${name0} 109expect_ok ${ZPOOL} destroy ${name0} 110expect_fl ${ZPOOL} status -x ${name0} 111 112expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 113expect_ok ${ZPOOL} add -f ${name0} raidz1 ${disk3} ${disk4} ${disk5} ${disk6} 114exp=`( 115 echo " pool: ${name0}" 116 echo " state: ONLINE" 117 echo " scrub: none requested" 118 echo "config:" 119 echo " NAME STATE READ WRITE CKSUM" 120 echo " ${name0} ONLINE 0 0 0" 121 echo " raidz1 ONLINE 0 0 0" 122 echo " ${disk0} ONLINE 0 0 0" 123 echo " ${disk1} ONLINE 0 0 0" 124 echo " ${disk2} ONLINE 0 0 0" 125 echo " raidz1 ONLINE 0 0 0" 126 echo " ${disk3} ONLINE 0 0 0" 127 echo " ${disk4} ONLINE 0 0 0" 128 echo " ${disk5} ONLINE 0 0 0" 129 echo " ${disk6} ONLINE 0 0 0" 130 echo "errors: No known data errors" 131)` 132expect "${exp}" ${ZPOOL} status ${name0} 133expect_ok ${ZPOOL} destroy ${name0} 134expect_fl ${ZPOOL} status -x ${name0} 135 136expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} ${disk3} 137expect_fl ${ZPOOL} add ${name0} raidz1 ${disk4} ${disk5} ${disk6} 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 " raidz1 ONLINE 0 0 0" 146 echo " ${disk0} ONLINE 0 0 0" 147 echo " ${disk1} ONLINE 0 0 0" 148 echo " ${disk2} ONLINE 0 0 0" 149 echo " ${disk3} ONLINE 0 0 0" 150 echo "errors: No known data errors" 151)` 152expect "${exp}" ${ZPOOL} status ${name0} 153expect_ok ${ZPOOL} destroy ${name0} 154expect_fl ${ZPOOL} status -x ${name0} 155 156expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} ${disk3} 157expect_ok ${ZPOOL} add -f ${name0} raidz1 ${disk4} ${disk5} ${disk6} 158exp=`( 159 echo " pool: ${name0}" 160 echo " state: ONLINE" 161 echo " scrub: none requested" 162 echo "config:" 163 echo " NAME STATE READ WRITE CKSUM" 164 echo " ${name0} ONLINE 0 0 0" 165 echo " raidz1 ONLINE 0 0 0" 166 echo " ${disk0} ONLINE 0 0 0" 167 echo " ${disk1} ONLINE 0 0 0" 168 echo " ${disk2} ONLINE 0 0 0" 169 echo " ${disk3} ONLINE 0 0 0" 170 echo " raidz1 ONLINE 0 0 0" 171 echo " ${disk4} ONLINE 0 0 0" 172 echo " ${disk5} ONLINE 0 0 0" 173 echo " ${disk6} ONLINE 0 0 0" 174 echo "errors: No known data errors" 175)` 176expect "${exp}" ${ZPOOL} status ${name0} 177expect_ok ${ZPOOL} destroy ${name0} 178expect_fl ${ZPOOL} status -x ${name0} 179 180expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 181expect_fl ${ZPOOL} add ${name0} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} ${disk8} 182exp=`( 183 echo " pool: ${name0}" 184 echo " state: ONLINE" 185 echo " scrub: none requested" 186 echo "config:" 187 echo " NAME STATE READ WRITE CKSUM" 188 echo " ${name0} ONLINE 0 0 0" 189 echo " raidz2 ONLINE 0 0 0" 190 echo " ${disk0} ONLINE 0 0 0" 191 echo " ${disk1} ONLINE 0 0 0" 192 echo " ${disk2} ONLINE 0 0 0" 193 echo " ${disk3} ONLINE 0 0 0" 194 echo "errors: No known data errors" 195)` 196expect "${exp}" ${ZPOOL} status ${name0} 197expect_ok ${ZPOOL} destroy ${name0} 198expect_fl ${ZPOOL} status -x ${name0} 199 200expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 201expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} ${disk8} 202exp=`( 203 echo " pool: ${name0}" 204 echo " state: ONLINE" 205 echo " scrub: none requested" 206 echo "config:" 207 echo " NAME STATE READ WRITE CKSUM" 208 echo " ${name0} ONLINE 0 0 0" 209 echo " raidz2 ONLINE 0 0 0" 210 echo " ${disk0} ONLINE 0 0 0" 211 echo " ${disk1} ONLINE 0 0 0" 212 echo " ${disk2} ONLINE 0 0 0" 213 echo " ${disk3} ONLINE 0 0 0" 214 echo " raidz2 ONLINE 0 0 0" 215 echo " ${disk4} ONLINE 0 0 0" 216 echo " ${disk5} ONLINE 0 0 0" 217 echo " ${disk6} ONLINE 0 0 0" 218 echo " ${disk7} ONLINE 0 0 0" 219 echo " ${disk8} ONLINE 0 0 0" 220 echo "errors: No known data errors" 221)` 222expect "${exp}" ${ZPOOL} status ${name0} 223expect_ok ${ZPOOL} destroy ${name0} 224expect_fl ${ZPOOL} status -x ${name0} 225 226expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4} 227expect_fl ${ZPOOL} add ${name0} raidz2 ${disk5} ${disk6} ${disk7} ${disk8} 228exp=`( 229 echo " pool: ${name0}" 230 echo " state: ONLINE" 231 echo " scrub: none requested" 232 echo "config:" 233 echo " NAME STATE READ WRITE CKSUM" 234 echo " ${name0} ONLINE 0 0 0" 235 echo " raidz2 ONLINE 0 0 0" 236 echo " ${disk0} ONLINE 0 0 0" 237 echo " ${disk1} ONLINE 0 0 0" 238 echo " ${disk2} ONLINE 0 0 0" 239 echo " ${disk3} ONLINE 0 0 0" 240 echo " ${disk4} ONLINE 0 0 0" 241 echo "errors: No known data errors" 242)` 243expect "${exp}" ${ZPOOL} status ${name0} 244expect_ok ${ZPOOL} destroy ${name0} 245expect_fl ${ZPOOL} status -x ${name0} 246 247expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4} 248expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk5} ${disk6} ${disk7} ${disk8} 249exp=`( 250 echo " pool: ${name0}" 251 echo " state: ONLINE" 252 echo " scrub: none requested" 253 echo "config:" 254 echo " NAME STATE READ WRITE CKSUM" 255 echo " ${name0} ONLINE 0 0 0" 256 echo " raidz2 ONLINE 0 0 0" 257 echo " ${disk0} ONLINE 0 0 0" 258 echo " ${disk1} ONLINE 0 0 0" 259 echo " ${disk2} ONLINE 0 0 0" 260 echo " ${disk3} ONLINE 0 0 0" 261 echo " ${disk4} ONLINE 0 0 0" 262 echo " raidz2 ONLINE 0 0 0" 263 echo " ${disk5} ONLINE 0 0 0" 264 echo " ${disk6} ONLINE 0 0 0" 265 echo " ${disk7} ONLINE 0 0 0" 266 echo " ${disk8} ONLINE 0 0 0" 267 echo "errors: No known data errors" 268)` 269expect "${exp}" ${ZPOOL} status ${name0} 270expect_ok ${ZPOOL} destroy ${name0} 271expect_fl ${ZPOOL} status -x ${name0} 272 273 274 275 276 277 278 279expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 280expect_fl ${ZPOOL} add ${name0} raidz ${disk2} ${disk3} 281exp=`( 282 echo " pool: ${name0}" 283 echo " state: ONLINE" 284 echo " scrub: none requested" 285 echo "config:" 286 echo " NAME STATE READ WRITE CKSUM" 287 echo " ${name0} ONLINE 0 0 0" 288 echo " mirror ONLINE 0 0 0" 289 echo " ${disk0} ONLINE 0 0 0" 290 echo " ${disk1} ONLINE 0 0 0" 291 echo "errors: No known data errors" 292)` 293expect "${exp}" ${ZPOOL} status ${name0} 294expect_ok ${ZPOOL} destroy ${name0} 295expect_fl ${ZPOOL} status -x ${name0} 296 297expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 298expect_ok ${ZPOOL} add -f ${name0} raidz ${disk2} ${disk3} 299exp=`( 300 echo " pool: ${name0}" 301 echo " state: ONLINE" 302 echo " scrub: none requested" 303 echo "config:" 304 echo " NAME STATE READ WRITE CKSUM" 305 echo " ${name0} ONLINE 0 0 0" 306 echo " mirror ONLINE 0 0 0" 307 echo " ${disk0} ONLINE 0 0 0" 308 echo " ${disk1} ONLINE 0 0 0" 309 echo " raidz1 ONLINE 0 0 0" 310 echo " ${disk2} ONLINE 0 0 0" 311 echo " ${disk3} ONLINE 0 0 0" 312 echo "errors: No known data errors" 313)` 314expect "${exp}" ${ZPOOL} status ${name0} 315expect_ok ${ZPOOL} destroy ${name0} 316expect_fl ${ZPOOL} status -x ${name0} 317 318expect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} 319expect_fl ${ZPOOL} add ${name0} mirror ${disk2} ${disk3} 320exp=`( 321 echo " pool: ${name0}" 322 echo " state: ONLINE" 323 echo " scrub: none requested" 324 echo "config:" 325 echo " NAME STATE READ WRITE CKSUM" 326 echo " ${name0} ONLINE 0 0 0" 327 echo " raidz1 ONLINE 0 0 0" 328 echo " ${disk0} ONLINE 0 0 0" 329 echo " ${disk1} ONLINE 0 0 0" 330 echo "errors: No known data errors" 331)` 332expect "${exp}" ${ZPOOL} status ${name0} 333expect_ok ${ZPOOL} destroy ${name0} 334expect_fl ${ZPOOL} status -x ${name0} 335 336expect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} 337expect_ok ${ZPOOL} add -f ${name0} mirror ${disk2} ${disk3} 338exp=`( 339 echo " pool: ${name0}" 340 echo " state: ONLINE" 341 echo " scrub: none requested" 342 echo "config:" 343 echo " NAME STATE READ WRITE CKSUM" 344 echo " ${name0} ONLINE 0 0 0" 345 echo " raidz1 ONLINE 0 0 0" 346 echo " ${disk0} ONLINE 0 0 0" 347 echo " ${disk1} ONLINE 0 0 0" 348 echo " mirror ONLINE 0 0 0" 349 echo " ${disk2} ONLINE 0 0 0" 350 echo " ${disk3} ONLINE 0 0 0" 351 echo "errors: No known data errors" 352)` 353expect "${exp}" ${ZPOOL} status ${name0} 354expect_ok ${ZPOOL} destroy ${name0} 355expect_fl ${ZPOOL} status -x ${name0} 356 357expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} 358expect_fl ${ZPOOL} add ${name0} raidz ${disk3} ${disk4} 359exp=`( 360 echo " pool: ${name0}" 361 echo " state: ONLINE" 362 echo " scrub: none requested" 363 echo "config:" 364 echo " NAME STATE READ WRITE CKSUM" 365 echo " ${name0} ONLINE 0 0 0" 366 echo " mirror ONLINE 0 0 0" 367 echo " ${disk0} ONLINE 0 0 0" 368 echo " ${disk1} ONLINE 0 0 0" 369 echo " ${disk2} ONLINE 0 0 0" 370 echo "errors: No known data errors" 371)` 372expect "${exp}" ${ZPOOL} status ${name0} 373expect_ok ${ZPOOL} destroy ${name0} 374expect_fl ${ZPOOL} status -x ${name0} 375 376expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} 377expect_ok ${ZPOOL} add -f ${name0} raidz ${disk3} ${disk4} 378exp=`( 379 echo " pool: ${name0}" 380 echo " state: ONLINE" 381 echo " scrub: none requested" 382 echo "config:" 383 echo " NAME STATE READ WRITE CKSUM" 384 echo " ${name0} ONLINE 0 0 0" 385 echo " mirror ONLINE 0 0 0" 386 echo " ${disk0} ONLINE 0 0 0" 387 echo " ${disk1} ONLINE 0 0 0" 388 echo " ${disk2} ONLINE 0 0 0" 389 echo " raidz1 ONLINE 0 0 0" 390 echo " ${disk3} ONLINE 0 0 0" 391 echo " ${disk4} ONLINE 0 0 0" 392 echo "errors: No known data errors" 393)` 394expect "${exp}" ${ZPOOL} status ${name0} 395expect_ok ${ZPOOL} destroy ${name0} 396expect_fl ${ZPOOL} status -x ${name0} 397 398expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 399expect_fl ${ZPOOL} add ${name0} raidz ${disk2} ${disk3} ${disk4} 400exp=`( 401 echo " pool: ${name0}" 402 echo " state: ONLINE" 403 echo " scrub: none requested" 404 echo "config:" 405 echo " NAME STATE READ WRITE CKSUM" 406 echo " ${name0} ONLINE 0 0 0" 407 echo " mirror ONLINE 0 0 0" 408 echo " ${disk0} ONLINE 0 0 0" 409 echo " ${disk1} ONLINE 0 0 0" 410 echo "errors: No known data errors" 411)` 412expect "${exp}" ${ZPOOL} status ${name0} 413expect_ok ${ZPOOL} destroy ${name0} 414expect_fl ${ZPOOL} status -x ${name0} 415 416expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 417expect_ok ${ZPOOL} add -f ${name0} raidz ${disk2} ${disk3} ${disk4} 418exp=`( 419 echo " pool: ${name0}" 420 echo " state: ONLINE" 421 echo " scrub: none requested" 422 echo "config:" 423 echo " NAME STATE READ WRITE CKSUM" 424 echo " ${name0} ONLINE 0 0 0" 425 echo " mirror ONLINE 0 0 0" 426 echo " ${disk0} ONLINE 0 0 0" 427 echo " ${disk1} ONLINE 0 0 0" 428 echo " raidz1 ONLINE 0 0 0" 429 echo " ${disk2} ONLINE 0 0 0" 430 echo " ${disk3} ONLINE 0 0 0" 431 echo " ${disk4} ONLINE 0 0 0" 432 echo "errors: No known data errors" 433)` 434expect "${exp}" ${ZPOOL} status ${name0} 435expect_ok ${ZPOOL} destroy ${name0} 436expect_fl ${ZPOOL} status -x ${name0} 437 438expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 439expect_fl ${ZPOOL} add ${name0} raidz2 ${disk2} ${disk3} ${disk4} 440exp=`( 441 echo " pool: ${name0}" 442 echo " state: ONLINE" 443 echo " scrub: none requested" 444 echo "config:" 445 echo " NAME STATE READ WRITE CKSUM" 446 echo " ${name0} ONLINE 0 0 0" 447 echo " mirror ONLINE 0 0 0" 448 echo " ${disk0} ONLINE 0 0 0" 449 echo " ${disk1} ONLINE 0 0 0" 450 echo "errors: No known data errors" 451)` 452expect "${exp}" ${ZPOOL} status ${name0} 453expect_ok ${ZPOOL} destroy ${name0} 454expect_fl ${ZPOOL} status -x ${name0} 455 456expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 457expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk2} ${disk3} ${disk4} 458exp=`( 459 echo " pool: ${name0}" 460 echo " state: ONLINE" 461 echo " scrub: none requested" 462 echo "config:" 463 echo " NAME STATE READ WRITE CKSUM" 464 echo " ${name0} ONLINE 0 0 0" 465 echo " mirror ONLINE 0 0 0" 466 echo " ${disk0} ONLINE 0 0 0" 467 echo " ${disk1} ONLINE 0 0 0" 468 echo " raidz2 ONLINE 0 0 0" 469 echo " ${disk2} ONLINE 0 0 0" 470 echo " ${disk3} ONLINE 0 0 0" 471 echo " ${disk4} ONLINE 0 0 0" 472 echo "errors: No known data errors" 473)` 474expect "${exp}" ${ZPOOL} status ${name0} 475expect_ok ${ZPOOL} destroy ${name0} 476expect_fl ${ZPOOL} status -x ${name0} 477 478expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} 479expect_fl ${ZPOOL} add ${name0} raidz2 ${disk3} ${disk4} ${disk5} 480exp=`( 481 echo " pool: ${name0}" 482 echo " state: ONLINE" 483 echo " scrub: none requested" 484 echo "config:" 485 echo " NAME STATE READ WRITE CKSUM" 486 echo " ${name0} ONLINE 0 0 0" 487 echo " mirror ONLINE 0 0 0" 488 echo " ${disk0} ONLINE 0 0 0" 489 echo " ${disk1} ONLINE 0 0 0" 490 echo " ${disk2} ONLINE 0 0 0" 491 echo "errors: No known data errors" 492)` 493expect "${exp}" ${ZPOOL} status ${name0} 494expect_ok ${ZPOOL} destroy ${name0} 495expect_fl ${ZPOOL} status -x ${name0} 496 497expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} 498expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk3} ${disk4} ${disk5} 499exp=`( 500 echo " pool: ${name0}" 501 echo " state: ONLINE" 502 echo " scrub: none requested" 503 echo "config:" 504 echo " NAME STATE READ WRITE CKSUM" 505 echo " ${name0} ONLINE 0 0 0" 506 echo " mirror ONLINE 0 0 0" 507 echo " ${disk0} ONLINE 0 0 0" 508 echo " ${disk1} ONLINE 0 0 0" 509 echo " ${disk2} ONLINE 0 0 0" 510 echo " raidz2 ONLINE 0 0 0" 511 echo " ${disk3} ONLINE 0 0 0" 512 echo " ${disk4} ONLINE 0 0 0" 513 echo " ${disk5} ONLINE 0 0 0" 514 echo "errors: No known data errors" 515)` 516expect "${exp}" ${ZPOOL} status ${name0} 517expect_ok ${ZPOOL} destroy ${name0} 518expect_fl ${ZPOOL} status -x ${name0} 519 520expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} ${disk3} 521expect_fl ${ZPOOL} add ${name0} raidz2 ${disk4} ${disk5} ${disk6} 522exp=`( 523 echo " pool: ${name0}" 524 echo " state: ONLINE" 525 echo " scrub: none requested" 526 echo "config:" 527 echo " NAME STATE READ WRITE CKSUM" 528 echo " ${name0} ONLINE 0 0 0" 529 echo " mirror ONLINE 0 0 0" 530 echo " ${disk0} ONLINE 0 0 0" 531 echo " ${disk1} ONLINE 0 0 0" 532 echo " ${disk2} ONLINE 0 0 0" 533 echo " ${disk3} ONLINE 0 0 0" 534 echo "errors: No known data errors" 535)` 536expect "${exp}" ${ZPOOL} status ${name0} 537expect_ok ${ZPOOL} destroy ${name0} 538expect_fl ${ZPOOL} status -x ${name0} 539 540expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} ${disk3} 541expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk4} ${disk5} ${disk6} 542exp=`( 543 echo " pool: ${name0}" 544 echo " state: ONLINE" 545 echo " scrub: none requested" 546 echo "config:" 547 echo " NAME STATE READ WRITE CKSUM" 548 echo " ${name0} ONLINE 0 0 0" 549 echo " mirror ONLINE 0 0 0" 550 echo " ${disk0} ONLINE 0 0 0" 551 echo " ${disk1} ONLINE 0 0 0" 552 echo " ${disk2} ONLINE 0 0 0" 553 echo " ${disk3} ONLINE 0 0 0" 554 echo " raidz2 ONLINE 0 0 0" 555 echo " ${disk4} ONLINE 0 0 0" 556 echo " ${disk5} ONLINE 0 0 0" 557 echo " ${disk6} ONLINE 0 0 0" 558 echo "errors: No known data errors" 559)` 560expect "${exp}" ${ZPOOL} status ${name0} 561expect_ok ${ZPOOL} destroy ${name0} 562expect_fl ${ZPOOL} status -x ${name0} 563 564expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} 565expect_fl ${ZPOOL} add ${name0} raidz2 ${disk2} ${disk3} ${disk4} 566exp=`( 567 echo " pool: ${name0}" 568 echo " state: ONLINE" 569 echo " scrub: none requested" 570 echo "config:" 571 echo " NAME STATE READ WRITE CKSUM" 572 echo " ${name0} ONLINE 0 0 0" 573 echo " raidz1 ONLINE 0 0 0" 574 echo " ${disk0} ONLINE 0 0 0" 575 echo " ${disk1} ONLINE 0 0 0" 576 echo "errors: No known data errors" 577)` 578expect "${exp}" ${ZPOOL} status ${name0} 579expect_ok ${ZPOOL} destroy ${name0} 580expect_fl ${ZPOOL} status -x ${name0} 581 582expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} 583expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk2} ${disk3} ${disk4} 584exp=`( 585 echo " pool: ${name0}" 586 echo " state: ONLINE" 587 echo " scrub: none requested" 588 echo "config:" 589 echo " NAME STATE READ WRITE CKSUM" 590 echo " ${name0} ONLINE 0 0 0" 591 echo " raidz1 ONLINE 0 0 0" 592 echo " ${disk0} ONLINE 0 0 0" 593 echo " ${disk1} ONLINE 0 0 0" 594 echo " raidz2 ONLINE 0 0 0" 595 echo " ${disk2} ONLINE 0 0 0" 596 echo " ${disk3} ONLINE 0 0 0" 597 echo " ${disk4} ONLINE 0 0 0" 598 echo "errors: No known data errors" 599)` 600expect "${exp}" ${ZPOOL} status ${name0} 601expect_ok ${ZPOOL} destroy ${name0} 602expect_fl ${ZPOOL} status -x ${name0} 603 604expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 605expect_fl ${ZPOOL} add ${name0} raidz2 ${disk3} ${disk4} ${disk5} 606exp=`( 607 echo " pool: ${name0}" 608 echo " state: ONLINE" 609 echo " scrub: none requested" 610 echo "config:" 611 echo " NAME STATE READ WRITE CKSUM" 612 echo " ${name0} ONLINE 0 0 0" 613 echo " raidz1 ONLINE 0 0 0" 614 echo " ${disk0} ONLINE 0 0 0" 615 echo " ${disk1} ONLINE 0 0 0" 616 echo " ${disk2} ONLINE 0 0 0" 617 echo "errors: No known data errors" 618)` 619expect "${exp}" ${ZPOOL} status ${name0} 620expect_ok ${ZPOOL} destroy ${name0} 621expect_fl ${ZPOOL} status -x ${name0} 622 623expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 624expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk3} ${disk4} ${disk5} 625exp=`( 626 echo " pool: ${name0}" 627 echo " state: ONLINE" 628 echo " scrub: none requested" 629 echo "config:" 630 echo " NAME STATE READ WRITE CKSUM" 631 echo " ${name0} ONLINE 0 0 0" 632 echo " raidz1 ONLINE 0 0 0" 633 echo " ${disk0} ONLINE 0 0 0" 634 echo " ${disk1} ONLINE 0 0 0" 635 echo " ${disk2} ONLINE 0 0 0" 636 echo " raidz2 ONLINE 0 0 0" 637 echo " ${disk3} ONLINE 0 0 0" 638 echo " ${disk4} ONLINE 0 0 0" 639 echo " ${disk5} ONLINE 0 0 0" 640 echo "errors: No known data errors" 641)` 642expect "${exp}" ${ZPOOL} status ${name0} 643expect_ok ${ZPOOL} destroy ${name0} 644expect_fl ${ZPOOL} status -x ${name0} 645 646expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} ${disk3} 647expect_fl ${ZPOOL} add ${name0} raidz2 ${disk4} ${disk5} ${disk6} 648exp=`( 649 echo " pool: ${name0}" 650 echo " state: ONLINE" 651 echo " scrub: none requested" 652 echo "config:" 653 echo " NAME STATE READ WRITE CKSUM" 654 echo " ${name0} ONLINE 0 0 0" 655 echo " raidz1 ONLINE 0 0 0" 656 echo " ${disk0} ONLINE 0 0 0" 657 echo " ${disk1} ONLINE 0 0 0" 658 echo " ${disk2} ONLINE 0 0 0" 659 echo " ${disk3} ONLINE 0 0 0" 660 echo "errors: No known data errors" 661)` 662expect "${exp}" ${ZPOOL} status ${name0} 663expect_ok ${ZPOOL} destroy ${name0} 664expect_fl ${ZPOOL} status -x ${name0} 665 666expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} ${disk3} 667expect_ok ${ZPOOL} add -f ${name0} raidz2 ${disk4} ${disk5} ${disk6} 668exp=`( 669 echo " pool: ${name0}" 670 echo " state: ONLINE" 671 echo " scrub: none requested" 672 echo "config:" 673 echo " NAME STATE READ WRITE CKSUM" 674 echo " ${name0} ONLINE 0 0 0" 675 echo " raidz1 ONLINE 0 0 0" 676 echo " ${disk0} ONLINE 0 0 0" 677 echo " ${disk1} ONLINE 0 0 0" 678 echo " ${disk2} ONLINE 0 0 0" 679 echo " ${disk3} ONLINE 0 0 0" 680 echo " raidz2 ONLINE 0 0 0" 681 echo " ${disk4} ONLINE 0 0 0" 682 echo " ${disk5} ONLINE 0 0 0" 683 echo " ${disk6} ONLINE 0 0 0" 684 echo "errors: No known data errors" 685)` 686expect "${exp}" ${ZPOOL} status ${name0} 687expect_ok ${ZPOOL} destroy ${name0} 688expect_fl ${ZPOOL} status -x ${name0} 689 690expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} 691add_msg="# TODO Sun CR 6726091, Lustre bug 16873" 692expect_fl ${ZPOOL} add ${name0} log mirror ${disk3} ${disk4} ${disk5} 693exp=`( 694 echo " pool: ${name0}" 695 echo " state: ONLINE" 696 echo " scrub: none requested" 697 echo "config:" 698 echo " NAME STATE READ WRITE CKSUM" 699 echo " ${name0} ONLINE 0 0 0" 700 echo " ${disk0} ONLINE 0 0 0" 701 echo " logs ONLINE 0 0 0" 702 echo " mirror ONLINE 0 0 0" 703 echo " ${disk1} ONLINE 0 0 0" 704 echo " ${disk2} ONLINE 0 0 0" 705 echo "errors: No known data errors" 706)` 707expect "${exp}" ${ZPOOL} status ${name0} 708add_msg="" 709expect_ok ${ZPOOL} destroy ${name0} 710expect_fl ${ZPOOL} status -x ${name0} 711 712expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} 713expect_ok ${ZPOOL} add -f ${name0} log mirror ${disk3} ${disk4} ${disk5} 714exp=`( 715 echo " pool: ${name0}" 716 echo " state: ONLINE" 717 echo " scrub: none requested" 718 echo "config:" 719 echo " NAME STATE READ WRITE CKSUM" 720 echo " ${name0} ONLINE 0 0 0" 721 echo " ${disk0} ONLINE 0 0 0" 722 echo " logs ONLINE 0 0 0" 723 echo " mirror ONLINE 0 0 0" 724 echo " ${disk1} ONLINE 0 0 0" 725 echo " ${disk2} ONLINE 0 0 0" 726 echo " mirror ONLINE 0 0 0" 727 echo " ${disk3} ONLINE 0 0 0" 728 echo " ${disk4} ONLINE 0 0 0" 729 echo " ${disk5} ONLINE 0 0 0" 730 echo "errors: No known data errors" 731)` 732expect "${exp}" ${ZPOOL} status ${name0} 733expect_ok ${ZPOOL} destroy ${name0} 734expect_fl ${ZPOOL} status -x ${name0} 735expect_fl ${ZPOOL} destroy ${name0} 736 737expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} ${disk3} 738add_msg="# TODO Sun CR 6726091, Lustre bug 16873" 739expect_fl ${ZPOOL} add ${name0} log mirror ${disk4} ${disk5} 740exp=`( 741 echo " pool: ${name0}" 742 echo " state: ONLINE" 743 echo " scrub: none requested" 744 echo "config:" 745 echo " NAME STATE READ WRITE CKSUM" 746 echo " ${name0} ONLINE 0 0 0" 747 echo " ${disk0} ONLINE 0 0 0" 748 echo " logs ONLINE 0 0 0" 749 echo " mirror ONLINE 0 0 0" 750 echo " ${disk1} ONLINE 0 0 0" 751 echo " ${disk2} ONLINE 0 0 0" 752 echo " ${disk3} ONLINE 0 0 0" 753 echo "errors: No known data errors" 754)` 755expect "${exp}" ${ZPOOL} status ${name0} 756add_msg="" 757expect_ok ${ZPOOL} destroy ${name0} 758expect_fl ${ZPOOL} status -x ${name0} 759 760expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} ${disk3} 761expect_ok ${ZPOOL} add -f ${name0} log mirror ${disk4} ${disk5} 762exp=`( 763 echo " pool: ${name0}" 764 echo " state: ONLINE" 765 echo " scrub: none requested" 766 echo "config:" 767 echo " NAME STATE READ WRITE CKSUM" 768 echo " ${name0} ONLINE 0 0 0" 769 echo " ${disk0} ONLINE 0 0 0" 770 echo " logs ONLINE 0 0 0" 771 echo " mirror ONLINE 0 0 0" 772 echo " ${disk1} ONLINE 0 0 0" 773 echo " ${disk2} ONLINE 0 0 0" 774 echo " ${disk3} ONLINE 0 0 0" 775 echo " mirror ONLINE 0 0 0" 776 echo " ${disk4} ONLINE 0 0 0" 777 echo " ${disk5} ONLINE 0 0 0" 778 echo "errors: No known data errors" 779)` 780expect "${exp}" ${ZPOOL} status ${name0} 781expect_ok ${ZPOOL} destroy ${name0} 782expect_fl ${ZPOOL} status -x ${name0} 783expect_fl ${ZPOOL} destroy ${name0} 784 785disks_destroy 786