2 .\" Copyright (c) 2003, 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 METACLEAR 1M "Mar 26, 2006"
8 metaclear \- delete active metadevices and hot spare pools
12 \fB/usr/sbin/metaclear\fR \fB-h\fR
17 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-a\fR [\fB-f\fR]
22 \fB/usr/sbin/metaclear\fR \fIcomponent\fR
27 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] [\fB-f\fR] \fImetadevice...\fR \fIhot_spare_pool...\fR
32 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-r\fR [\fB-f\fR] \fImetadevice...\fR \fIhot_spare_pool...\fR
37 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-p\fR \fIcomponent\fR
42 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-p\fR \fImetadevice\fR
48 The \fBmetaclear\fR command deletes the specified metadevice or
49 \fIhot_spare_pool\fR, or purges all soft partitions from the designated
50 component. Once a metadevice or hot spare pool is deleted, it must be
51 re-created using \fBmetainit\fR before it can be used again.
54 Any metadevice currently in use (open) cannot be deleted.
58 Root privileges are required for all of the following options except \fB-h\fR.
65 Deletes all metadevices and configured hot spare pools in the set named by
66 \fB-s\fR, or the local set by default.
75 Deletes (forcibly) a metadevice that contains a subcomponent in an error state.
84 Displays usage message.
93 Deletes (purges) all soft partitions from the specified metadevice or
103 Recursively deletes specified metadevices and hot spare pools, but does not
104 delete metadevices on which others depend.
110 \fB\fB-s\fR \fB\fIsetname\fR\fR\fR
113 Specifies the name of the diskset on which \fBmetaclear\fR will work. Using the
114 \fB-s\fR option causes the command to perform its administrative function
115 within the specified diskset. Without this option, the command performs its
116 function on local metadevices and/or hot spare pools.
123 \fB\fImetadevice\fR \fI\&...\fR\fR
126 Specifies the name(s) of the metadevice(s) to be deleted.
132 \fB\fIcomponent\fR\fR
135 Specifies the \fBc*d*t*s*\fR name(s) of the components containing soft
136 partitions to be deleted.
142 \fB\fIhot_spare_pool\fR \fI\&...\fR\fR
145 Specifies the name(s) of the hot spare pools to be deleted. Names for hot spare
146 pools can be any legal file name that is composed of alphanumeric characters, a
147 dash ("-"), an underscore ("_"), or a period ("."). Names must begin with a
148 letter. The words "all" and "none" are reserved and cannot be used.
153 \fBExample 1 \fRDeleting Various Devices
156 The following example deletes a metadevice named \fBd10\fR.
161 # metaclear /dev/md/dsk/d10
168 The following example deletes all local metadevices and hot spare pools on the
181 The following example deletes a mirror, \fBmymirror\fR, with a submirror in an
187 # metaclear -f mymirror
194 The following example deletes a hot spare pool, \fBhsp001\fR.
206 The following example deletes a soft partition, \fBd23\fR.
218 The following example purges all soft partitions on the slice \fBc2t3d5s2\fR if
219 those partitions are not being used by other metadevices or are not open.
224 # metaclear -p c2t3d5s2
231 The following example purges soft partitions from a metadevice.
237 d3: Soft Partition is cleared
238 d4: Soft Partition is cleared
239 d5: Soft Partition is cleared
247 The following exit values are returned:
254 Successful completion.
269 See \fBattributes\fR(5) for descriptions of the following attributes:
277 ATTRIBUTE TYPE ATTRIBUTE VALUE
279 Interface Stability Stable
285 \fBmdmonitord\fR(1M), \fBmetadb\fR(1M), \fBmetadetach\fR(1M), \fBmetahs\fR(1M),
286 \fBmetainit\fR(1M), \fBmetaoffline\fR(1M), \fBmetaonline\fR(1M),
287 \fBmetaparam\fR(1M), \fBmetarecover\fR(1M), \fBmetarename\fR(1M),
288 \fBmetareplace\fR(1M), \fBmetaroot\fR(1M), \fBmetaset\fR(1M),
289 \fBmetassist\fR(1M), \fBmetastat\fR(1M), \fBmetasync\fR(1M),
290 \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4), \fBmddb.cf\fR(4),
291 \fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D)