11ba4a712SPawel Jakub Dawidek#!/bin/sh 21ba4a712SPawel Jakub Dawidek# $FreeBSD$ 31ba4a712SPawel Jakub Dawidek 41ba4a712SPawel Jakub Dawidekdir=`dirname $0` 51ba4a712SPawel Jakub Dawidek. ${dir}/../../misc.sh 61ba4a712SPawel Jakub Dawidek 71ba4a712SPawel Jakub Dawidekecho "1..56" 81ba4a712SPawel Jakub Dawidek 91ba4a712SPawel Jakub Dawidekdisks_create 7 101ba4a712SPawel Jakub Dawideknames_create 1 111ba4a712SPawel Jakub Dawidek 121ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} ${disk0} log ${disk1} 131ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 141ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 151ba4a712SPawel Jakub Dawidekexp=`( 161ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 171ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 181ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 191ba4a712SPawel Jakub Dawidek echo "config:" 201ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 211ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 221ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 231ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 241ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 251ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 261ba4a712SPawel Jakub Dawidek)` 271ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 281ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 291ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 301ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 311ba4a712SPawel Jakub Dawidek 321ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} ${disk3} 331ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 341ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 351ba4a712SPawel Jakub Dawidekexp=`( 361ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 371ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 381ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 391ba4a712SPawel Jakub Dawidek echo "config:" 401ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 411ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 421ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 431ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 441ba4a712SPawel Jakub Dawidek echo " mirror ONLINE 0 0 0" 451ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 461ba4a712SPawel Jakub Dawidek echo " ${disk2} ONLINE 0 0 0" 471ba4a712SPawel Jakub Dawidek echo " ${disk3} ONLINE 0 0 0" 481ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 491ba4a712SPawel Jakub Dawidek)` 501ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 511ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 521ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 531ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 541ba4a712SPawel Jakub Dawidek 551ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} log ${disk2} 561ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 571ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 581ba4a712SPawel Jakub Dawidekexp=`( 591ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 601ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 611ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 621ba4a712SPawel Jakub Dawidek echo "config:" 631ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 641ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 651ba4a712SPawel Jakub Dawidek echo " mirror ONLINE 0 0 0" 661ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 671ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 681ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 691ba4a712SPawel Jakub Dawidek echo " ${disk2} ONLINE 0 0 0" 701ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 711ba4a712SPawel Jakub Dawidek)` 721ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 731ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 741ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 751ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 761ba4a712SPawel Jakub Dawidek 771ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} log mirror ${disk2} ${disk3} ${disk4} 781ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 791ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 801ba4a712SPawel Jakub Dawidekexp=`( 811ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 821ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 831ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 841ba4a712SPawel Jakub Dawidek echo "config:" 851ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 861ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 871ba4a712SPawel Jakub Dawidek echo " mirror ONLINE 0 0 0" 881ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 891ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 901ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 911ba4a712SPawel Jakub Dawidek echo " mirror ONLINE 0 0 0" 921ba4a712SPawel Jakub Dawidek echo " ${disk2} ONLINE 0 0 0" 931ba4a712SPawel Jakub Dawidek echo " ${disk3} ONLINE 0 0 0" 941ba4a712SPawel Jakub Dawidek echo " ${disk4} ONLINE 0 0 0" 951ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 961ba4a712SPawel Jakub Dawidek)` 971ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 981ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 991ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 1001ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 1011ba4a712SPawel Jakub Dawidek 1021ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} log ${disk3} 1031ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 1041ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 1051ba4a712SPawel Jakub Dawidekexp=`( 1061ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 1071ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 1081ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 1091ba4a712SPawel Jakub Dawidek echo "config:" 1101ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 1111ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 1121ba4a712SPawel Jakub Dawidek echo " raidz1 ONLINE 0 0 0" 1131ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 1141ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 1151ba4a712SPawel Jakub Dawidek echo " ${disk2} ONLINE 0 0 0" 1161ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 1171ba4a712SPawel Jakub Dawidek echo " ${disk3} ONLINE 0 0 0" 1181ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 1191ba4a712SPawel Jakub Dawidek)` 1201ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 1211ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 1221ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 1231ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 1241ba4a712SPawel Jakub Dawidek 1251ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} log mirror ${disk3} ${disk4} ${disk5} 1261ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 1271ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 1281ba4a712SPawel Jakub Dawidekexp=`( 1291ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 1301ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 1311ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 1321ba4a712SPawel Jakub Dawidek echo "config:" 1331ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 1341ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 1351ba4a712SPawel Jakub Dawidek echo " raidz1 ONLINE 0 0 0" 1361ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 1371ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 1381ba4a712SPawel Jakub Dawidek echo " ${disk2} ONLINE 0 0 0" 1391ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 1401ba4a712SPawel Jakub Dawidek echo " mirror ONLINE 0 0 0" 1411ba4a712SPawel Jakub Dawidek echo " ${disk3} ONLINE 0 0 0" 1421ba4a712SPawel Jakub Dawidek echo " ${disk4} ONLINE 0 0 0" 1431ba4a712SPawel Jakub Dawidek echo " ${disk5} ONLINE 0 0 0" 1441ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 1451ba4a712SPawel Jakub Dawidek)` 1461ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 1471ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 1481ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 1491ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 1501ba4a712SPawel Jakub Dawidek 1511ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} log ${disk4} 1521ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 1531ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 1541ba4a712SPawel Jakub Dawidekexp=`( 1551ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 1561ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 1571ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 1581ba4a712SPawel Jakub Dawidek echo "config:" 1591ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 1601ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 1611ba4a712SPawel Jakub Dawidek echo " raidz2 ONLINE 0 0 0" 1621ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 1631ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 1641ba4a712SPawel Jakub Dawidek echo " ${disk2} ONLINE 0 0 0" 1651ba4a712SPawel Jakub Dawidek echo " ${disk3} ONLINE 0 0 0" 1661ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 1671ba4a712SPawel Jakub Dawidek echo " ${disk4} ONLINE 0 0 0" 1681ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 1691ba4a712SPawel Jakub Dawidek)` 1701ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 1711ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 1721ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 1731ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 1741ba4a712SPawel Jakub Dawidek 1751ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} log mirror ${disk4} ${disk5} ${disk6} 1761ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0} 1771ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0} 1781ba4a712SPawel Jakub Dawidekexp=`( 1791ba4a712SPawel Jakub Dawidek echo " pool: ${name0}" 1801ba4a712SPawel Jakub Dawidek echo " state: ONLINE" 1811ba4a712SPawel Jakub Dawidek echo " scrub: none requested" 1821ba4a712SPawel Jakub Dawidek echo "config:" 1831ba4a712SPawel Jakub Dawidek echo " NAME STATE READ WRITE CKSUM" 1841ba4a712SPawel Jakub Dawidek echo " ${name0} ONLINE 0 0 0" 1851ba4a712SPawel Jakub Dawidek echo " raidz2 ONLINE 0 0 0" 1861ba4a712SPawel Jakub Dawidek echo " ${disk0} ONLINE 0 0 0" 1871ba4a712SPawel Jakub Dawidek echo " ${disk1} ONLINE 0 0 0" 1881ba4a712SPawel Jakub Dawidek echo " ${disk2} ONLINE 0 0 0" 1891ba4a712SPawel Jakub Dawidek echo " ${disk3} ONLINE 0 0 0" 1901ba4a712SPawel Jakub Dawidek echo " logs ONLINE 0 0 0" 1911ba4a712SPawel Jakub Dawidek echo " mirror ONLINE 0 0 0" 1921ba4a712SPawel Jakub Dawidek echo " ${disk4} ONLINE 0 0 0" 1931ba4a712SPawel Jakub Dawidek echo " ${disk5} ONLINE 0 0 0" 1941ba4a712SPawel Jakub Dawidek echo " ${disk6} ONLINE 0 0 0" 1951ba4a712SPawel Jakub Dawidek echo "errors: No known data errors" 1961ba4a712SPawel Jakub Dawidek)` 1971ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0} 1981ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0} 1991ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0} 2001ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0} 2011ba4a712SPawel Jakub Dawidek 2021ba4a712SPawel Jakub Dawidekdisks_destroy 203