1185029Spjd#!/bin/sh 2185029Spjd# $FreeBSD: releng/10.3/tools/regression/zfs/zpool/add/log.t 185029 2008-11-17 20:49:29Z pjd $ 3185029Spjd 4185029Spjddir=`dirname $0` 5185029Spjd. ${dir}/../../misc.sh 6185029Spjd 7185029Spjdecho "1..66" 8185029Spjd 9185029Spjddisks_create 7 10185029Spjdnames_create 1 11185029Spjd 12185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} 13185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk1} 14185029Spjdexp=`( 15185029Spjd echo " pool: ${name0}" 16185029Spjd echo " state: ONLINE" 17185029Spjd echo " scrub: none requested" 18185029Spjd echo "config:" 19185029Spjd echo " NAME STATE READ WRITE CKSUM" 20185029Spjd echo " ${name0} ONLINE 0 0 0" 21185029Spjd echo " ${disk0} ONLINE 0 0 0" 22185029Spjd echo " logs ONLINE 0 0 0" 23185029Spjd echo " ${disk1} ONLINE 0 0 0" 24185029Spjd echo "errors: No known data errors" 25185029Spjd)` 26185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 27185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 28185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 29185029Spjd 30185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} 31185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk1} ${disk2} ${disk3} 32185029Spjdexp=`( 33185029Spjd echo " pool: ${name0}" 34185029Spjd echo " state: ONLINE" 35185029Spjd echo " scrub: none requested" 36185029Spjd echo "config:" 37185029Spjd echo " NAME STATE READ WRITE CKSUM" 38185029Spjd echo " ${name0} ONLINE 0 0 0" 39185029Spjd echo " ${disk0} ONLINE 0 0 0" 40185029Spjd echo " logs ONLINE 0 0 0" 41185029Spjd echo " mirror ONLINE 0 0 0" 42185029Spjd echo " ${disk1} ONLINE 0 0 0" 43185029Spjd echo " ${disk2} ONLINE 0 0 0" 44185029Spjd echo " ${disk3} ONLINE 0 0 0" 45185029Spjd echo "errors: No known data errors" 46185029Spjd)` 47185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 48185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 49185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 50185029Spjd 51185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 52185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk2} 53185029Spjdexp=`( 54185029Spjd echo " pool: ${name0}" 55185029Spjd echo " state: ONLINE" 56185029Spjd echo " scrub: none requested" 57185029Spjd echo "config:" 58185029Spjd echo " NAME STATE READ WRITE CKSUM" 59185029Spjd echo " ${name0} ONLINE 0 0 0" 60185029Spjd echo " mirror ONLINE 0 0 0" 61185029Spjd echo " ${disk0} ONLINE 0 0 0" 62185029Spjd echo " ${disk1} ONLINE 0 0 0" 63185029Spjd echo " logs ONLINE 0 0 0" 64185029Spjd echo " ${disk2} ONLINE 0 0 0" 65185029Spjd echo "errors: No known data errors" 66185029Spjd)` 67185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 68185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 69185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 70185029Spjd 71185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} 72185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk2} ${disk3} ${disk4} 73185029Spjdexp=`( 74185029Spjd echo " pool: ${name0}" 75185029Spjd echo " state: ONLINE" 76185029Spjd echo " scrub: none requested" 77185029Spjd echo "config:" 78185029Spjd echo " NAME STATE READ WRITE CKSUM" 79185029Spjd echo " ${name0} ONLINE 0 0 0" 80185029Spjd echo " mirror ONLINE 0 0 0" 81185029Spjd echo " ${disk0} ONLINE 0 0 0" 82185029Spjd echo " ${disk1} ONLINE 0 0 0" 83185029Spjd echo " logs ONLINE 0 0 0" 84185029Spjd echo " mirror ONLINE 0 0 0" 85185029Spjd echo " ${disk2} ONLINE 0 0 0" 86185029Spjd echo " ${disk3} ONLINE 0 0 0" 87185029Spjd echo " ${disk4} ONLINE 0 0 0" 88185029Spjd echo "errors: No known data errors" 89185029Spjd)` 90185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 91185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 92185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 93185029Spjd 94185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} 95185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk3} 96185029Spjdexp=`( 97185029Spjd echo " pool: ${name0}" 98185029Spjd echo " state: ONLINE" 99185029Spjd echo " scrub: none requested" 100185029Spjd echo "config:" 101185029Spjd echo " NAME STATE READ WRITE CKSUM" 102185029Spjd echo " ${name0} ONLINE 0 0 0" 103185029Spjd echo " raidz1 ONLINE 0 0 0" 104185029Spjd echo " ${disk0} ONLINE 0 0 0" 105185029Spjd echo " ${disk1} ONLINE 0 0 0" 106185029Spjd echo " ${disk2} ONLINE 0 0 0" 107185029Spjd echo " logs ONLINE 0 0 0" 108185029Spjd echo " ${disk3} ONLINE 0 0 0" 109185029Spjd echo "errors: No known data errors" 110185029Spjd)` 111185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 112185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 113185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 114185029Spjd 115185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} 116185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk3} ${disk4} ${disk5} 117185029Spjdexp=`( 118185029Spjd echo " pool: ${name0}" 119185029Spjd echo " state: ONLINE" 120185029Spjd echo " scrub: none requested" 121185029Spjd echo "config:" 122185029Spjd echo " NAME STATE READ WRITE CKSUM" 123185029Spjd echo " ${name0} ONLINE 0 0 0" 124185029Spjd echo " raidz1 ONLINE 0 0 0" 125185029Spjd echo " ${disk0} ONLINE 0 0 0" 126185029Spjd echo " ${disk1} ONLINE 0 0 0" 127185029Spjd echo " ${disk2} ONLINE 0 0 0" 128185029Spjd echo " logs ONLINE 0 0 0" 129185029Spjd echo " mirror ONLINE 0 0 0" 130185029Spjd echo " ${disk3} ONLINE 0 0 0" 131185029Spjd echo " ${disk4} ONLINE 0 0 0" 132185029Spjd echo " ${disk5} ONLINE 0 0 0" 133185029Spjd echo "errors: No known data errors" 134185029Spjd)` 135185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 136185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 137185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 138185029Spjd 139185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 140185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk4} 141185029Spjdexp=`( 142185029Spjd echo " pool: ${name0}" 143185029Spjd echo " state: ONLINE" 144185029Spjd echo " scrub: none requested" 145185029Spjd echo "config:" 146185029Spjd echo " NAME STATE READ WRITE CKSUM" 147185029Spjd echo " ${name0} ONLINE 0 0 0" 148185029Spjd echo " raidz2 ONLINE 0 0 0" 149185029Spjd echo " ${disk0} ONLINE 0 0 0" 150185029Spjd echo " ${disk1} ONLINE 0 0 0" 151185029Spjd echo " ${disk2} ONLINE 0 0 0" 152185029Spjd echo " ${disk3} ONLINE 0 0 0" 153185029Spjd echo " logs ONLINE 0 0 0" 154185029Spjd echo " ${disk4} ONLINE 0 0 0" 155185029Spjd echo "errors: No known data errors" 156185029Spjd)` 157185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 158185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 159185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 160185029Spjd 161185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} 162185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk4} ${disk5} ${disk6} 163185029Spjdexp=`( 164185029Spjd echo " pool: ${name0}" 165185029Spjd echo " state: ONLINE" 166185029Spjd echo " scrub: none requested" 167185029Spjd echo "config:" 168185029Spjd echo " NAME STATE READ WRITE CKSUM" 169185029Spjd echo " ${name0} ONLINE 0 0 0" 170185029Spjd echo " raidz2 ONLINE 0 0 0" 171185029Spjd echo " ${disk0} ONLINE 0 0 0" 172185029Spjd echo " ${disk1} ONLINE 0 0 0" 173185029Spjd echo " ${disk2} ONLINE 0 0 0" 174185029Spjd echo " ${disk3} ONLINE 0 0 0" 175185029Spjd echo " logs ONLINE 0 0 0" 176185029Spjd echo " mirror ONLINE 0 0 0" 177185029Spjd echo " ${disk4} ONLINE 0 0 0" 178185029Spjd echo " ${disk5} ONLINE 0 0 0" 179185029Spjd echo " ${disk6} ONLINE 0 0 0" 180185029Spjd echo "errors: No known data errors" 181185029Spjd)` 182185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 183185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 184185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 185185029Spjd 186185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} 187185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk1} 188185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk2} 189185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk3} 190185029Spjdexp=`( 191185029Spjd echo " pool: ${name0}" 192185029Spjd echo " state: ONLINE" 193185029Spjd echo " scrub: none requested" 194185029Spjd echo "config:" 195185029Spjd echo " NAME STATE READ WRITE CKSUM" 196185029Spjd echo " ${name0} ONLINE 0 0 0" 197185029Spjd echo " ${disk0} ONLINE 0 0 0" 198185029Spjd echo " logs ONLINE 0 0 0" 199185029Spjd echo " ${disk1} ONLINE 0 0 0" 200185029Spjd echo " ${disk2} ONLINE 0 0 0" 201185029Spjd echo " ${disk3} ONLINE 0 0 0" 202185029Spjd echo "errors: No known data errors" 203185029Spjd)` 204185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 205185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 206185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 207185029Spjd 208185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} 209185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk1} ${disk2} 210185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk3} ${disk4} 211185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk5} ${disk6} 212185029Spjdexp=`( 213185029Spjd echo " pool: ${name0}" 214185029Spjd echo " state: ONLINE" 215185029Spjd echo " scrub: none requested" 216185029Spjd echo "config:" 217185029Spjd echo " NAME STATE READ WRITE CKSUM" 218185029Spjd echo " ${name0} ONLINE 0 0 0" 219185029Spjd echo " ${disk0} ONLINE 0 0 0" 220185029Spjd echo " logs ONLINE 0 0 0" 221185029Spjd echo " mirror ONLINE 0 0 0" 222185029Spjd echo " ${disk1} ONLINE 0 0 0" 223185029Spjd echo " ${disk2} ONLINE 0 0 0" 224185029Spjd echo " mirror ONLINE 0 0 0" 225185029Spjd echo " ${disk3} ONLINE 0 0 0" 226185029Spjd echo " ${disk4} ONLINE 0 0 0" 227185029Spjd echo " mirror ONLINE 0 0 0" 228185029Spjd echo " ${disk5} ONLINE 0 0 0" 229185029Spjd echo " ${disk6} ONLINE 0 0 0" 230185029Spjd echo "errors: No known data errors" 231185029Spjd)` 232185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 233185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 234185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 235185029Spjd 236185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} log ${disk1} 237185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk2} 238185029Spjdexpect_ok ${ZPOOL} add ${name0} log ${disk3} 239185029Spjdexp=`( 240185029Spjd echo " pool: ${name0}" 241185029Spjd echo " state: ONLINE" 242185029Spjd echo " scrub: none requested" 243185029Spjd echo "config:" 244185029Spjd echo " NAME STATE READ WRITE CKSUM" 245185029Spjd echo " ${name0} ONLINE 0 0 0" 246185029Spjd echo " ${disk0} ONLINE 0 0 0" 247185029Spjd echo " logs ONLINE 0 0 0" 248185029Spjd echo " ${disk1} ONLINE 0 0 0" 249185029Spjd echo " ${disk2} ONLINE 0 0 0" 250185029Spjd echo " ${disk3} ONLINE 0 0 0" 251185029Spjd echo "errors: No known data errors" 252185029Spjd)` 253185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 254185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 255185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 256185029Spjd 257185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} 258185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk3} ${disk4} 259185029Spjdexpect_ok ${ZPOOL} add ${name0} log mirror ${disk5} ${disk6} 260185029Spjdexp=`( 261185029Spjd echo " pool: ${name0}" 262185029Spjd echo " state: ONLINE" 263185029Spjd echo " scrub: none requested" 264185029Spjd echo "config:" 265185029Spjd echo " NAME STATE READ WRITE CKSUM" 266185029Spjd echo " ${name0} ONLINE 0 0 0" 267185029Spjd echo " ${disk0} ONLINE 0 0 0" 268185029Spjd echo " logs ONLINE 0 0 0" 269185029Spjd echo " mirror ONLINE 0 0 0" 270185029Spjd echo " ${disk1} ONLINE 0 0 0" 271185029Spjd echo " ${disk2} ONLINE 0 0 0" 272185029Spjd echo " mirror ONLINE 0 0 0" 273185029Spjd echo " ${disk3} ONLINE 0 0 0" 274185029Spjd echo " ${disk4} ONLINE 0 0 0" 275185029Spjd echo " mirror ONLINE 0 0 0" 276185029Spjd echo " ${disk5} ONLINE 0 0 0" 277185029Spjd echo " ${disk6} ONLINE 0 0 0" 278185029Spjd echo "errors: No known data errors" 279185029Spjd)` 280185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 281185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 282185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 283185029Spjd 284185029Spjddisks_destroy 285