]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/zfs/zpool/create/log.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / zfs / zpool / create / log.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 dir=`dirname $0`
5 . ${dir}/../../misc.sh
6
7 echo "1..56"
8
9 disks_create 7
10 names_create 1
11
12 expect_ok ${ZPOOL} create ${name0} ${disk0} log ${disk1}
13 expect_ok ${ZPOOL} status -x ${name0}
14 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
15 exp=`(
16   echo "  pool: ${name0}"
17   echo " state: ONLINE"
18   echo " scrub: none requested"
19   echo "config:"
20   echo "        NAME        STATE   READ WRITE CKSUM"
21   echo "        ${name0}    ONLINE     0     0     0"
22   echo "          ${disk0}  ONLINE     0     0     0"
23   echo "        logs        ONLINE     0     0     0"
24   echo "          ${disk1}  ONLINE     0     0     0"
25   echo "errors: No known data errors"
26 )`
27 expect "${exp}" ${ZPOOL} status ${name0}
28 expect_ok ${ZPOOL} destroy ${name0}
29 expect_fl ${ZPOOL} status -x ${name0}
30 expect_fl ${ZPOOL} destroy ${name0}
31
32 expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} ${disk3}
33 expect_ok ${ZPOOL} status -x ${name0}
34 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
35 exp=`(
36   echo "  pool: ${name0}"
37   echo " state: ONLINE"
38   echo " scrub: none requested"
39   echo "config:"
40   echo "        NAME          STATE   READ WRITE CKSUM"
41   echo "        ${name0}      ONLINE     0     0     0"
42   echo "          ${disk0}    ONLINE     0     0     0"
43   echo "        logs          ONLINE     0     0     0"
44   echo "          mirror      ONLINE     0     0     0"
45   echo "            ${disk1}  ONLINE     0     0     0"
46   echo "            ${disk2}  ONLINE     0     0     0"
47   echo "            ${disk3}  ONLINE     0     0     0"
48   echo "errors: No known data errors"
49 )`
50 expect "${exp}" ${ZPOOL} status ${name0}
51 expect_ok ${ZPOOL} destroy ${name0}
52 expect_fl ${ZPOOL} status -x ${name0}
53 expect_fl ${ZPOOL} destroy ${name0}
54
55 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} log ${disk2}
56 expect_ok ${ZPOOL} status -x ${name0}
57 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
58 exp=`(
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 "          mirror      ONLINE     0     0     0"
66   echo "            ${disk0}  ONLINE     0     0     0"
67   echo "            ${disk1}  ONLINE     0     0     0"
68   echo "        logs          ONLINE     0     0     0"
69   echo "          ${disk2}    ONLINE     0     0     0"
70   echo "errors: No known data errors"
71 )`
72 expect "${exp}" ${ZPOOL} status ${name0}
73 expect_ok ${ZPOOL} destroy ${name0}
74 expect_fl ${ZPOOL} status -x ${name0}
75 expect_fl ${ZPOOL} destroy ${name0}
76
77 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} log mirror ${disk2} ${disk3} ${disk4}
78 expect_ok ${ZPOOL} status -x ${name0}
79 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
80 exp=`(
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 "          mirror      ONLINE     0     0     0"
88   echo "            ${disk0}  ONLINE     0     0     0"
89   echo "            ${disk1}  ONLINE     0     0     0"
90   echo "        logs          ONLINE     0     0     0"
91   echo "          mirror      ONLINE     0     0     0"
92   echo "            ${disk2}  ONLINE     0     0     0"
93   echo "            ${disk3}  ONLINE     0     0     0"
94   echo "            ${disk4}  ONLINE     0     0     0"
95   echo "errors: No known data errors"
96 )`
97 expect "${exp}" ${ZPOOL} status ${name0}
98 expect_ok ${ZPOOL} destroy ${name0}
99 expect_fl ${ZPOOL} status -x ${name0}
100 expect_fl ${ZPOOL} destroy ${name0}
101
102 expect_ok ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} log ${disk3}
103 expect_ok ${ZPOOL} status -x ${name0}
104 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
105 exp=`(
106   echo "  pool: ${name0}"
107   echo " state: ONLINE"
108   echo " scrub: none requested"
109   echo "config:"
110   echo "        NAME          STATE   READ WRITE CKSUM"
111   echo "        ${name0}      ONLINE     0     0     0"
112   echo "          raidz1      ONLINE     0     0     0"
113   echo "            ${disk0}  ONLINE     0     0     0"
114   echo "            ${disk1}  ONLINE     0     0     0"
115   echo "            ${disk2}  ONLINE     0     0     0"
116   echo "        logs          ONLINE     0     0     0"
117   echo "          ${disk3}    ONLINE     0     0     0"
118   echo "errors: No known data errors"
119 )`
120 expect "${exp}" ${ZPOOL} status ${name0}
121 expect_ok ${ZPOOL} destroy ${name0}
122 expect_fl ${ZPOOL} status -x ${name0}
123 expect_fl ${ZPOOL} destroy ${name0}
124
125 expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2} log mirror ${disk3} ${disk4} ${disk5}
126 expect_ok ${ZPOOL} status -x ${name0}
127 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
128 exp=`(
129   echo "  pool: ${name0}"
130   echo " state: ONLINE"
131   echo " scrub: none requested"
132   echo "config:"
133   echo "        NAME          STATE   READ WRITE CKSUM"
134   echo "        ${name0}      ONLINE     0     0     0"
135   echo "          raidz1      ONLINE     0     0     0"
136   echo "            ${disk0}  ONLINE     0     0     0"
137   echo "            ${disk1}  ONLINE     0     0     0"
138   echo "            ${disk2}  ONLINE     0     0     0"
139   echo "        logs          ONLINE     0     0     0"
140   echo "          mirror      ONLINE     0     0     0"
141   echo "            ${disk3}  ONLINE     0     0     0"
142   echo "            ${disk4}  ONLINE     0     0     0"
143   echo "            ${disk5}  ONLINE     0     0     0"
144   echo "errors: No known data errors"
145 )`
146 expect "${exp}" ${ZPOOL} status ${name0}
147 expect_ok ${ZPOOL} destroy ${name0}
148 expect_fl ${ZPOOL} status -x ${name0}
149 expect_fl ${ZPOOL} destroy ${name0}
150
151 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} log ${disk4}
152 expect_ok ${ZPOOL} status -x ${name0}
153 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
154 exp=`(
155   echo "  pool: ${name0}"
156   echo " state: ONLINE"
157   echo " scrub: none requested"
158   echo "config:"
159   echo "        NAME          STATE   READ WRITE CKSUM"
160   echo "        ${name0}      ONLINE     0     0     0"
161   echo "          raidz2      ONLINE     0     0     0"
162   echo "            ${disk0}  ONLINE     0     0     0"
163   echo "            ${disk1}  ONLINE     0     0     0"
164   echo "            ${disk2}  ONLINE     0     0     0"
165   echo "            ${disk3}  ONLINE     0     0     0"
166   echo "        logs          ONLINE     0     0     0"
167   echo "          ${disk4}    ONLINE     0     0     0"
168   echo "errors: No known data errors"
169 )`
170 expect "${exp}" ${ZPOOL} status ${name0}
171 expect_ok ${ZPOOL} destroy ${name0}
172 expect_fl ${ZPOOL} status -x ${name0}
173 expect_fl ${ZPOOL} destroy ${name0}
174
175 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} log mirror ${disk4} ${disk5} ${disk6}
176 expect_ok ${ZPOOL} status -x ${name0}
177 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
178 exp=`(
179   echo "  pool: ${name0}"
180   echo " state: ONLINE"
181   echo " scrub: none requested"
182   echo "config:"
183   echo "        NAME          STATE   READ WRITE CKSUM"
184   echo "        ${name0}      ONLINE     0     0     0"
185   echo "          raidz2      ONLINE     0     0     0"
186   echo "            ${disk0}  ONLINE     0     0     0"
187   echo "            ${disk1}  ONLINE     0     0     0"
188   echo "            ${disk2}  ONLINE     0     0     0"
189   echo "            ${disk3}  ONLINE     0     0     0"
190   echo "        logs          ONLINE     0     0     0"
191   echo "          mirror      ONLINE     0     0     0"
192   echo "            ${disk4}  ONLINE     0     0     0"
193   echo "            ${disk5}  ONLINE     0     0     0"
194   echo "            ${disk6}  ONLINE     0     0     0"
195   echo "errors: No known data errors"
196 )`
197 expect "${exp}" ${ZPOOL} status ${name0}
198 expect_ok ${ZPOOL} destroy ${name0}
199 expect_fl ${ZPOOL} status -x ${name0}
200 expect_fl ${ZPOOL} destroy ${name0}
201
202 disks_destroy