3557 dumpvp_size is not updated correctly when a dump zvol's size is changed
[unleashed.git] / usr / src / man / man1m / metastat.1m
blob73eb0ca843f3a1a16aa4e8489a8a1fd480f99e4b
1 '\" te
2 .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH METASTAT 1M "Mar 26, 2006"
7 .SH NAME
8 metastat \- display status for metadevice or hot spare pool
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/metastat\fR \fB-h\fR
13 .fi
15 .LP
16 .nf
17 \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]
18      [\fB-s\fR \fIsetname\fR] [\fB-t\fR] [\fImetadevice...\fR] [\fIhot_spare_pool\fR...]
19 .fi
21 .LP
22 .nf
23 \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]
24      [\fB-s\fR \fIsetname\fR] \fIcomponent\fR...
25 .fi
27 .SH DESCRIPTION
28 .sp
29 .LP
30 The \fBmetastat\fR command displays the current status for each metadevice
31 (including stripes, concatenations, concatenations of stripes, mirrors, RAID5,
32 soft partitions, and trans devices) or hot spare pool, or of specified
33 metadevices, components, or hot spare pools.
34 .sp
35 .LP
36 It is helpful to run the \fBmetastat\fR command after using the \fBmetattach\fR
37 command to view the status of the metadevice.
38 .sp
39 .LP
40 \fBmetastat\fR displays the state of each Solaris Volume Manager RAID-1 volume
41 on the system. The possible states include:
42 .sp
43 .ne 2
44 .na
45 \fB\fBOkay\fR\fR
46 .ad
47 .RS 21n
48 The device reports no errors.
49 .RE
51 .sp
52 .ne 2
53 .na
54 \fB\fBNeeds maintenance\fR\fR
55 .ad
56 .RS 21n
57 A problem has been detected. This requires that the system administrator
58 replace the failed physical device. Volumes displaying \fBNeeds maintenance\fR
59 have incurred no data loss, although additional failures could risk data loss.
60 Take action as quickly as possible.
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fBLast erred\fR\fR
67 .ad
68 .RS 21n
69 A problem has been detected. Data loss is a possibility. This might occur if a
70 component of a submirror fails and is not replaced by a hot spare, therefore
71 going into \fBNeeds maintenance\fR state. If the corresponding component also
72 fails, it would go into \fBLast erred\fR state and, as there is no remaining
73 valid data source, data loss could be a possibility.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fBUnavailable\fR\fR
80 .ad
81 .RS 21n
82 A device cannot be accessed, but has not incurred errors. This might occur if a
83 physical device has been removed with Solaris Dynamic Reconfiguration (DR)
84 features, thus leaving the Solaris Volume Manager volume unavailable. It could
85 also occur if an array or disk is powered off at system initialization, or if a
86 >1TB volume is present when the system is booted in 32-bit mode.
87 .sp
88 After the storage has been made available, run the \fBmetastat\fR command with
89 the \fB-i\fR option to update the status of the metadevices. This clears the
90 unavailable state for accessible devices.
91 .RE
93 .sp
94 .LP
95 See the \fI\fR for instructions on replacing disks and handling volumes in
96 Needs maintenance or Last erred states.
97 .SH OPTIONS
98 .sp
99 .LP
100 The following options are supported:
102 .ne 2
104 \fB\fB-a\fR\fR
106 .RS 14n
107 Display all disk sets. Only metadevices in disk sets that are owned by the
108 current host are displayed.
112 .ne 2
114 \fB\fB-B\fR\fR
116 .RS 14n
117 Display the current status of all of the 64-bit metadevices and hot spares.
121 .ne 2
123 \fB\fB-c\fR\fR
125 .RS 14n
126 Display concise output.
128 There is one line of output for each metadevice. The output shows the basic
129 structure and the error status, if any, for each metadevice.
131 The \fB-c\fR output format is distinct from the \fB-p\fR output format. The
132 \fB-p\fR option does not display metadevice status and is not intended as
133 human-readable output.
137 .ne 2
139 \fB\fB-D\fR\fR
141 .RS 14n
142 Display the current status of all of the descriptive name metadevices and
143 hotspares.
147 .ne 2
149 \fB\fB-h\fR\fR
151 .RS 14n
152 Display usage message.
156 .ne 2
158 \fB\fB-i\fR\fR
160 .RS 14n
161 Check the status of RAID-1 (mirror) volumes, RAID-5 volumes, and hot spares.
162 The inquiry checks each metadevice for accessibility, starting at the top level
163 metadevice. When problems are discovered, the metadevice state databases are
164 updated as if an error had occurred.
168 .ne 2
170 \fB\fB-p\fR\fR
172 .RS 14n
173 Display the list of active metadevices and hot spare pools in the same format
174 as \fBmd.tab\fR. See \fBmd.tab\fR(4).
176 The \fB-p\fR output is designed for snapshotting the configuration for later
177 recovery or setup.
181 .ne 2
183 \fB\fB-q\fR\fR
185 .RS 14n
186 Display the status for metadevices without the device relocation information.
190 .ne 2
192 \fB\fB-s\fR \fB\fIsetname\fR\fR\fR
194 .RS 14n
195 Specify the name of the disk set on which \fBmetastat\fR works. Using the
196 \fB-s\fR option causes the command to perform its administrative function
197 within the specified disk set. Without this option, the command performs its
198 function on metadevices and hot spare pools in the local disk set.
202 .ne 2
204 \fB\fB-t\fR\fR
206 .RS 14n
207 Display the current status and timestamp for the specified metadevices and hot
208 spare pools. The timestamp provides the date and time of the last state change.
211 .SH OPERANDS
214 The following operands are supported:
216 .ne 2
218 \fB\fIcomponent\fR\fR
220 .RS 18n
221 Display the status of the component hosting a soft partition, including
222 extents, starting blocks, and block count.
226 .ne 2
228 \fB\fIhot_spare_pool\fR\fR
230 .RS 18n
231 Display the status of the specified hot spare pool(s).
235 .ne 2
237 \fB\fImetadevice\fR\fR
239 .RS 18n
240 Display the status of the specified metadevice(s). If a trans metadevice is
241 specified, the status of the master and log devices is also displayed. Trans
242 metadevices have been replaced by UFS logging. See \fBNOTES\fR.
245 .SH EXAMPLES
247 \fBExample 1 \fROutput Showing Mirror with Two Submirrors
250 The following example shows the partial output of the \fBmetastat\fR command
251 after creating a mirror, \fBopt_mirror\fR, consisting of two submirrors,
252 \fBopt_sub1\fR and \fBopt_sub2\fR.
255 .in +2
257 # metastat opt_mirror
258 opt_mirror: Mirror
259     Submirror 0: opt_sub1
260       State: Okay
261     Submirror 1: opt_sub2
262       State: Resyncing
263     Resync in progress: 15 % done
264     Pass: 1
265     Read option: roundrobin (default)
266     Write option: parallel (default)
267     Size: 2006130 blocks
268     .
269     .
270     .
272 .in -2
276 \fBExample 2 \fRSoft Partition on Mirror with Submirror
279 The following example shows the partial output of the \fBmetastat\fR command
280 after creating a soft partition, \fBd3\fR, on concat \fBd2\fR, which is built
281 on a soft partition.
284 .in +2
286 # metastat
287 d2: Concat/Stripe
288     Size: 204800 blocks
289     Stripe 0:
290         Device              Start Block  Dbase State        Hot Spare
291         d0                         0     No    Okay
293 d0: Soft Partition
294     Component: c0t3d0s0
295     Status: Okay
296     Size: 204800 blocks
297         Extent              Start Block  Block count
298              0                      129       204800
300 d3: Soft Partition
301     Component: d2
302     Status: Okay
303     Size: 202752 blocks
304          Extent              Start Block  Block count
305               0                      129       202752
307 .in -2
311 \fBExample 3 \fRTrans Metadevice
314 The following example shows the output of the \fBmetastat\fR command after
315 creating a trans metadevice.
318 .in +2
320 # metastat
321 d2: Concat/Stripe
322     Size: 204800 blocks
323     Stripe 0:
324         Device              Start Block  Dbase State        Hot Spare
325         d0                         0     No    Okay
327 d0: Soft Partition
328     Component: c0t3d0s0
329     Status: Okay
330     Size: 204800 blocks
331         Extent              Start Block  Block count
332              0                      129       204800
334 d3: Soft Partition
335     Component: d2
336     Status: Okay
337     Size: 202752 blocks
338          Extent              Start Block  Block count
339               0                      129       202752
341 .in -2
345 \fBExample 4 \fRMulti-owner disk set
348 The following example shows the output of the \fBmetastat\fR command with a
349 multi-owner disk set and application-based mirror resynchronization option.
350 Application-based resynchronization is set automatically if needed.
353 .in +2
355 # metastat -s oban
356 oban/d100: Mirror
357     Submirror 0: oban/d10
358       State: Okay
359     Submirror 1: oban/d11
360       State: Okay
361     Pass: 1
362     Read option: roundrobin (default)
363     Write option: parallel (default)
364     Resync option: application based
365     Owner: None
366     Size: 1027216 blocks (501 MB)
368 oban/d10: Submirror of oban/d100
369     State: Okay
370     Size: 1027216 blocks (501 MB)
371     Stripe 0:
372         Device     Start Block  Dbase     State Reloc Hot Spare
373         c1t3d0s0          0     No         Okay
375 oban/d11: Submirror of oban/d100
376     State: Okay
377     Size: 1027216 blocks (501 MB)
378     Stripe 0:
379         Device     Start Block  Dbase     State Reloc Hot Spare
380         c1t4d0s0          0     No         Okay
382 .in -2
385 .SH WARNINGS
388 \fBmetastat\fR displays states as of the time the command is entered. It is
389 unwise to use the output of the \fBmetastat\fR \fB-p\fR command to create a
390 \fBmd.tab\fR(4) file for a number of reasons:
391 .RS +4
393 .ie t \(bu
394 .el o
395 The output of \fBmetastat\fR \fB-p\fR might show hot spares being used.
397 .RS +4
399 .ie t \(bu
400 .el o
401 It might show mirrors with multiple submirrors. See \fBmetainit\fR(1M) for
402 instructions for creating multi-way mirrors using \fBmetainit\fR and
403 \fBmetattach\fR.
405 .RS +4
407 .ie t \(bu
408 .el o
409 A slice may go into an error state after \fBmetastat\fR \fB-p\fR is issued.
411 .SH EXIT STATUS
414 The following exit values are returned:
416 .ne 2
418 \fB\fB0\fR\fR
420 .RS 6n
421 Successful completion.
425 .ne 2
427 \fB\fB>0\fR\fR
429 .RS 6n
430 An error occurred.
433 .SH ATTRIBUTES
436 See \fBattributes\fR(5) for descriptions of the following attributes:
441 box;
442 c | c
443 l | l .
444 ATTRIBUTE TYPE  ATTRIBUTE VALUE
446 Interface Stability     Stable
449 .SH SEE ALSO
452 \fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M),
453 \fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M),
454 \fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M),
455 \fBmetarecover\fR(1M), \fBmetarename\fR(1M), \fBmetareplace\fR(1M),
456 \fBmetaroot\fR(1M), \fBmetaset\fR(1M), \fBmetassist\fR(1M), \fBmetasync\fR(1M),
457 \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4), \fBmddb.cf\fR(4),
458 \fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D)
461 \fI\fR
462 .SH NOTES
465 Trans metadevices have been replaced by UFS logging. Existing trans devices are
466 \fBnot\fR logging--they pass data directly through to the underlying device.
467 See \fBmount_ufs\fR(1M) for more information about UFS logging.