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