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