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"
8 metastat \- display status for metadevice or hot spare pool
12 \fB/usr/sbin/metastat\fR \fB-h\fR
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...]
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...
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.
36 It is helpful to run the \fBmetastat\fR command after using the \fBmetattach\fR
37 command to view the status of the metadevice.
40 \fBmetastat\fR displays the state of each Solaris Volume Manager RAID-1 volume
41 on the system. The possible states include:
48 The device reports no errors.
54 \fB\fBNeeds maintenance\fR\fR
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.
66 \fB\fBLast erred\fR\fR
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.
79 \fB\fBUnavailable\fR\fR
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.
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.
95 See the \fI\fR for instructions on replacing disks and handling volumes in
96 Needs maintenance or Last erred states.
100 The following options are supported:
107 Display all disk sets. Only metadevices in disk sets that are owned by the
108 current host are displayed.
117 Display the current status of all of the 64-bit metadevices and hot spares.
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.
142 Display the current status of all of the descriptive name metadevices and
152 Display usage message.
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.
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
186 Display the status for metadevices without the device relocation information.
192 \fB\fB-s\fR \fB\fIsetname\fR\fR\fR
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.
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.
214 The following operands are supported:
218 \fB\fIcomponent\fR\fR
221 Display the status of the component hosting a soft partition, including
222 extents, starting blocks, and block count.
228 \fB\fIhot_spare_pool\fR\fR
231 Display the status of the specified hot spare pool(s).
237 \fB\fImetadevice\fR\fR
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.
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.
257 # metastat opt_mirror
259 Submirror 0: opt_sub1
261 Submirror 1: opt_sub2
263 Resync in progress: 15 % done
265 Read option: roundrobin (default)
266 Write option: parallel (default)
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
290 Device Start Block Dbase State Hot Spare
297 Extent Start Block Block count
304 Extent Start Block Block count
311 \fBExample 3 \fRTrans Metadevice
314 The following example shows the output of the \fBmetastat\fR command after
315 creating a trans metadevice.
324 Device Start Block Dbase State Hot Spare
331 Extent Start Block Block count
338 Extent Start Block Block count
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.
357 Submirror 0: oban/d10
359 Submirror 1: oban/d11
362 Read option: roundrobin (default)
363 Write option: parallel (default)
364 Resync option: application based
366 Size: 1027216 blocks (501 MB)
368 oban/d10: Submirror of oban/d100
370 Size: 1027216 blocks (501 MB)
372 Device Start Block Dbase State Reloc Hot Spare
375 oban/d11: Submirror of oban/d100
377 Size: 1027216 blocks (501 MB)
379 Device Start Block Dbase State Reloc Hot Spare
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:
395 The output of \fBmetastat\fR \fB-p\fR might show hot spares being used.
401 It might show mirrors with multiple submirrors. See \fBmetainit\fR(1M) for
402 instructions for creating multi-way mirrors using \fBmetainit\fR and
409 A slice may go into an error state after \fBmetastat\fR \fB-p\fR is issued.
414 The following exit values are returned:
421 Successful completion.
436 See \fBattributes\fR(5) for descriptions of the following attributes:
444 ATTRIBUTE TYPE ATTRIBUTE VALUE
446 Interface Stability Stable
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)
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.