1metastat(1M) System Administration Commands metastat(1M)
2
3
4
6 metastat - display status for metadevice or hot spare pool
7
9 /usr/sbin/metastat -h
10
11
12 /usr/sbin/metastat [-a] [-B] [-D] [-c] [-i] [-p] [-q]
13 [-s setname] [-t] [metadevice...] [hot_spare_pool...]
14
15
16 /usr/sbin/metastat [-a] [-B] [-D] [-c] [-i] [-p] [-q]
17 [-s setname] component...
18
19
21 The metastat command displays the current status for each metadevice
22 (including stripes, concatenations, concatenations of stripes, mirrors,
23 RAID5, soft partitions, and trans devices) or hot spare pool, or of
24 specified metadevices, components, or hot spare pools.
25
26
27 It is helpful to run the metastat command after using the metattach
28 command to view the status of the metadevice.
29
30
31 metastat displays the state of each Solaris Volume Manager RAID-1 vol‐
32 ume on the system. The possible states include:
33
34 Okay The device reports no errors.
35
36
37 Needs maintenance A problem has been detected. This requires that
38 the system administrator replace the failed physi‐
39 cal device. Volumes displaying Needs maintenance
40 have incurred no data loss, although additional
41 failures could risk data loss. Take action as
42 quickly as possible.
43
44
45 Last erred A problem has been detected. Data loss is a possi‐
46 bility. This might occur if a component of a sub‐
47 mirror fails and is not replaced by a hot spare,
48 therefore going into Needs maintenance state. If
49 the corresponding component also fails, it would
50 go into Last erred state and, as there is no
51 remaining valid data source, data loss could be a
52 possibility.
53
54
55 Unavailable A device cannot be accessed, but has not incurred
56 errors. This might occur if a physical device has
57 been removed with Solaris Dynamic Reconfiguration
58 (DR) features, thus leaving the Solaris Volume
59 Manager volume unavailable. It could also occur if
60 an array or disk is powered off at system initial‐
61 ization, or if a >1TB volume is present when the
62 system is booted in 32-bit mode.
63
64 After the storage has been made available, run the
65 metastat command with the -i option to update the
66 status of the metadevices. This clears the
67 unavailable state for accessible devices.
68
69
70
71 See the for instructions on replacing disks and handling volumes in
72 Needs maintenance or Last erred states.
73
75 The following options are supported:
76
77 -a Display all disk sets. Only metadevices in disk sets that
78 are owned by the current host are displayed.
79
80
81 -B Display the current status of all of the 64-bit metade‐
82 vices and hot spares.
83
84
85 -c Display concise output.
86
87 There is one line of output for each metadevice. The out‐
88 put shows the basic structure and the error status, if
89 any, for each metadevice.
90
91 The -c output format is distinct from the -p output for‐
92 mat. The -p option does not display metadevice status and
93 is not intended as human-readable output.
94
95
96 -D Display the current status of all of the descriptive name
97 metadevices and hotspares.
98
99
100 -h Display usage message.
101
102
103 -i Check the status of RAID-1 (mirror) volumes, RAID-5 vol‐
104 umes, and hot spares. The inquiry checks each metadevice
105 for accessibility, starting at the top level metadevice.
106 When problems are discovered, the metadevice state data‐
107 bases are updated as if an error had occurred.
108
109
110 -p Display the list of active metadevices and hot spare
111 pools in the same format as md.tab. See md.tab(4).
112
113 The -p output is designed for snapshotting the configura‐
114 tion for later recovery or setup.
115
116
117 -q Display the status for metadevices without the device
118 relocation information.
119
120
121 -s setname Specify the name of the disk set on which metastat works.
122 Using the -s option causes the command to perform its
123 administrative function within the specified disk set.
124 Without this option, the command performs its function on
125 metadevices and hot spare pools in the local disk set.
126
127
128 -t Display the current status and timestamp for the speci‐
129 fied metadevices and hot spare pools. The timestamp pro‐
130 vides the date and time of the last state change.
131
132
134 The following operands are supported:
135
136 component Display the status of the component hosting a soft
137 partition, including extents, starting blocks, and
138 block count.
139
140
141 hot_spare_pool Display the status of the specified hot spare
142 pool(s).
143
144
145 metadevice Display the status of the specified metadevice(s). If
146 a trans metadevice is specified, the status of the
147 master and log devices is also displayed. Trans
148 metadevices have been replaced by UFS logging. See
149 NOTES.
150
151
153 Example 1 Output Showing Mirror with Two Submirrors
154
155
156 The following example shows the partial output of the metastat command
157 after creating a mirror, opt_mirror, consisting of two submirrors,
158 opt_sub1 and opt_sub2.
159
160
161 # metastat opt_mirror
162 opt_mirror: Mirror
163 Submirror 0: opt_sub1
164 State: Okay
165 Submirror 1: opt_sub2
166 State: Resyncing
167 Resync in progress: 15 % done
168 Pass: 1
169 Read option: roundrobin (default)
170 Write option: parallel (default)
171 Size: 2006130 blocks
172 .
173 .
174 .
175
176
177
178 Example 2 Soft Partition on Mirror with Submirror
179
180
181 The following example shows the partial output of the metastat command
182 after creating a soft partition, d3, on concat d2, which is built on a
183 soft partition.
184
185
186 # metastat
187 d2: Concat/Stripe
188 Size: 204800 blocks
189 Stripe 0:
190 Device Start Block Dbase State Hot Spare
191 d0 0 No Okay
192
193 d0: Soft Partition
194 Component: c0t3d0s0
195 Status: Okay
196 Size: 204800 blocks
197 Extent Start Block Block count
198 0 129 204800
199
200 d3: Soft Partition
201 Component: d2
202 Status: Okay
203 Size: 202752 blocks
204 Extent Start Block Block count
205 0 129 202752
206
207
208
209 Example 3 Trans Metadevice
210
211
212 The following example shows the output of the metastat command after
213 creating a trans metadevice.
214
215
216 # metastat
217 d2: Concat/Stripe
218 Size: 204800 blocks
219 Stripe 0:
220 Device Start Block Dbase State Hot Spare
221 d0 0 No Okay
222
223 d0: Soft Partition
224 Component: c0t3d0s0
225 Status: Okay
226 Size: 204800 blocks
227 Extent Start Block Block count
228 0 129 204800
229
230 d3: Soft Partition
231 Component: d2
232 Status: Okay
233 Size: 202752 blocks
234 Extent Start Block Block count
235 0 129 202752
236
237
238
239 Example 4 Multi-owner disk set
240
241
242 The following example shows the output of the metastat command with a
243 multi-owner disk set and application-based mirror resynchronization
244 option. Application-based resynchronization is set automatically if
245 needed.
246
247
248 # metastat -s oban
249 oban/d100: Mirror
250 Submirror 0: oban/d10
251 State: Okay
252 Submirror 1: oban/d11
253 State: Okay
254 Pass: 1
255 Read option: roundrobin (default)
256 Write option: parallel (default)
257 Resync option: application based
258 Owner: None
259 Size: 1027216 blocks (501 MB)
260
261 oban/d10: Submirror of oban/d100
262 State: Okay
263 Size: 1027216 blocks (501 MB)
264 Stripe 0:
265 Device Start Block Dbase State Reloc Hot Spare
266 c1t3d0s0 0 No Okay
267
268 oban/d11: Submirror of oban/d100
269 State: Okay
270 Size: 1027216 blocks (501 MB)
271 Stripe 0:
272 Device Start Block Dbase State Reloc Hot Spare
273 c1t4d0s0 0 No Okay
274
275
276
278 metastat displays states as of the time the command is entered. It is
279 unwise to use the output of the metastat -p command to create a
280 md.tab(4) file for a number of reasons:
281
282 o The output of metastat -p might show hot spares being used.
283
284 o It might show mirrors with multiple submirrors. See
285 metainit(1M) for instructions for creating multi-way mirrors
286 using metainit and metattach.
287
288 o A slice may go into an error state after metastat -p is
289 issued.
290
292 The following exit values are returned:
293
294 0 Successful completion.
295
296
297 >0 An error occurred.
298
299
301 See attributes(5) for descriptions of the following attributes:
302
303
304
305
306 ┌─────────────────────────────┬─────────────────────────────┐
307 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
308 ├─────────────────────────────┼─────────────────────────────┤
309 │Availability │SUNWmdr │
310 ├─────────────────────────────┼─────────────────────────────┤
311 │Interface Stability │Stable │
312 └─────────────────────────────┴─────────────────────────────┘
313
315 mdmonitord(1M), metaclear(1M), metadb(1M), metadetach(1M), metahs(1M),
316 metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metare‐
317 cover(1M), metarename(1M), metareplace(1M), metaroot(1M), metaset(1M),
318 metassist(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4),
319 mddb.cf(4), md.tab(4), attributes(5), md(7D)
320
321
322
323
325 Trans metadevices have been replaced by UFS logging. Existing trans
326 devices are not logging--they pass data directly through to the under‐
327 lying device. See mount_ufs(1M) for more information about UFS logging.
328
329
330
331SunOS 5.11 26 Mar 2006 metastat(1M)