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