]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/zfs/zpool/create/option-f_replication_level_mismatch_1.t
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / zfs / zpool / create / option-f_replication_level_mismatch_1.t
1 #!/bin/sh
2 # $FreeBSD$
3
4 dir=`dirname $0`
5 . ${dir}/../../misc.sh
6
7 echo "1..180"
8
9 disks_create 9
10 names_create 1
11
12 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} mirror ${disk2} ${disk3} ${disk4}
13 expect_fl ${ZPOOL} status -x ${name0}
14 expect_fl ${ZPOOL} destroy ${name0}
15
16 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} mirror ${disk2} ${disk3} ${disk4}
17 expect_ok ${ZPOOL} status -x ${name0}
18 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
19 exp=`(
20   echo "  pool: ${name0}"
21   echo " state: ONLINE"
22   echo " scrub: none requested"
23   echo "config:"
24   echo "        NAME          STATE   READ WRITE CKSUM"
25   echo "        ${name0}      ONLINE     0     0     0"
26   echo "          mirror      ONLINE     0     0     0"
27   echo "            ${disk0}  ONLINE     0     0     0"
28   echo "            ${disk1}  ONLINE     0     0     0"
29   echo "          mirror      ONLINE     0     0     0"
30   echo "            ${disk2}  ONLINE     0     0     0"
31   echo "            ${disk3}  ONLINE     0     0     0"
32   echo "            ${disk4}  ONLINE     0     0     0"
33   echo "errors: No known data errors"
34 )`
35 expect "${exp}" ${ZPOOL} status ${name0}
36 expect_ok ${ZPOOL} destroy ${name0}
37 expect_fl ${ZPOOL} status -x ${name0}
38 expect_fl ${ZPOOL} destroy ${name0}
39
40 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} mirror ${disk3} ${disk4}
41 expect_fl ${ZPOOL} status -x ${name0}
42 expect_fl ${ZPOOL} destroy ${name0}
43
44 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} ${disk2} mirror ${disk3} ${disk4}
45 expect_ok ${ZPOOL} status -x ${name0}
46 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
47 exp=`(
48   echo "  pool: ${name0}"
49   echo " state: ONLINE"
50   echo " scrub: none requested"
51   echo "config:"
52   echo "        NAME          STATE   READ WRITE CKSUM"
53   echo "        ${name0}      ONLINE     0     0     0"
54   echo "          mirror      ONLINE     0     0     0"
55   echo "            ${disk0}  ONLINE     0     0     0"
56   echo "            ${disk1}  ONLINE     0     0     0"
57   echo "            ${disk2}  ONLINE     0     0     0"
58   echo "          mirror      ONLINE     0     0     0"
59   echo "            ${disk3}  ONLINE     0     0     0"
60   echo "            ${disk4}  ONLINE     0     0     0"
61   echo "errors: No known data errors"
62 )`
63 expect "${exp}" ${ZPOOL} status ${name0}
64 expect_ok ${ZPOOL} destroy ${name0}
65 expect_fl ${ZPOOL} status -x ${name0}
66 expect_fl ${ZPOOL} destroy ${name0}
67
68 expect_fl ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} raidz ${disk3} ${disk4} ${disk5} ${disk6}
69 expect_fl ${ZPOOL} status -x ${name0}
70 expect_fl ${ZPOOL} destroy ${name0}
71
72 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz ${disk0} ${disk1} ${disk2} raidz ${disk3} ${disk4} ${disk5} ${disk6}
73 expect_ok ${ZPOOL} status -x ${name0}
74 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
75 exp=`(
76   echo "  pool: ${name0}"
77   echo " state: ONLINE"
78   echo " scrub: none requested"
79   echo "config:"
80   echo "        NAME          STATE   READ WRITE CKSUM"
81   echo "        ${name0}      ONLINE     0     0     0"
82   echo "          raidz1      ONLINE     0     0     0"
83   echo "            ${disk0}  ONLINE     0     0     0"
84   echo "            ${disk1}  ONLINE     0     0     0"
85   echo "            ${disk2}  ONLINE     0     0     0"
86   echo "          raidz1      ONLINE     0     0     0"
87   echo "            ${disk3}  ONLINE     0     0     0"
88   echo "            ${disk4}  ONLINE     0     0     0"
89   echo "            ${disk5}  ONLINE     0     0     0"
90   echo "            ${disk6}  ONLINE     0     0     0"
91   echo "errors: No known data errors"
92 )`
93 expect "${exp}" ${ZPOOL} status ${name0}
94 expect_ok ${ZPOOL} destroy ${name0}
95 expect_fl ${ZPOOL} status -x ${name0}
96 expect_fl ${ZPOOL} destroy ${name0}
97
98 expect_fl ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} ${disk2} ${disk3} raidz ${disk4} ${disk5} ${disk6}
99 expect_fl ${ZPOOL} status -x ${name0}
100 expect_fl ${ZPOOL} destroy ${name0}
101
102 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz ${disk0} ${disk1} ${disk2} ${disk3} raidz ${disk4} ${disk5} ${disk6}
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 "            ${disk3}  ONLINE     0     0     0"
117   echo "          raidz1      ONLINE     0     0     0"
118   echo "            ${disk4}  ONLINE     0     0     0"
119   echo "            ${disk5}  ONLINE     0     0     0"
120   echo "            ${disk6}  ONLINE     0     0     0"
121   echo "errors: No known data errors"
122 )`
123 expect "${exp}" ${ZPOOL} status ${name0}
124 expect_ok ${ZPOOL} destroy ${name0}
125 expect_fl ${ZPOOL} status -x ${name0}
126 expect_fl ${ZPOOL} destroy ${name0}
127
128 expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} ${disk8}
129 expect_fl ${ZPOOL} status -x ${name0}
130 expect_fl ${ZPOOL} destroy ${name0}
131
132 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6} ${disk7} ${disk8}
133 expect_ok ${ZPOOL} status -x ${name0}
134 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
135 exp=`(
136   echo "  pool: ${name0}"
137   echo " state: ONLINE"
138   echo " scrub: none requested"
139   echo "config:"
140   echo "        NAME          STATE   READ WRITE CKSUM"
141   echo "        ${name0}      ONLINE     0     0     0"
142   echo "          raidz2      ONLINE     0     0     0"
143   echo "            ${disk0}  ONLINE     0     0     0"
144   echo "            ${disk1}  ONLINE     0     0     0"
145   echo "            ${disk2}  ONLINE     0     0     0"
146   echo "            ${disk3}  ONLINE     0     0     0"
147   echo "          raidz2      ONLINE     0     0     0"
148   echo "            ${disk4}  ONLINE     0     0     0"
149   echo "            ${disk5}  ONLINE     0     0     0"
150   echo "            ${disk6}  ONLINE     0     0     0"
151   echo "            ${disk7}  ONLINE     0     0     0"
152   echo "            ${disk8}  ONLINE     0     0     0"
153   echo "errors: No known data errors"
154 )`
155 expect "${exp}" ${ZPOOL} status ${name0}
156 expect_ok ${ZPOOL} destroy ${name0}
157 expect_fl ${ZPOOL} status -x ${name0}
158 expect_fl ${ZPOOL} destroy ${name0}
159
160 expect_fl ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4} raidz2 ${disk5} ${disk6} ${disk7} ${disk8}
161 expect_fl ${ZPOOL} status -x ${name0}
162 expect_fl ${ZPOOL} destroy ${name0}
163
164 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3} ${disk4} raidz2 ${disk5} ${disk6} ${disk7} ${disk8}
165 expect_ok ${ZPOOL} status -x ${name0}
166 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
167 exp=`(
168   echo "  pool: ${name0}"
169   echo " state: ONLINE"
170   echo " scrub: none requested"
171   echo "config:"
172   echo "        NAME          STATE   READ WRITE CKSUM"
173   echo "        ${name0}      ONLINE     0     0     0"
174   echo "          raidz2      ONLINE     0     0     0"
175   echo "            ${disk0}  ONLINE     0     0     0"
176   echo "            ${disk1}  ONLINE     0     0     0"
177   echo "            ${disk2}  ONLINE     0     0     0"
178   echo "            ${disk3}  ONLINE     0     0     0"
179   echo "            ${disk4}  ONLINE     0     0     0"
180   echo "          raidz2      ONLINE     0     0     0"
181   echo "            ${disk5}  ONLINE     0     0     0"
182   echo "            ${disk6}  ONLINE     0     0     0"
183   echo "            ${disk7}  ONLINE     0     0     0"
184   echo "            ${disk8}  ONLINE     0     0     0"
185   echo "errors: No known data errors"
186 )`
187 expect "${exp}" ${ZPOOL} status ${name0}
188 expect_ok ${ZPOOL} destroy ${name0}
189 expect_fl ${ZPOOL} status -x ${name0}
190 expect_fl ${ZPOOL} destroy ${name0}
191
192 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} raidz ${disk2} ${disk3}
193 expect_fl ${ZPOOL} status -x ${name0}
194 expect_fl ${ZPOOL} destroy ${name0}
195
196 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} raidz ${disk2} ${disk3}
197 expect_ok ${ZPOOL} status -x ${name0}
198 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
199 exp=`(
200   echo "  pool: ${name0}"
201   echo " state: ONLINE"
202   echo " scrub: none requested"
203   echo "config:"
204   echo "        NAME          STATE   READ WRITE CKSUM"
205   echo "        ${name0}      ONLINE     0     0     0"
206   echo "          mirror      ONLINE     0     0     0"
207   echo "            ${disk0}  ONLINE     0     0     0"
208   echo "            ${disk1}  ONLINE     0     0     0"
209   echo "          raidz1      ONLINE     0     0     0"
210   echo "            ${disk2}  ONLINE     0     0     0"
211   echo "            ${disk3}  ONLINE     0     0     0"
212   echo "errors: No known data errors"
213 )`
214 expect "${exp}" ${ZPOOL} status ${name0}
215 expect_ok ${ZPOOL} destroy ${name0}
216 expect_fl ${ZPOOL} status -x ${name0}
217 expect_fl ${ZPOOL} destroy ${name0}
218
219 expect_fl ${ZPOOL} create ${name0} raidz ${disk0} ${disk1} mirror ${disk2} ${disk3}
220 expect_fl ${ZPOOL} status -x ${name0}
221 expect_fl ${ZPOOL} destroy ${name0}
222
223 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz ${disk0} ${disk1} mirror ${disk2} ${disk3}
224 expect_ok ${ZPOOL} status -x ${name0}
225 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
226 exp=`(
227   echo "  pool: ${name0}"
228   echo " state: ONLINE"
229   echo " scrub: none requested"
230   echo "config:"
231   echo "        NAME          STATE   READ WRITE CKSUM"
232   echo "        ${name0}      ONLINE     0     0     0"
233   echo "          raidz1      ONLINE     0     0     0"
234   echo "            ${disk0}  ONLINE     0     0     0"
235   echo "            ${disk1}  ONLINE     0     0     0"
236   echo "          mirror      ONLINE     0     0     0"
237   echo "            ${disk2}  ONLINE     0     0     0"
238   echo "            ${disk3}  ONLINE     0     0     0"
239   echo "errors: No known data errors"
240 )`
241 expect "${exp}" ${ZPOOL} status ${name0}
242 expect_ok ${ZPOOL} destroy ${name0}
243 expect_fl ${ZPOOL} status -x ${name0}
244 expect_fl ${ZPOOL} destroy ${name0}
245
246 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} raidz ${disk3} ${disk4}
247 expect_fl ${ZPOOL} status -x ${name0}
248 expect_fl ${ZPOOL} destroy ${name0}
249
250 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} ${disk2} raidz ${disk3} ${disk4}
251 expect_ok ${ZPOOL} status -x ${name0}
252 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
253 exp=`(
254   echo "  pool: ${name0}"
255   echo " state: ONLINE"
256   echo " scrub: none requested"
257   echo "config:"
258   echo "        NAME          STATE   READ WRITE CKSUM"
259   echo "        ${name0}      ONLINE     0     0     0"
260   echo "          mirror      ONLINE     0     0     0"
261   echo "            ${disk0}  ONLINE     0     0     0"
262   echo "            ${disk1}  ONLINE     0     0     0"
263   echo "            ${disk2}  ONLINE     0     0     0"
264   echo "          raidz1      ONLINE     0     0     0"
265   echo "            ${disk3}  ONLINE     0     0     0"
266   echo "            ${disk4}  ONLINE     0     0     0"
267   echo "errors: No known data errors"
268 )`
269 expect "${exp}" ${ZPOOL} status ${name0}
270 expect_ok ${ZPOOL} destroy ${name0}
271 expect_fl ${ZPOOL} status -x ${name0}
272 expect_fl ${ZPOOL} destroy ${name0}
273
274 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} raidz ${disk2} ${disk3} ${disk4}
275 expect_fl ${ZPOOL} status -x ${name0}
276 expect_fl ${ZPOOL} destroy ${name0}
277
278 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} raidz ${disk2} ${disk3} ${disk4}
279 expect_ok ${ZPOOL} status -x ${name0}
280 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
281 exp=`(
282   echo "  pool: ${name0}"
283   echo " state: ONLINE"
284   echo " scrub: none requested"
285   echo "config:"
286   echo "        NAME          STATE   READ WRITE CKSUM"
287   echo "        ${name0}      ONLINE     0     0     0"
288   echo "          mirror      ONLINE     0     0     0"
289   echo "            ${disk0}  ONLINE     0     0     0"
290   echo "            ${disk1}  ONLINE     0     0     0"
291   echo "          raidz1      ONLINE     0     0     0"
292   echo "            ${disk2}  ONLINE     0     0     0"
293   echo "            ${disk3}  ONLINE     0     0     0"
294   echo "            ${disk4}  ONLINE     0     0     0"
295   echo "errors: No known data errors"
296 )`
297 expect "${exp}" ${ZPOOL} status ${name0}
298 expect_ok ${ZPOOL} destroy ${name0}
299 expect_fl ${ZPOOL} status -x ${name0}
300 expect_fl ${ZPOOL} destroy ${name0}
301
302 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} raidz2 ${disk2} ${disk3} ${disk4}
303 expect_fl ${ZPOOL} status -x ${name0}
304 expect_fl ${ZPOOL} destroy ${name0}
305
306 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} raidz2 ${disk2} ${disk3} ${disk4}
307 expect_ok ${ZPOOL} status -x ${name0}
308 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
309 exp=`(
310   echo "  pool: ${name0}"
311   echo " state: ONLINE"
312   echo " scrub: none requested"
313   echo "config:"
314   echo "        NAME          STATE   READ WRITE CKSUM"
315   echo "        ${name0}      ONLINE     0     0     0"
316   echo "          mirror      ONLINE     0     0     0"
317   echo "            ${disk0}  ONLINE     0     0     0"
318   echo "            ${disk1}  ONLINE     0     0     0"
319   echo "          raidz2      ONLINE     0     0     0"
320   echo "            ${disk2}  ONLINE     0     0     0"
321   echo "            ${disk3}  ONLINE     0     0     0"
322   echo "            ${disk4}  ONLINE     0     0     0"
323   echo "errors: No known data errors"
324 )`
325 expect "${exp}" ${ZPOOL} status ${name0}
326 expect_ok ${ZPOOL} destroy ${name0}
327 expect_fl ${ZPOOL} status -x ${name0}
328 expect_fl ${ZPOOL} destroy ${name0}
329
330 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} raidz2 ${disk3} ${disk4} ${disk5}
331 expect_fl ${ZPOOL} status -x ${name0}
332 expect_fl ${ZPOOL} destroy ${name0}
333
334 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} ${disk2} raidz2 ${disk3} ${disk4} ${disk5}
335 expect_ok ${ZPOOL} status -x ${name0}
336 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
337 exp=`(
338   echo "  pool: ${name0}"
339   echo " state: ONLINE"
340   echo " scrub: none requested"
341   echo "config:"
342   echo "        NAME          STATE   READ WRITE CKSUM"
343   echo "        ${name0}      ONLINE     0     0     0"
344   echo "          mirror      ONLINE     0     0     0"
345   echo "            ${disk0}  ONLINE     0     0     0"
346   echo "            ${disk1}  ONLINE     0     0     0"
347   echo "            ${disk2}  ONLINE     0     0     0"
348   echo "          raidz2      ONLINE     0     0     0"
349   echo "            ${disk3}  ONLINE     0     0     0"
350   echo "            ${disk4}  ONLINE     0     0     0"
351   echo "            ${disk5}  ONLINE     0     0     0"
352   echo "errors: No known data errors"
353 )`
354 expect "${exp}" ${ZPOOL} status ${name0}
355 expect_ok ${ZPOOL} destroy ${name0}
356 expect_fl ${ZPOOL} status -x ${name0}
357 expect_fl ${ZPOOL} destroy ${name0}
358
359 expect_fl ${ZPOOL} create ${name0} mirror ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6}
360 expect_fl ${ZPOOL} status -x ${name0}
361 expect_fl ${ZPOOL} destroy ${name0}
362
363 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} mirror ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6}
364 expect_ok ${ZPOOL} status -x ${name0}
365 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
366 exp=`(
367   echo "  pool: ${name0}"
368   echo " state: ONLINE"
369   echo " scrub: none requested"
370   echo "config:"
371   echo "        NAME          STATE   READ WRITE CKSUM"
372   echo "        ${name0}      ONLINE     0     0     0"
373   echo "          mirror      ONLINE     0     0     0"
374   echo "            ${disk0}  ONLINE     0     0     0"
375   echo "            ${disk1}  ONLINE     0     0     0"
376   echo "            ${disk2}  ONLINE     0     0     0"
377   echo "            ${disk3}  ONLINE     0     0     0"
378   echo "          raidz2      ONLINE     0     0     0"
379   echo "            ${disk4}  ONLINE     0     0     0"
380   echo "            ${disk5}  ONLINE     0     0     0"
381   echo "            ${disk6}  ONLINE     0     0     0"
382   echo "errors: No known data errors"
383 )`
384 expect "${exp}" ${ZPOOL} status ${name0}
385 expect_ok ${ZPOOL} destroy ${name0}
386 expect_fl ${ZPOOL} status -x ${name0}
387 expect_fl ${ZPOOL} destroy ${name0}
388
389 expect_fl ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} raidz2 ${disk2} ${disk3} ${disk4}
390 expect_fl ${ZPOOL} status -x ${name0}
391 expect_fl ${ZPOOL} destroy ${name0}
392
393 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${disk0} ${disk1} raidz2 ${disk2} ${disk3} ${disk4}
394 expect_ok ${ZPOOL} status -x ${name0}
395 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
396 exp=`(
397   echo "  pool: ${name0}"
398   echo " state: ONLINE"
399   echo " scrub: none requested"
400   echo "config:"
401   echo "        NAME          STATE   READ WRITE CKSUM"
402   echo "        ${name0}      ONLINE     0     0     0"
403   echo "          raidz1      ONLINE     0     0     0"
404   echo "            ${disk0}  ONLINE     0     0     0"
405   echo "            ${disk1}  ONLINE     0     0     0"
406   echo "          raidz2      ONLINE     0     0     0"
407   echo "            ${disk2}  ONLINE     0     0     0"
408   echo "            ${disk3}  ONLINE     0     0     0"
409   echo "            ${disk4}  ONLINE     0     0     0"
410   echo "errors: No known data errors"
411 )`
412 expect "${exp}" ${ZPOOL} status ${name0}
413 expect_ok ${ZPOOL} destroy ${name0}
414 expect_fl ${ZPOOL} status -x ${name0}
415 expect_fl ${ZPOOL} destroy ${name0}
416
417 expect_fl ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${dik2} raidz2 ${disk3} ${disk4} ${disk5}
418 expect_fl ${ZPOOL} status -x ${name0}
419 expect_fl ${ZPOOL} destroy ${name0}
420
421 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${disk0} ${disk1} ${disk2} raidz2 ${disk3} ${disk4} ${disk5}
422 expect_ok ${ZPOOL} status -x ${name0}
423 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
424 exp=`(
425   echo "  pool: ${name0}"
426   echo " state: ONLINE"
427   echo " scrub: none requested"
428   echo "config:"
429   echo "        NAME          STATE   READ WRITE CKSUM"
430   echo "        ${name0}      ONLINE     0     0     0"
431   echo "          raidz1      ONLINE     0     0     0"
432   echo "            ${disk0}  ONLINE     0     0     0"
433   echo "            ${disk1}  ONLINE     0     0     0"
434   echo "            ${disk2}  ONLINE     0     0     0"
435   echo "          raidz2      ONLINE     0     0     0"
436   echo "            ${disk3}  ONLINE     0     0     0"
437   echo "            ${disk4}  ONLINE     0     0     0"
438   echo "            ${disk5}  ONLINE     0     0     0"
439   echo "errors: No known data errors"
440 )`
441 expect "${exp}" ${ZPOOL} status ${name0}
442 expect_ok ${ZPOOL} destroy ${name0}
443 expect_fl ${ZPOOL} status -x ${name0}
444 expect_fl ${ZPOOL} destroy ${name0}
445
446 expect_fl ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${dik2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6}
447 expect_fl ${ZPOOL} status -x ${name0}
448 expect_fl ${ZPOOL} destroy ${name0}
449
450 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} raidz1 ${disk0} ${disk1} ${disk2} ${disk3} raidz2 ${disk4} ${disk5} ${disk6}
451 expect_ok ${ZPOOL} status -x ${name0}
452 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
453 exp=`(
454   echo "  pool: ${name0}"
455   echo " state: ONLINE"
456   echo " scrub: none requested"
457   echo "config:"
458   echo "        NAME          STATE   READ WRITE CKSUM"
459   echo "        ${name0}      ONLINE     0     0     0"
460   echo "          raidz1      ONLINE     0     0     0"
461   echo "            ${disk0}  ONLINE     0     0     0"
462   echo "            ${disk1}  ONLINE     0     0     0"
463   echo "            ${disk2}  ONLINE     0     0     0"
464   echo "            ${disk3}  ONLINE     0     0     0"
465   echo "          raidz2      ONLINE     0     0     0"
466   echo "            ${disk4}  ONLINE     0     0     0"
467   echo "            ${disk5}  ONLINE     0     0     0"
468   echo "            ${disk6}  ONLINE     0     0     0"
469   echo "errors: No known data errors"
470 )`
471 expect "${exp}" ${ZPOOL} status ${name0}
472 expect_ok ${ZPOOL} destroy ${name0}
473 expect_fl ${ZPOOL} status -x ${name0}
474 expect_fl ${ZPOOL} destroy ${name0}
475
476 add_msg="# TODO Sun CR 6726091, Lustre bug 16873"
477 expect_fl ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} mirror ${disk3} ${disk4} ${disk5}
478 expect_fl ${ZPOOL} status -x ${name0}
479 expect_fl ${ZPOOL} destroy ${name0}
480 add_msg=""
481
482 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} log mirror ${disk1} ${disk2} mirror ${disk3} ${disk4} ${disk5}
483 expect_ok ${ZPOOL} status -x ${name0}
484 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
485 exp=`(
486   echo "  pool: ${name0}"
487   echo " state: ONLINE"
488   echo " scrub: none requested"
489   echo "config:"
490   echo "        NAME          STATE   READ WRITE CKSUM"
491   echo "        ${name0}      ONLINE     0     0     0"
492   echo "          ${disk0}    ONLINE     0     0     0"
493   echo "        logs          ONLINE     0     0     0"
494   echo "          mirror      ONLINE     0     0     0"
495   echo "            ${disk1}  ONLINE     0     0     0"
496   echo "            ${disk2}  ONLINE     0     0     0"
497   echo "          mirror      ONLINE     0     0     0"
498   echo "            ${disk3}  ONLINE     0     0     0"
499   echo "            ${disk4}  ONLINE     0     0     0"
500   echo "            ${disk5}  ONLINE     0     0     0"
501   echo "errors: No known data errors"
502 )`
503 expect "${exp}" ${ZPOOL} status ${name0}
504 expect_ok ${ZPOOL} destroy ${name0}
505 expect_fl ${ZPOOL} status -x ${name0}
506 expect_fl ${ZPOOL} destroy ${name0}
507
508 add_msg="# TODO Sun CR 6726091, Lustre bug 16873"
509 expect_fl ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2} ${disk3} mirror ${disk4} ${disk5}
510 expect_fl ${ZPOOL} status -x ${name0}
511 expect_fl ${ZPOOL} destroy ${name0}
512 add_msg=""
513
514 expect_ok ${ZPOOL} create ${zpool_f_flag} ${name0} ${disk0} log mirror ${disk1} ${disk2} ${disk3} mirror ${disk4} ${disk5}
515 expect_ok ${ZPOOL} status -x ${name0}
516 expect "pool '${name0}' is healthy" ${ZPOOL} status -x ${name0}
517 exp=`(
518   echo "  pool: ${name0}"
519   echo " state: ONLINE"
520   echo " scrub: none requested"
521   echo "config:"
522   echo "        NAME          STATE   READ WRITE CKSUM"
523   echo "        ${name0}      ONLINE     0     0     0"
524   echo "          ${disk0}    ONLINE     0     0     0"
525   echo "        logs          ONLINE     0     0     0"
526   echo "          mirror      ONLINE     0     0     0"
527   echo "            ${disk1}  ONLINE     0     0     0"
528   echo "            ${disk2}  ONLINE     0     0     0"
529   echo "            ${disk3}  ONLINE     0     0     0"
530   echo "          mirror      ONLINE     0     0     0"
531   echo "            ${disk4}  ONLINE     0     0     0"
532   echo "            ${disk5}  ONLINE     0     0     0"
533   echo "errors: No known data errors"
534 )`
535 expect "${exp}" ${ZPOOL} status ${name0}
536 expect_ok ${ZPOOL} destroy ${name0}
537 expect_fl ${ZPOOL} status -x ${name0}
538 expect_fl ${ZPOOL} destroy ${name0}
539
540 disks_destroy