1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
|
'\" te
.\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH METASTAT 1M "Mar 26, 2006"
.SH NAME
metastat \- display status for metadevice or hot spare pool
.SH SYNOPSIS
.LP
.nf
\fB/usr/sbin/metastat\fR \fB-h\fR
.fi
.LP
.nf
\fB/usr/sbin/metastat\fR [\fB-a\fR] [\fB-B\fR] [\fB-D\fR] [\fB-c\fR] [\fB-i\fR] [\fB-p\fR] [\fB-q\fR]
[\fB-s\fR \fIsetname\fR] [\fB-t\fR] [\fImetadevice...\fR] [\fIhot_spare_pool\fR...]
.fi
.LP
.nf
\fB/usr/sbin/metastat\fR [\fB-a\fR] [\fB-B\fR] [\fB-D\fR] [\fB-c\fR] [\fB-i\fR] [\fB-p\fR] [\fB-q\fR]
[\fB-s\fR \fIsetname\fR] \fIcomponent\fR...
.fi
.SH DESCRIPTION
.sp
.LP
The \fBmetastat\fR command displays the current status for each metadevice
(including stripes, concatenations, concatenations of stripes, mirrors, RAID5,
soft partitions, and trans devices) or hot spare pool, or of specified
metadevices, components, or hot spare pools.
.sp
.LP
It is helpful to run the \fBmetastat\fR command after using the \fBmetattach\fR
command to view the status of the metadevice.
.sp
.LP
\fBmetastat\fR displays the state of each Solaris Volume Manager RAID-1 volume
on the system. The possible states include:
.sp
.ne 2
.na
\fB\fBOkay\fR\fR
.ad
.RS 21n
The device reports no errors.
.RE
.sp
.ne 2
.na
\fB\fBNeeds maintenance\fR\fR
.ad
.RS 21n
A problem has been detected. This requires that the system administrator
replace the failed physical device. Volumes displaying \fBNeeds maintenance\fR
have incurred no data loss, although additional failures could risk data loss.
Take action as quickly as possible.
.RE
.sp
.ne 2
.na
\fB\fBLast erred\fR\fR
.ad
.RS 21n
A problem has been detected. Data loss is a possibility. This might occur if a
component of a submirror fails and is not replaced by a hot spare, therefore
going into \fBNeeds maintenance\fR state. If the corresponding component also
fails, it would go into \fBLast erred\fR state and, as there is no remaining
valid data source, data loss could be a possibility.
.RE
.sp
.ne 2
.na
\fB\fBUnavailable\fR\fR
.ad
.RS 21n
A device cannot be accessed, but has not incurred errors. This might occur if a
physical device has been removed with Solaris Dynamic Reconfiguration (DR)
features, thus leaving the Solaris Volume Manager volume unavailable. It could
also occur if an array or disk is powered off at system initialization, or if a
>1TB volume is present when the system is booted in 32-bit mode.
.sp
After the storage has been made available, run the \fBmetastat\fR command with
the \fB-i\fR option to update the status of the metadevices. This clears the
unavailable state for accessible devices.
.RE
.sp
.LP
See the \fI\fR for instructions on replacing disks and handling volumes in
Needs maintenance or Last erred states.
.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-a\fR\fR
.ad
.RS 14n
Display all disk sets. Only metadevices in disk sets that are owned by the
current host are displayed.
.RE
.sp
.ne 2
.na
\fB\fB-B\fR\fR
.ad
.RS 14n
Display the current status of all of the 64-bit metadevices and hot spares.
.RE
.sp
.ne 2
.na
\fB\fB-c\fR\fR
.ad
.RS 14n
Display concise output.
.sp
There is one line of output for each metadevice. The output shows the basic
structure and the error status, if any, for each metadevice.
.sp
The \fB-c\fR output format is distinct from the \fB-p\fR output format. The
\fB-p\fR option does not display metadevice status and is not intended as
human-readable output.
.RE
.sp
.ne 2
.na
\fB\fB-D\fR\fR
.ad
.RS 14n
Display the current status of all of the descriptive name metadevices and
hotspares.
.RE
.sp
.ne 2
.na
\fB\fB-h\fR\fR
.ad
.RS 14n
Display usage message.
.RE
.sp
.ne 2
.na
\fB\fB-i\fR\fR
.ad
.RS 14n
Check the status of RAID-1 (mirror) volumes, RAID-5 volumes, and hot spares.
The inquiry checks each metadevice for accessibility, starting at the top level
metadevice. When problems are discovered, the metadevice state databases are
updated as if an error had occurred.
.RE
.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 14n
Display the list of active metadevices and hot spare pools in the same format
as \fBmd.tab\fR. See \fBmd.tab\fR(4).
.sp
The \fB-p\fR output is designed for snapshotting the configuration for later
recovery or setup.
.RE
.sp
.ne 2
.na
\fB\fB-q\fR\fR
.ad
.RS 14n
Display the status for metadevices without the device relocation information.
.RE
.sp
.ne 2
.na
\fB\fB-s\fR \fB\fIsetname\fR\fR\fR
.ad
.RS 14n
Specify the name of the disk set on which \fBmetastat\fR works. Using the
\fB-s\fR option causes the command to perform its administrative function
within the specified disk set. Without this option, the command performs its
function on metadevices and hot spare pools in the local disk set.
.RE
.sp
.ne 2
.na
\fB\fB-t\fR\fR
.ad
.RS 14n
Display the current status and timestamp for the specified metadevices and hot
spare pools. The timestamp provides the date and time of the last state change.
.RE
.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIcomponent\fR\fR
.ad
.RS 18n
Display the status of the component hosting a soft partition, including
extents, starting blocks, and block count.
.RE
.sp
.ne 2
.na
\fB\fIhot_spare_pool\fR\fR
.ad
.RS 18n
Display the status of the specified hot spare pool(s).
.RE
.sp
.ne 2
.na
\fB\fImetadevice\fR\fR
.ad
.RS 18n
Display the status of the specified metadevice(s). If a trans metadevice is
specified, the status of the master and log devices is also displayed. Trans
metadevices have been replaced by UFS logging. See \fBNOTES\fR.
.RE
.SH EXAMPLES
.LP
\fBExample 1 \fROutput Showing Mirror with Two Submirrors
.sp
.LP
The following example shows the partial output of the \fBmetastat\fR command
after creating a mirror, \fBopt_mirror\fR, consisting of two submirrors,
\fBopt_sub1\fR and \fBopt_sub2\fR.
.sp
.in +2
.nf
# metastat opt_mirror
opt_mirror: Mirror
Submirror 0: opt_sub1
State: Okay
Submirror 1: opt_sub2
State: Resyncing
Resync in progress: 15 % done
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 2006130 blocks
.
.
.
.fi
.in -2
.sp
.LP
\fBExample 2 \fRSoft Partition on Mirror with Submirror
.sp
.LP
The following example shows the partial output of the \fBmetastat\fR command
after creating a soft partition, \fBd3\fR, on concat \fBd2\fR, which is built
on a soft partition.
.sp
.in +2
.nf
# metastat
d2: Concat/Stripe
Size: 204800 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d0 0 No Okay
d0: Soft Partition
Component: c0t3d0s0
Status: Okay
Size: 204800 blocks
Extent Start Block Block count
0 129 204800
d3: Soft Partition
Component: d2
Status: Okay
Size: 202752 blocks
Extent Start Block Block count
0 129 202752
.fi
.in -2
.sp
.LP
\fBExample 3 \fRTrans Metadevice
.sp
.LP
The following example shows the output of the \fBmetastat\fR command after
creating a trans metadevice.
.sp
.in +2
.nf
# metastat
d2: Concat/Stripe
Size: 204800 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
d0 0 No Okay
d0: Soft Partition
Component: c0t3d0s0
Status: Okay
Size: 204800 blocks
Extent Start Block Block count
0 129 204800
d3: Soft Partition
Component: d2
Status: Okay
Size: 202752 blocks
Extent Start Block Block count
0 129 202752
.fi
.in -2
.sp
.LP
\fBExample 4 \fRMulti-owner disk set
.sp
.LP
The following example shows the output of the \fBmetastat\fR command with a
multi-owner disk set and application-based mirror resynchronization option.
Application-based resynchronization is set automatically if needed.
.sp
.in +2
.nf
# metastat -s oban
oban/d100: Mirror
Submirror 0: oban/d10
State: Okay
Submirror 1: oban/d11
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Resync option: application based
Owner: None
Size: 1027216 blocks (501 MB)
oban/d10: Submirror of oban/d100
State: Okay
Size: 1027216 blocks (501 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t3d0s0 0 No Okay
oban/d11: Submirror of oban/d100
State: Okay
Size: 1027216 blocks (501 MB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c1t4d0s0 0 No Okay
.fi
.in -2
.sp
.SH WARNINGS
.sp
.LP
\fBmetastat\fR displays states as of the time the command is entered. It is
unwise to use the output of the \fBmetastat\fR \fB-p\fR command to create a
\fBmd.tab\fR(4) file for a number of reasons:
.RS +4
.TP
.ie t \(bu
.el o
The output of \fBmetastat\fR \fB-p\fR might show hot spares being used.
.RE
.RS +4
.TP
.ie t \(bu
.el o
It might show mirrors with multiple submirrors. See \fBmetainit\fR(1M) for
instructions for creating multi-way mirrors using \fBmetainit\fR and
\fBmetattach\fR.
.RE
.RS +4
.TP
.ie t \(bu
.el o
A slice may go into an error state after \fBmetastat\fR \fB-p\fR is issued.
.RE
.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB0\fR\fR
.ad
.RS 6n
Successful completion.
.RE
.sp
.ne 2
.na
\fB\fB>0\fR\fR
.ad
.RS 6n
An error occurred.
.RE
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE ATTRIBUTE VALUE
_
Interface Stability Stable
.TE
.SH SEE ALSO
.sp
.LP
\fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M),
\fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M),
\fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M),
\fBmetarecover\fR(1M), \fBmetarename\fR(1M), \fBmetareplace\fR(1M),
\fBmetaroot\fR(1M), \fBmetaset\fR(1M), \fBmetassist\fR(1M), \fBmetasync\fR(1M),
\fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4), \fBmddb.cf\fR(4),
\fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D)
.sp
.LP
\fI\fR
.SH NOTES
.sp
.LP
Trans metadevices have been replaced by UFS logging. Existing trans devices are
\fBnot\fR logging--they pass data directly through to the underlying device.
See \fBmount_ufs\fR(1M) for more information about UFS logging.
|