6324 Add an `ndp' tool for manipulating the neighbors table
[illumos-gate.git] / usr / src / man / man1m / metaclear.1m
blob2ba234f235f749951bd597a5d4bb91fd0af668e9
1 '\" te
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"
7 .SH NAME
8 metaclear \- delete active metadevices and hot spare pools
9 .SH SYNOPSIS
10 .LP
11 .nf
12 \fB/usr/sbin/metaclear\fR \fB-h\fR
13 .fi
15 .LP
16 .nf
17 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-a\fR [\fB-f\fR]
18 .fi
20 .LP
21 .nf
22 \fB/usr/sbin/metaclear\fR \fIcomponent\fR
23 .fi
25 .LP
26 .nf
27 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] [\fB-f\fR] \fImetadevice...\fR \fIhot_spare_pool...\fR
28 .fi
30 .LP
31 .nf
32 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-r\fR [\fB-f\fR] \fImetadevice...\fR \fIhot_spare_pool...\fR
33 .fi
35 .LP
36 .nf
37 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-p\fR \fIcomponent\fR
38 .fi
40 .LP
41 .nf
42 \fB/usr/sbin/metaclear\fR [\fB-s\fR \fIsetname\fR] \fB-p\fR \fImetadevice\fR
43 .fi
45 .SH DESCRIPTION
46 .sp
47 .LP
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.
52 .sp
53 .LP
54 Any metadevice currently in use (open) cannot be deleted.
55 .SH OPTIONS
56 .sp
57 .LP
58 Root privileges are required for all of the following options except \fB-h\fR.
59 .sp
60 .ne 2
61 .na
62 \fB\fB-a\fR\fR
63 .ad
64 .RS 14n
65 Deletes all metadevices and configured hot spare pools in the set named by
66 \fB-s\fR, or the local set by default.
67 .RE
69 .sp
70 .ne 2
71 .na
72 \fB\fB-f\fR\fR
73 .ad
74 .RS 14n
75 Deletes (forcibly) a metadevice that contains a subcomponent in an error state.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fB-h\fR\fR
82 .ad
83 .RS 14n
84 Displays usage message.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fB\fB-p\fR\fR
91 .ad
92 .RS 14n
93 Deletes (purges) all soft partitions from the specified metadevice or
94 component.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fB-r\fR\fR
102 .RS 14n
103 Recursively deletes specified metadevices and hot spare pools, but does not
104 delete metadevices on which others depend.
108 .ne 2
110 \fB\fB-s\fR \fB\fIsetname\fR\fR\fR
112 .RS 14n
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.
119 .SH OPERANDS
121 .ne 2
123 \fB\fImetadevice\fR \fI\&...\fR\fR
125 .RS 24n
126 Specifies the name(s) of the metadevice(s) to be deleted.
130 .ne 2
132 \fB\fIcomponent\fR\fR
134 .RS 24n
135 Specifies the \fBc*d*t*s*\fR name(s) of the components containing soft
136 partitions to be deleted.
140 .ne 2
142 \fB\fIhot_spare_pool\fR \fI\&...\fR\fR
144 .RS 24n
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.
151 .SH EXAMPLES
153 \fBExample 1 \fRDeleting Various Devices
156 The following example deletes a metadevice named \fBd10\fR.
159 .in +2
161 # metaclear /dev/md/dsk/d10
163 .in -2
168 The following example deletes all local metadevices and hot spare pools on the
169 system.
172 .in +2
174 # metaclear -a
176 .in -2
181 The following example deletes a mirror, \fBmymirror\fR, with a submirror in an
182 error state.
185 .in +2
187 # metaclear -f mymirror
189 .in -2
194 The following example deletes a hot spare pool, \fBhsp001\fR.
197 .in +2
199 # metaclear hsp001
201 .in -2
206 The following example deletes a soft partition, \fBd23\fR.
209 .in +2
211 # metaclear d23
213 .in -2
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.
222 .in +2
224 # metaclear -p c2t3d5s2
226 .in -2
231 The following example purges soft partitions from a metadevice.
234 .in +2
236 # metaclear -p d2
237 d3: Soft Partition is cleared
238 d4: Soft Partition is cleared
239 d5: Soft Partition is cleared
241 .in -2
244 .SH EXIT STATUS
247 The following exit values are returned:
249 .ne 2
251 \fB\fB0\fR\fR
253 .RS 6n
254 Successful completion.
258 .ne 2
260 \fB\fB>0\fR\fR
262 .RS 6n
263 An error occurred.
266 .SH ATTRIBUTES
269 See \fBattributes\fR(5) for descriptions of the following attributes:
274 box;
275 c | c
276 l | l .
277 ATTRIBUTE TYPE  ATTRIBUTE VALUE
279 Interface Stability     Stable
282 .SH SEE ALSO
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)
294 \fI\fR