12 expect_ok ${ZPOOL} create ${name0} ${disk0}
13 expect_ok ${ZPOOL} export ${name0}
15 echo "invalid vdev specification"
16 echo "use '-f' to override the following errors:"
17 echo "${fdisk0} is part of exported pool '${name0}'"
19 expect "${exp}" ${ZPOOL} create ${name1} ${disk0}
20 expect_fl ${ZPOOL} status -x ${name1}
21 expect_ok ${ZPOOL} create -f ${name1} ${disk0}
22 expect_ok ${ZPOOL} status -x ${name1}
23 expect_ok ${ZPOOL} destroy ${name1}
25 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1}
26 expect_ok ${ZPOOL} export ${name0}
28 echo "invalid vdev specification"
29 echo "use '-f' to override the following errors:"
30 echo "${fdisk0} is part of exported pool '${name0}'"
32 expect "${exp}" ${ZPOOL} create ${name1} mirror ${disk0} ${disk1}
33 expect_fl ${ZPOOL} status -x ${name1}
34 expect_ok ${ZPOOL} create -f ${name1} mirror ${disk0} ${disk1}
35 expect_ok ${ZPOOL} status -x ${name1}
36 expect_ok ${ZPOOL} destroy ${name1}
38 expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2}
39 expect_ok ${ZPOOL} export ${name0}
41 echo "invalid vdev specification"
42 echo "use '-f' to override the following errors:"
43 echo "${fdisk0} is part of exported pool '${name0}'"
45 expect "${exp}" ${ZPOOL} create ${name1} raidz1 ${disk0} ${disk1} ${disk2}
46 expect_fl ${ZPOOL} status -x ${name1}
47 expect_ok ${ZPOOL} create -f ${name1} raidz1 ${disk0} ${disk1} ${disk2}
48 expect_ok ${ZPOOL} status -x ${name1}
49 expect_ok ${ZPOOL} destroy ${name1}
51 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3}
52 expect_ok ${ZPOOL} export ${name0}
54 echo "invalid vdev specification"
55 echo "use '-f' to override the following errors:"
56 echo "${fdisk0} is part of exported pool '${name0}'"
58 expect "${exp}" ${ZPOOL} create ${name1} raidz2 ${disk0} ${disk1} ${disk2} ${disk3}
59 expect_fl ${ZPOOL} status -x ${name1}
60 expect_ok ${ZPOOL} create -f ${name1} raidz2 ${disk0} ${disk1} ${disk2} ${disk3}
61 expect_ok ${ZPOOL} status -x ${name1}
62 expect_ok ${ZPOOL} destroy ${name1}
64 expect_ok ${ZPOOL} create ${name0} ${disk0} log ${disk1}
65 expect_ok ${ZPOOL} export ${name0}
67 echo "invalid vdev specification"
68 echo "use '-f' to override the following errors:"
69 echo "${fdisk0} is part of exported pool '${name0}'"
71 expect "${exp}" ${ZPOOL} create ${name1} ${disk0} log ${disk1}
72 expect_fl ${ZPOOL} status -x ${name1}
73 expect_ok ${ZPOOL} create -f ${name1} ${disk0} log ${disk1}
74 expect_ok ${ZPOOL} status -x ${name1}
75 expect_ok ${ZPOOL} destroy ${name1}
77 expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2}
78 expect_ok ${ZPOOL} export ${name0}
80 echo "invalid vdev specification"
81 echo "use '-f' to override the following errors:"
82 echo "${fdisk0} is part of exported pool '${name0}'"
84 expect "${exp}" ${ZPOOL} create ${name1} ${disk0} log mirror ${disk1} ${disk2}
85 expect_fl ${ZPOOL} status -x ${name1}
86 expect_ok ${ZPOOL} create -f ${name1} ${disk0} log mirror ${disk1} ${disk2}
87 expect_ok ${ZPOOL} status -x ${name1}
88 expect_ok ${ZPOOL} destroy ${name1}
90 expect_ok ${ZPOOL} create ${name0} ${disk0} cache ${disk1}
91 expect_ok ${ZPOOL} export ${name0}
93 echo "invalid vdev specification"
94 echo "use '-f' to override the following errors:"
95 echo "${fdisk0} is part of exported pool '${name0}'"
97 expect "${exp}" ${ZPOOL} create ${name1} ${disk0} cache ${disk1}
98 expect_fl ${ZPOOL} status -x ${name1}
99 expect_ok ${ZPOOL} create -f ${name1} ${disk0} cache ${disk1}
100 expect_ok ${ZPOOL} status -x ${name1}
101 expect_ok ${ZPOOL} destroy ${name1}
103 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1}
104 expect_ok ${ZPOOL} offline ${name0} ${disk1}
105 expect_ok ${ZPOOL} export ${name0}
107 echo "invalid vdev specification"
108 echo "use '-f' to override the following errors:"
109 echo "${fdisk1} is part of potentially active pool '${name0}'"
111 expect "${exp}" ${ZPOOL} create ${name1} mirror ${disk1} ${disk2}
112 expect_fl ${ZPOOL} status -x ${name1}
113 expect_ok ${ZPOOL} create -f ${name1} mirror ${disk1} ${disk2}
114 expect_ok ${ZPOOL} status -x ${name1}
115 expect_ok ${ZPOOL} destroy ${name1}
116 expect_ok ${ZPOOL} import ${name0}
117 expect_ok ${ZPOOL} destroy ${name0}
119 expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2}
120 expect_ok ${ZPOOL} offline ${name0} ${disk2}
121 expect_ok ${ZPOOL} export ${name0}
123 echo "invalid vdev specification"
124 echo "use '-f' to override the following errors:"
125 echo "${fdisk2} is part of potentially active pool '${name0}'"
127 expect "${exp}" ${ZPOOL} create ${name1} raidz1 ${disk2} ${disk3} ${disk4}
128 expect_fl ${ZPOOL} status -x ${name1}
129 expect_ok ${ZPOOL} create -f ${name1} raidz1 ${disk2} ${disk3} ${disk4}
130 expect_ok ${ZPOOL} status -x ${name1}
131 expect_ok ${ZPOOL} destroy ${name1}
132 expect_ok ${ZPOOL} import ${name0}
133 expect_ok ${ZPOOL} destroy ${name0}
135 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3}
136 expect_ok ${ZPOOL} offline ${name0} ${disk3}
137 expect_ok ${ZPOOL} export ${name0}
139 echo "invalid vdev specification"
140 echo "use '-f' to override the following errors:"
141 echo "${fdisk3} is part of potentially active pool '${name0}'"
143 expect "${exp}" ${ZPOOL} create ${name1} raidz2 ${disk3} ${disk4} ${disk5} ${disk6}
144 expect_fl ${ZPOOL} status -x ${name1}
145 expect_ok ${ZPOOL} create -f ${name1} raidz2 ${disk3} ${disk4} ${disk5} ${disk6}
146 expect_ok ${ZPOOL} status -x ${name1}
147 expect_ok ${ZPOOL} destroy ${name1}
148 expect_ok ${ZPOOL} import ${name0}
149 expect_ok ${ZPOOL} destroy ${name0}
151 expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2}
152 expect_ok ${ZPOOL} offline ${name0} ${disk2}
153 expect_ok ${ZPOOL} export ${name0}
155 echo "invalid vdev specification"
156 echo "use '-f' to override the following errors:"
157 echo "${fdisk2} is part of potentially active pool '${name0}'"
159 expect "${exp}" ${ZPOOL} create ${name1} ${disk3} log mirror ${disk2} ${disk4}
160 expect_fl ${ZPOOL} status -x ${name1}
161 expect_ok ${ZPOOL} create -f ${name1} ${disk3} log mirror ${disk2} ${disk4}
162 expect_ok ${ZPOOL} status -x ${name1}
163 expect_ok ${ZPOOL} destroy ${name1}
164 expect_ok ${ZPOOL} import ${name0}
165 expect_ok ${ZPOOL} destroy ${name0}
167 expect_ok ${ZPOOL} create ${name0} ${disk0} cache ${disk1}
168 expect_ok ${ZPOOL} offline ${name0} ${disk1}
169 expect_ok ${ZPOOL} export ${name0}
171 echo "invalid vdev specification"
172 echo "use '-f' to override the following errors:"
173 echo "${fdisk1} is part of potentially active pool '${name0}'"
175 add_msg="# TODO It shouldn't be possible to use offlined cache vdev."
176 expect "${exp}" ${ZPOOL} create ${name1} ${disk2} cache ${disk1}
177 expect_fl ${ZPOOL} status -x ${name1}
178 expect_ok ${ZPOOL} create -f ${name1} ${disk2} cache ${disk1}
180 expect_ok ${ZPOOL} status -x ${name1}
181 expect_ok ${ZPOOL} destroy ${name1}
182 expect_ok ${ZPOOL} import ${name0}
183 expect_ok ${ZPOOL} destroy ${name0}
185 expect_ok ${ZPOOL} create ${name0} mirror ${disk0} ${disk1}
186 expect_ok ${ZPOOL} offline ${name0} ${disk1}
188 echo "invalid vdev specification"
189 echo "use '-f' to override the following errors:"
190 echo "${fdisk1} is part of active pool '${name0}'"
192 expect "${exp}" ${ZPOOL} create ${name1} mirror ${disk1} ${disk2}
193 expect_fl ${ZPOOL} status -x ${name1}
195 echo "invalid vdev specification"
196 echo "the following errors must be manually repaired:"
197 echo "${fdisk1} is part of active pool '${name0}'"
199 expect "${exp}" ${ZPOOL} create -f ${name1} mirror ${disk1} ${disk2}
200 expect_fl ${ZPOOL} status -x ${name1}
201 expect_ok ${ZPOOL} online ${name0} ${disk1}
202 expect_ok ${ZPOOL} destroy ${name0}
204 expect_ok ${ZPOOL} create ${name0} raidz1 ${disk0} ${disk1} ${disk2}
205 expect_ok ${ZPOOL} offline ${name0} ${disk2}
207 echo "invalid vdev specification"
208 echo "use '-f' to override the following errors:"
209 echo "${fdisk2} is part of active pool '${name0}'"
211 expect "${exp}" ${ZPOOL} create ${name1} raidz1 ${disk2} ${disk3} ${disk4}
212 expect_fl ${ZPOOL} status -x ${name1}
214 echo "invalid vdev specification"
215 echo "the following errors must be manually repaired:"
216 echo "${fdisk2} is part of active pool '${name0}'"
218 expect "${exp}" ${ZPOOL} create -f ${name1} raidz1 ${disk2} ${disk3} ${disk4}
219 expect_fl ${ZPOOL} status -x ${name1}
220 expect_ok ${ZPOOL} online ${name0} ${disk2}
221 expect_ok ${ZPOOL} destroy ${name0}
223 expect_ok ${ZPOOL} create ${name0} raidz2 ${disk0} ${disk1} ${disk2} ${disk3}
224 expect_ok ${ZPOOL} offline ${name0} ${disk3}
226 echo "invalid vdev specification"
227 echo "use '-f' to override the following errors:"
228 echo "${fdisk3} is part of active pool '${name0}'"
230 expect "${exp}" ${ZPOOL} create ${name1} raidz2 ${disk3} ${disk4} ${disk5} ${disk6}
231 expect_fl ${ZPOOL} status -x ${name1}
233 echo "invalid vdev specification"
234 echo "the following errors must be manually repaired:"
235 echo "${fdisk3} is part of active pool '${name0}'"
237 expect "${exp}" ${ZPOOL} create -f ${name1} raidz2 ${disk3} ${disk4} ${disk5} ${disk6}
238 expect_fl ${ZPOOL} status -x ${name1}
239 expect_ok ${ZPOOL} online ${name0} ${disk3}
240 expect_ok ${ZPOOL} destroy ${name0}
242 expect_ok ${ZPOOL} create ${name0} ${disk0} log mirror ${disk1} ${disk2}
243 expect_ok ${ZPOOL} offline ${name0} ${disk2}
245 echo "invalid vdev specification"
246 echo "use '-f' to override the following errors:"
247 echo "${fdisk2} is part of active pool '${name0}'"
249 expect "${exp}" ${ZPOOL} create ${name1} ${disk3} log mirror ${disk2} ${disk4}
250 expect_fl ${ZPOOL} status -x ${name1}
252 echo "invalid vdev specification"
253 echo "the following errors must be manually repaired:"
254 echo "${fdisk2} is part of active pool '${name0}'"
256 expect "${exp}" ${ZPOOL} create -f ${name1} ${disk3} log mirror ${disk2} ${disk4}
257 expect_fl ${ZPOOL} status -x ${name1}
258 expect_ok ${ZPOOL} online ${name0} ${disk2}
259 expect_ok ${ZPOOL} destroy ${name0}
261 expect_ok ${ZPOOL} create ${name0} ${disk0} cache ${disk1}
262 expect_ok ${ZPOOL} offline ${name0} ${disk1}
264 echo "invalid vdev specification"
265 echo "use '-f' to override the following errors:"
266 echo "${fdisk1} is part of active pool '${name0}'"
268 add_msg="# TODO It reports that ${fdisk1} is part of unknown pool."
269 expect "${exp}" ${ZPOOL} create ${name1} ${disk2} cache ${disk1}
271 expect_fl ${ZPOOL} status -x ${name1}
273 echo "invalid vdev specification"
274 echo "the following errors must be manually repaired:"
275 echo "${fdisk1} is part of active pool '${name0}'"
277 add_msg="# TODO It reports that ${fdisk1} is used twice."
278 expect "${exp}" ${ZPOOL} create -f ${name1} ${disk2} cache ${disk1}
280 expect_fl ${ZPOOL} status -x ${name1}
281 expect_ok ${ZPOOL} online ${name0} ${disk1}
282 expect_ok ${ZPOOL} destroy ${name0}
284 expect_ok ${ZPOOL} create ${name0} ${disk0}
285 expect_ok ${ZPOOL} export ${name0}
287 echo "invalid vdev specification"
288 echo "use '-f' to override the following errors:"
289 echo "${fdisk0} is part of exported pool '${name0}'"
291 expect "${exp}" ${ZPOOL} create ${name0} ${disk0}
292 expect_fl ${ZPOOL} status -x ${name0}
293 expect_ok ${ZPOOL} create -f ${name0} ${disk0}
294 expect_ok ${ZPOOL} status -x ${name0}
295 expect_ok ${ZPOOL} destroy ${name0}