xref: /freebsd/tools/regression/zfs/zpool/create/raidz1.t (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
11ba4a712SPawel Jakub Dawidek#!/bin/sh
21ba4a712SPawel Jakub Dawidek
31ba4a712SPawel Jakub Dawidekdir=`dirname $0`
41ba4a712SPawel Jakub Dawidek. ${dir}/../../misc.sh
51ba4a712SPawel Jakub Dawidek
61ba4a712SPawel Jakub Dawidekecho "1..37"
71ba4a712SPawel Jakub Dawidek
81ba4a712SPawel Jakub Dawidekdisks_create 9
91ba4a712SPawel Jakub Dawideknames_create 1
101ba4a712SPawel Jakub Dawidek
111ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} create ${name0} raidz ${disk0}
121ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} create ${name0} raidz1 ${disk0}
131ba4a712SPawel Jakub Dawidek
141ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1}
151ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0}
161ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
171ba4a712SPawel Jakub Dawidekexp=`(
181ba4a712SPawel Jakub Dawidek  echo "  pool: ${name0}"
191ba4a712SPawel Jakub Dawidek  echo " state: ONLINE"
201ba4a712SPawel Jakub Dawidek  echo " scrub: none requested"
211ba4a712SPawel Jakub Dawidek  echo "config:"
221ba4a712SPawel Jakub Dawidek  echo "	NAME          STATE   READ WRITE CKSUM"
231ba4a712SPawel Jakub Dawidek  echo "	${name0}      ONLINE     0     0     0"
241ba4a712SPawel Jakub Dawidek  echo "	  raidz1      ONLINE     0     0     0"
251ba4a712SPawel Jakub Dawidek  echo "	    ${disk0}  ONLINE     0     0     0"
261ba4a712SPawel Jakub Dawidek  echo "	    ${disk1}  ONLINE     0     0     0"
271ba4a712SPawel Jakub Dawidek  echo "errors: No known data errors"
281ba4a712SPawel Jakub Dawidek)`
291ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0}
301ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0}
311ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0}
321ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0}
331ba4a712SPawel Jakub Dawidek
341ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1}
351ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0}
361ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
371ba4a712SPawel Jakub Dawidekexp=`(
381ba4a712SPawel Jakub Dawidek  echo "  pool: ${name0}"
391ba4a712SPawel Jakub Dawidek  echo " state: ONLINE"
401ba4a712SPawel Jakub Dawidek  echo " scrub: none requested"
411ba4a712SPawel Jakub Dawidek  echo "config:"
421ba4a712SPawel Jakub Dawidek  echo "	NAME          STATE   READ WRITE CKSUM"
431ba4a712SPawel Jakub Dawidek  echo "	${name0}      ONLINE     0     0     0"
441ba4a712SPawel Jakub Dawidek  echo "	  raidz1      ONLINE     0     0     0"
451ba4a712SPawel Jakub Dawidek  echo "	    ${disk0}  ONLINE     0     0     0"
461ba4a712SPawel Jakub Dawidek  echo "	    ${disk1}  ONLINE     0     0     0"
471ba4a712SPawel Jakub Dawidek  echo "errors: No known data errors"
481ba4a712SPawel Jakub Dawidek)`
491ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0}
501ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0}
511ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0}
521ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0}
531ba4a712SPawel Jakub Dawidek
541ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} ${disk3}
551ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0}
561ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
571ba4a712SPawel Jakub Dawidekexp=`(
581ba4a712SPawel Jakub Dawidek  echo "  pool: ${name0}"
591ba4a712SPawel Jakub Dawidek  echo " state: ONLINE"
601ba4a712SPawel Jakub Dawidek  echo " scrub: none requested"
611ba4a712SPawel Jakub Dawidek  echo "config:"
621ba4a712SPawel Jakub Dawidek  echo "	NAME          STATE   READ WRITE CKSUM"
631ba4a712SPawel Jakub Dawidek  echo "	${name0}      ONLINE     0     0     0"
641ba4a712SPawel Jakub Dawidek  echo "	  raidz1      ONLINE     0     0     0"
651ba4a712SPawel Jakub Dawidek  echo "	    ${disk0}  ONLINE     0     0     0"
661ba4a712SPawel Jakub Dawidek  echo "	    ${disk1}  ONLINE     0     0     0"
671ba4a712SPawel Jakub Dawidek  echo "	    ${disk2}  ONLINE     0     0     0"
681ba4a712SPawel Jakub Dawidek  echo "	    ${disk3}  ONLINE     0     0     0"
691ba4a712SPawel Jakub Dawidek  echo "errors: No known data errors"
701ba4a712SPawel Jakub Dawidek)`
711ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0}
721ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0}
731ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0}
741ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0}
751ba4a712SPawel Jakub Dawidek
761ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
771ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0}
781ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
791ba4a712SPawel Jakub Dawidekexp=`(
801ba4a712SPawel Jakub Dawidek  echo "  pool: ${name0}"
811ba4a712SPawel Jakub Dawidek  echo " state: ONLINE"
821ba4a712SPawel Jakub Dawidek  echo " scrub: none requested"
831ba4a712SPawel Jakub Dawidek  echo "config:"
841ba4a712SPawel Jakub Dawidek  echo "	NAME          STATE   READ WRITE CKSUM"
851ba4a712SPawel Jakub Dawidek  echo "	${name0}      ONLINE     0     0     0"
861ba4a712SPawel Jakub Dawidek  echo "	  raidz1      ONLINE     0     0     0"
871ba4a712SPawel Jakub Dawidek  echo "	    ${disk0}  ONLINE     0     0     0"
881ba4a712SPawel Jakub Dawidek  echo "	    ${disk1}  ONLINE     0     0     0"
891ba4a712SPawel Jakub Dawidek  echo "	    ${disk2}  ONLINE     0     0     0"
901ba4a712SPawel Jakub Dawidek  echo "	    ${disk3}  ONLINE     0     0     0"
911ba4a712SPawel Jakub Dawidek  echo "	    ${disk4}  ONLINE     0     0     0"
921ba4a712SPawel Jakub Dawidek  echo "errors: No known data errors"
931ba4a712SPawel Jakub Dawidek)`
941ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0}
951ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0}
961ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0}
971ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0}
981ba4a712SPawel Jakub Dawidek
991ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} raidz ${disk3} ${disk4} ${disk5} raidz1 ${disk6} ${disk7} ${disk8}
1001ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} status -x ${name0}
1011ba4a712SPawel Jakub Dawidekexpect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
1021ba4a712SPawel Jakub Dawidekexp=`(
1031ba4a712SPawel Jakub Dawidek  echo "  pool: ${name0}"
1041ba4a712SPawel Jakub Dawidek  echo " state: ONLINE"
1051ba4a712SPawel Jakub Dawidek  echo " scrub: none requested"
1061ba4a712SPawel Jakub Dawidek  echo "config:"
1071ba4a712SPawel Jakub Dawidek  echo "	NAME          STATE   READ WRITE CKSUM"
1081ba4a712SPawel Jakub Dawidek  echo "	${name0}      ONLINE     0     0     0"
1091ba4a712SPawel Jakub Dawidek  echo "	  raidz1      ONLINE     0     0     0"
1101ba4a712SPawel Jakub Dawidek  echo "	    ${disk0}  ONLINE     0     0     0"
1111ba4a712SPawel Jakub Dawidek  echo "	    ${disk1}  ONLINE     0     0     0"
1121ba4a712SPawel Jakub Dawidek  echo "	    ${disk2}  ONLINE     0     0     0"
1131ba4a712SPawel Jakub Dawidek  echo "	  raidz1      ONLINE     0     0     0"
1141ba4a712SPawel Jakub Dawidek  echo "	    ${disk3}  ONLINE     0     0     0"
1151ba4a712SPawel Jakub Dawidek  echo "	    ${disk4}  ONLINE     0     0     0"
1161ba4a712SPawel Jakub Dawidek  echo "	    ${disk5}  ONLINE     0     0     0"
1171ba4a712SPawel Jakub Dawidek  echo "	  raidz1      ONLINE     0     0     0"
1181ba4a712SPawel Jakub Dawidek  echo "	    ${disk6}  ONLINE     0     0     0"
1191ba4a712SPawel Jakub Dawidek  echo "	    ${disk7}  ONLINE     0     0     0"
1201ba4a712SPawel Jakub Dawidek  echo "	    ${disk8}  ONLINE     0     0     0"
1211ba4a712SPawel Jakub Dawidek  echo "errors: No known data errors"
1221ba4a712SPawel Jakub Dawidek)`
1231ba4a712SPawel Jakub Dawidekexpect "${exp}" ${ZPOOL} status ${name0}
1241ba4a712SPawel Jakub Dawidekexpect_ok ${ZPOOL} destroy ${name0}
1251ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} status -x ${name0}
1261ba4a712SPawel Jakub Dawidekexpect_fl ${ZPOOL} destroy ${name0}
1271ba4a712SPawel Jakub Dawidek
1281ba4a712SPawel Jakub Dawidekdisks_destroy
129