'\" te .\" Copyright (c) 2003, 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 METAHS 1M "Mar 26, 2006" .SH NAME metahs \- manage hot spares and hot spare pools .SH SYNOPSIS .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-a\fR all \fIcomponent\fR .fi .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-a\fR \fIhot_spare_pool\fR [\fIcomponent\fR] .fi .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-d\fR \fIhot_spare_pool\fR [\fIcomponent\fR] .fi .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-d\fR all \fIcomponent\fR .fi .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-e\fR \fIcomponent\fR .fi .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-r\fR \fIhot_spare_pool\fR \fIcomponent-old\fR .fi .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-r\fR all \fIcomponent-old\fR \fIcomponent-new\fR .fi .LP .nf \fB/usr/sbin/metahs\fR [\fB-s\fR \fIsetname\fR] \fB-i\fR [\fIhot_spare_pool\fR]... .fi .SH DESCRIPTION .sp .LP The \fBmetahs\fR command manages existing hot spares and hot spare pools. It is used to add, delete, enable, and replace components (slices) in hot spare pools. Like the \fBmetainit\fR command, the \fBmetahs\fR command can also create an initial hot spare pool. The \fBmetahs\fR command does not replace a component of a metadevice. This function is performed by the \fBmetareplace\fR command. .sp .LP Hot spares are always in one of three states: available, in-use, or broken. Available hot spares are running and ready to accept data, but are not currently being written to or read from. In-use hot spares are currently being written to and read from. Broken hot spares are out of service and should be repaired. The status of hot spares is displayed when \fBmetahs\fR is invoked with the \fB-i\fR option. .sp .LP Solaris Volume Manager supports storage devices and logical volumes, including hot spares, greater than 1 terabyte (TB) when Solaris 10 is running a 64-bit kernel. .sp .LP If a system with large volumes or hot spares is rebooted under a 32-bit Solaris 10 kernel, the large volumes are visible through \fBmetastat\fR output, but they cannot be accessed, modified or deleted, and no new large volumes can be created. Any volumes or file systems on a large volume in this situation are also unavailable. If a system with large volumes is rebooted under a version of Solaris prior to Solaris 10, Solaris Volume Manager will not start. All large volumes must be removed before Solaris Volume Manager runs under another version of the Solaris Operating Environment. .SH OPTIONS .sp .LP Root privileges are required for any of the following options except \fB-i\fR. .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-a\fR \fBall\fR \fIcomponent\fR\fR .ad .sp .6 .RS 4n Add \fIcomponent\fR to all hot spare pools. \fBall\fR is not case sensitive. .RE .sp .ne 2 .na \fB\fB-a\fR \fIhot_spare_pool\fR \fB[\fR\fIcomponent\fR\fB]\fR\fR .ad .sp .6 .RS 4n Add the \fIcomponent\fR to the specified \fIhot_spare_pool\fR. \fIhot_spare_pool\fR is created if it does not already exist. .RE .sp .ne 2 .na \fB\fB-d\fR \fBall\fR \fIcomponent\fR\fR .ad .sp .6 .RS 4n Delete \fIcomponent\fR from all the hot spare pools. The \fIcomponent\fR cannot be deleted if it is in the in-use state. .RE .sp .ne 2 .na \fB\fB-d\fR \fIhot_spare_pool\fR \fB[\fR\fIcomponent\fR\fB]\fR\fR .ad .sp .6 .RS 4n Delete \fIhot_spare_pool\fR, if the \fIhot_spare_pool\fR is both empty and not referenced by a metadevice. If \fIcomponent\fR is specified, it is deleted from the \fIhot_spare_pool\fR. Hot spares in the in-use state cannot be deleted. .RE .sp .ne 2 .na \fB\fB-e\fR \fIcomponent\fR\fR .ad .sp .6 .RS 4n Enable \fIcomponent\fR to be available for use as a hot spare. The \fIcomponent\fR can be enabled if it is in the broken state and has been repaired. .RE .sp .ne 2 .na \fB\fB-i\fR \fB[\fR\fIhot_spare_pool\fR\fB\|.\|.\|.]\fR\fR .ad .sp .6 .RS 4n Display the status of the specified \fIhot_spare_pool\fR or for all hot spare pools if one is not specified. .RE .sp .ne 2 .na \fB\fB-r\fR \fBall\fR \fIcomponent-old component-new\fR\fR .ad .sp .6 .RS 4n Replace \fIcomponent-old\fR with \fIcomponent-new\fR in all hot spare pools which have the component associated. Components cannot be replaced from any hot spare pool if the old hot spare is in the in-use state. .RE .sp .ne 2 .na \fB\fB-r\fR \fIhot_spare_pool component-old component-new\fR\fR .ad .sp .6 .RS 4n Replace \fIcomponent-old\fR with \fIcomponent-new\fR in the specified \fIhot_spare_pool\fR. Components cannot be replaced from a hot spare pool if the old hot spare is in the in-use state. .RE .sp .ne 2 .na \fB\fB-s\fR \fB\fIsetname\fR\fR\fR .ad .sp .6 .RS 4n Specify the name of the diskset on which \fBmetahs\fR works. Using the \fB-s\fR option causes the command to perform its administrative function within the specified diskset. Without this option, the command performs its function on local hot spare pools. .RE .SH OPERANDS .sp .LP The following operands are supported: .sp .ne 2 .na \fB\fIcomponent\fR\fR .ad .RS 18n The logical name for the physical slice (partition) on a disk drive, such as \fB/dev/dsk/c0t0d0s2\fR. .RE .sp .ne 2 .na \fB\fIhot_spare_pool\fR\fR .ad .RS 18n Names for hot spare pools can be any legal file name that is composed of alphanumeric characters, a dash ("-"), an underscore ("_"), or a period ("."). Names must begin with a letter. The words "all" and "none" are reserved and cannot be used. .RE .SH EXAMPLES .LP \fBExample 1 \fRAdding a Hot Spare to a Hot Spare Pool .sp .LP The following example adds a hot spare \fB/dev/dsk/c0t0d0s7\fR to a hot spare pool \fBmirror1_pool\fR: .sp .in +2 .nf # metahs -a mirror1_pool c0t0d0s7 .fi .in -2 .sp .sp .LP When the hot spare is added to the pool, the existing order of the hot spares already in the pool is preserved. The new hot spare is added at the end of the list of hot spares in the hot spare pool specified. .LP \fBExample 2 \fRAdding a Hot Spare to All Currently Defined Pools .sp .LP This example adds a hot spare to the hot spare pools that are currently defined: .sp .in +2 .nf # metahs -a all c0t0d0s7 .fi .in -2 .sp .sp .LP The keyword \fBall\fR in this example specifies adding the hot spare, \fB/dev/dsk/c0t0d0s7\fR, to all the hot spare pools. .LP \fBExample 3 \fRDeleting a Hot Spare .sp .LP This example deletes a hot spare, \fB/dev/dsk/c0t0d0s7\fR, from a hot spare pool, \fBhsp003\fR: .sp .in +2 .nf # metahs -d hsp003 c0t0d0s7 .fi .in -2 .sp .sp .LP When you delete a hot spare, the position of the remaining hot spares in the pool changes to reflect the new order. For instance, if in this example \fB/dev/dsk/c0t0d0s7\fR were the second of three hot spares, after deletion the third hot spare would move to the second position. .LP \fBExample 4 \fRReplacing a Hot Spare .sp .LP This example replaces a hot spare that was previously defined: .sp .in +2 .nf # metahs -r hsp001 c0t1d0s0 c0t3d0s0 .fi .in -2 .sp .sp .LP In this example, the hot spare \fB/dev/dsk/c0t1d0s0\fR is replaced by \fB/dev/dsk/c0t3d0s0\fR. The order of the hot spares does not change. .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), \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), \fBmetastat\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 WARNINGS .sp .LP Do not create large (>1 TB) volumes if you expect to run the Solaris Operating Environment with a 32-bit kernel or if you expect to use a version of the Solaris Operating Environment prior to Solaris 10.