xref: /freebsd/tools/regression/zfs/zpool/create/raidz1.t (revision a90b9d0159070121c221b966469c3e36d912bf82)
1#!/bin/sh
2
3dir=`dirname $0`
4. ${dir}/../../misc.sh
5
6echo "1..37"
7
8disks_create 9
9names_create 1
10
11expect_fl ${ZPOOL} create ${name0} raidz ${disk0}
12expect_fl ${ZPOOL} create ${name0} raidz1 ${disk0}
13
14expect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1}
15expect_ok ${ZPOOL} status -x ${name0}
16expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
17exp=`(
18  echo "  pool: ${name0}"
19  echo " state: ONLINE"
20  echo " scrub: none requested"
21  echo "config:"
22  echo "	NAME          STATE   READ WRITE CKSUM"
23  echo "	${name0}      ONLINE     0     0     0"
24  echo "	  raidz1      ONLINE     0     0     0"
25  echo "	    ${disk0}  ONLINE     0     0     0"
26  echo "	    ${disk1}  ONLINE     0     0     0"
27  echo "errors: No known data errors"
28)`
29expect "${exp}" ${ZPOOL} status ${name0}
30expect_ok ${ZPOOL} destroy ${name0}
31expect_fl ${ZPOOL} status -x ${name0}
32expect_fl ${ZPOOL} destroy ${name0}
33
34expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1}
35expect_ok ${ZPOOL} status -x ${name0}
36expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
37exp=`(
38  echo "  pool: ${name0}"
39  echo " state: ONLINE"
40  echo " scrub: none requested"
41  echo "config:"
42  echo "	NAME          STATE   READ WRITE CKSUM"
43  echo "	${name0}      ONLINE     0     0     0"
44  echo "	  raidz1      ONLINE     0     0     0"
45  echo "	    ${disk0}  ONLINE     0     0     0"
46  echo "	    ${disk1}  ONLINE     0     0     0"
47  echo "errors: No known data errors"
48)`
49expect "${exp}" ${ZPOOL} status ${name0}
50expect_ok ${ZPOOL} destroy ${name0}
51expect_fl ${ZPOOL} status -x ${name0}
52expect_fl ${ZPOOL} destroy ${name0}
53
54expect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} ${disk3}
55expect_ok ${ZPOOL} status -x ${name0}
56expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
57exp=`(
58  echo "  pool: ${name0}"
59  echo " state: ONLINE"
60  echo " scrub: none requested"
61  echo "config:"
62  echo "	NAME          STATE   READ WRITE CKSUM"
63  echo "	${name0}      ONLINE     0     0     0"
64  echo "	  raidz1      ONLINE     0     0     0"
65  echo "	    ${disk0}  ONLINE     0     0     0"
66  echo "	    ${disk1}  ONLINE     0     0     0"
67  echo "	    ${disk2}  ONLINE     0     0     0"
68  echo "	    ${disk3}  ONLINE     0     0     0"
69  echo "errors: No known data errors"
70)`
71expect "${exp}" ${ZPOOL} status ${name0}
72expect_ok ${ZPOOL} destroy ${name0}
73expect_fl ${ZPOOL} status -x ${name0}
74expect_fl ${ZPOOL} destroy ${name0}
75
76expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4}
77expect_ok ${ZPOOL} status -x ${name0}
78expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
79exp=`(
80  echo "  pool: ${name0}"
81  echo " state: ONLINE"
82  echo " scrub: none requested"
83  echo "config:"
84  echo "	NAME          STATE   READ WRITE CKSUM"
85  echo "	${name0}      ONLINE     0     0     0"
86  echo "	  raidz1      ONLINE     0     0     0"
87  echo "	    ${disk0}  ONLINE     0     0     0"
88  echo "	    ${disk1}  ONLINE     0     0     0"
89  echo "	    ${disk2}  ONLINE     0     0     0"
90  echo "	    ${disk3}  ONLINE     0     0     0"
91  echo "	    ${disk4}  ONLINE     0     0     0"
92  echo "errors: No known data errors"
93)`
94expect "${exp}" ${ZPOOL} status ${name0}
95expect_ok ${ZPOOL} destroy ${name0}
96expect_fl ${ZPOOL} status -x ${name0}
97expect_fl ${ZPOOL} destroy ${name0}
98
99expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} raidz ${disk3} ${disk4} ${disk5} raidz1 ${disk6} ${disk7} ${disk8}
100expect_ok ${ZPOOL} status -x ${name0}
101expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
102exp=`(
103  echo "  pool: ${name0}"
104  echo " state: ONLINE"
105  echo " scrub: none requested"
106  echo "config:"
107  echo "	NAME          STATE   READ WRITE CKSUM"
108  echo "	${name0}      ONLINE     0     0     0"
109  echo "	  raidz1      ONLINE     0     0     0"
110  echo "	    ${disk0}  ONLINE     0     0     0"
111  echo "	    ${disk1}  ONLINE     0     0     0"
112  echo "	    ${disk2}  ONLINE     0     0     0"
113  echo "	  raidz1      ONLINE     0     0     0"
114  echo "	    ${disk3}  ONLINE     0     0     0"
115  echo "	    ${disk4}  ONLINE     0     0     0"
116  echo "	    ${disk5}  ONLINE     0     0     0"
117  echo "	  raidz1      ONLINE     0     0     0"
118  echo "	    ${disk6}  ONLINE     0     0     0"
119  echo "	    ${disk7}  ONLINE     0     0     0"
120  echo "	    ${disk8}  ONLINE     0     0     0"
121  echo "errors: No known data errors"
122)`
123expect "${exp}" ${ZPOOL} status ${name0}
124expect_ok ${ZPOOL} destroy ${name0}
125expect_fl ${ZPOOL} status -x ${name0}
126expect_fl ${ZPOOL} destroy ${name0}
127
128disks_destroy
129