1185029Spjd#!/bin/sh 2185029Spjd# $FreeBSD: releng/10.3/tools/regression/zfs/zpool/create/log.t 185029 2008-11-17 20:49:29Z pjd $ 3185029Spjd 4185029Spjddir=`dirname $0` 5185029Spjd. ${dir}/../../misc.sh 6185029Spjd 7185029Spjdecho "1..56" 8185029Spjd 9185029Spjddisks_create 7 10185029Spjdnames_create 1 11185029Spjd 12185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} log ${disk1} 13185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 14185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 15185029Spjdexp=`( 16185029Spjd echo " pool: ${name0}" 17185029Spjd echo " state: ONLINE" 18185029Spjd echo " scrub: none requested" 19185029Spjd echo "config:" 20185029Spjd echo " NAME STATE READ WRITE CKSUM" 21185029Spjd echo " ${name0} ONLINE 0 0 0" 22185029Spjd echo " ${disk0} ONLINE 0 0 0" 23185029Spjd echo " logs ONLINE 0 0 0" 24185029Spjd echo " ${disk1} ONLINE 0 0 0" 25185029Spjd echo "errors: No known data errors" 26185029Spjd)` 27185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 28185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 29185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 30185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 31185029Spjd 32185029Spjdexpect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} ${disk3} 33185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 34185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 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 " ${disk0} ONLINE 0 0 0" 43185029Spjd echo " logs ONLINE 0 0 0" 44185029Spjd echo " mirror ONLINE 0 0 0" 45185029Spjd echo " ${disk1} ONLINE 0 0 0" 46185029Spjd echo " ${disk2} ONLINE 0 0 0" 47185029Spjd echo " ${disk3} 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} 53185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 54185029Spjd 55185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} log ${disk2} 56185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 57185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 58185029Spjdexp=`( 59185029Spjd echo " pool: ${name0}" 60185029Spjd echo " state: ONLINE" 61185029Spjd echo " scrub: none requested" 62185029Spjd echo "config:" 63185029Spjd echo " NAME STATE READ WRITE CKSUM" 64185029Spjd echo " ${name0} ONLINE 0 0 0" 65185029Spjd echo " mirror ONLINE 0 0 0" 66185029Spjd echo " ${disk0} ONLINE 0 0 0" 67185029Spjd echo " ${disk1} ONLINE 0 0 0" 68185029Spjd echo " logs ONLINE 0 0 0" 69185029Spjd echo " ${disk2} ONLINE 0 0 0" 70185029Spjd echo "errors: No known data errors" 71185029Spjd)` 72185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 73185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 74185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 75185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 76185029Spjd 77185029Spjdexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} log mirror ${disk2} ${disk3} ${disk4} 78185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 79185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 80185029Spjdexp=`( 81185029Spjd echo " pool: ${name0}" 82185029Spjd echo " state: ONLINE" 83185029Spjd echo " scrub: none requested" 84185029Spjd echo "config:" 85185029Spjd echo " NAME STATE READ WRITE CKSUM" 86185029Spjd echo " ${name0} ONLINE 0 0 0" 87185029Spjd echo " mirror ONLINE 0 0 0" 88185029Spjd echo " ${disk0} ONLINE 0 0 0" 89185029Spjd echo " ${disk1} ONLINE 0 0 0" 90185029Spjd echo " logs ONLINE 0 0 0" 91185029Spjd echo " mirror ONLINE 0 0 0" 92185029Spjd echo " ${disk2} ONLINE 0 0 0" 93185029Spjd echo " ${disk3} ONLINE 0 0 0" 94185029Spjd echo " ${disk4} ONLINE 0 0 0" 95185029Spjd echo "errors: No known data errors" 96185029Spjd)` 97185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 98185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 99185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 100185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 101185029Spjd 102185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} log ${disk3} 103185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 104185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 105185029Spjdexp=`( 106185029Spjd echo " pool: ${name0}" 107185029Spjd echo " state: ONLINE" 108185029Spjd echo " scrub: none requested" 109185029Spjd echo "config:" 110185029Spjd echo " NAME STATE READ WRITE CKSUM" 111185029Spjd echo " ${name0} ONLINE 0 0 0" 112185029Spjd echo " raidz1 ONLINE 0 0 0" 113185029Spjd echo " ${disk0} ONLINE 0 0 0" 114185029Spjd echo " ${disk1} ONLINE 0 0 0" 115185029Spjd echo " ${disk2} ONLINE 0 0 0" 116185029Spjd echo " logs ONLINE 0 0 0" 117185029Spjd echo " ${disk3} ONLINE 0 0 0" 118185029Spjd echo "errors: No known data errors" 119185029Spjd)` 120185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 121185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 122185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 123185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 124185029Spjd 125185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} log mirror ${disk3} ${disk4} ${disk5} 126185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 127185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 128185029Spjdexp=`( 129185029Spjd echo " pool: ${name0}" 130185029Spjd echo " state: ONLINE" 131185029Spjd echo " scrub: none requested" 132185029Spjd echo "config:" 133185029Spjd echo " NAME STATE READ WRITE CKSUM" 134185029Spjd echo " ${name0} ONLINE 0 0 0" 135185029Spjd echo " raidz1 ONLINE 0 0 0" 136185029Spjd echo " ${disk0} ONLINE 0 0 0" 137185029Spjd echo " ${disk1} ONLINE 0 0 0" 138185029Spjd echo " ${disk2} ONLINE 0 0 0" 139185029Spjd echo " logs ONLINE 0 0 0" 140185029Spjd echo " mirror ONLINE 0 0 0" 141185029Spjd echo " ${disk3} ONLINE 0 0 0" 142185029Spjd echo " ${disk4} ONLINE 0 0 0" 143185029Spjd echo " ${disk5} ONLINE 0 0 0" 144185029Spjd echo "errors: No known data errors" 145185029Spjd)` 146185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 147185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 148185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 149185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 150185029Spjd 151185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} log ${disk4} 152185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 153185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 154185029Spjdexp=`( 155185029Spjd echo " pool: ${name0}" 156185029Spjd echo " state: ONLINE" 157185029Spjd echo " scrub: none requested" 158185029Spjd echo "config:" 159185029Spjd echo " NAME STATE READ WRITE CKSUM" 160185029Spjd echo " ${name0} ONLINE 0 0 0" 161185029Spjd echo " raidz2 ONLINE 0 0 0" 162185029Spjd echo " ${disk0} ONLINE 0 0 0" 163185029Spjd echo " ${disk1} ONLINE 0 0 0" 164185029Spjd echo " ${disk2} ONLINE 0 0 0" 165185029Spjd echo " ${disk3} ONLINE 0 0 0" 166185029Spjd echo " logs ONLINE 0 0 0" 167185029Spjd echo " ${disk4} ONLINE 0 0 0" 168185029Spjd echo "errors: No known data errors" 169185029Spjd)` 170185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 171185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 172185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 173185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 174185029Spjd 175185029Spjdexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} log mirror ${disk4} ${disk5} ${disk6} 176185029Spjdexpect_ok ${ZPOOL} status -x ${name0} 177185029Spjdexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 178185029Spjdexp=`( 179185029Spjd echo " pool: ${name0}" 180185029Spjd echo " state: ONLINE" 181185029Spjd echo " scrub: none requested" 182185029Spjd echo "config:" 183185029Spjd echo " NAME STATE READ WRITE CKSUM" 184185029Spjd echo " ${name0} ONLINE 0 0 0" 185185029Spjd echo " raidz2 ONLINE 0 0 0" 186185029Spjd echo " ${disk0} ONLINE 0 0 0" 187185029Spjd echo " ${disk1} ONLINE 0 0 0" 188185029Spjd echo " ${disk2} ONLINE 0 0 0" 189185029Spjd echo " ${disk3} ONLINE 0 0 0" 190185029Spjd echo " logs ONLINE 0 0 0" 191185029Spjd echo " mirror ONLINE 0 0 0" 192185029Spjd echo " ${disk4} ONLINE 0 0 0" 193185029Spjd echo " ${disk5} ONLINE 0 0 0" 194185029Spjd echo " ${disk6} ONLINE 0 0 0" 195185029Spjd echo "errors: No known data errors" 196185029Spjd)` 197185029Spjdexpect "${exp}" ${ZPOOL} status ${name0} 198185029Spjdexpect_ok ${ZPOOL} destroy ${name0} 199185029Spjdexpect_fl ${ZPOOL} status -x ${name0} 200185029Spjdexpect_fl ${ZPOOL} destroy ${name0} 201185029Spjd 202185029Spjddisks_destroy 203