1metaclear(1M) System Administration Commands metaclear(1M)
2
3
4
6 metaclear - delete active metadevices and hot spare pools
7
9 /usr/sbin/metaclear -h
10
11
12 /usr/sbin/metaclear [-s setname] -a [-f]
13
14
15 /usr/sbin/metaclear component
16
17
18 /usr/sbin/metaclear [-s setname] [-f] metadevice... hot_spare_pool...
19
20
21 /usr/sbin/metaclear [-s setname] -r [-f] metadevice... hot_spare_pool...
22
23
24 /usr/sbin/metaclear [-s setname] -p component
25
26
27 /usr/sbin/metaclear [-s setname] -p metadevice
28
29
31 The metaclear command deletes the specified metadevice or
32 hot_spare_pool, or purges all soft partitions from the designated com‐
33 ponent. Once a metadevice or hot spare pool is deleted, it must be re-
34 created using metainit before it can be used again.
35
36
37 Any metadevice currently in use (open) cannot be deleted.
38
40 Root privileges are required for all of the following options except
41 -h.
42
43 -a Deletes all metadevices and configured hot spare pools in
44 the set named by -s, or the local set by default.
45
46
47 -f Deletes (forcibly) a metadevice that contains a subcompo‐
48 nent in an error state.
49
50
51 -h Displays usage message.
52
53
54 -p Deletes (purges) all soft partitions from the specified
55 metadevice or component.
56
57
58 -r Recursively deletes specified metadevices and hot spare
59 pools, but does not delete metadevices on which others
60 depend.
61
62
63 -s setname Specifies the name of the diskset on which metaclear will
64 work. Using the -s option causes the command to perform
65 its administrative function within the specified diskset.
66 Without this option, the command performs its function on
67 local metadevices and/or hot spare pools.
68
69
71 metadevice ... Specifies the name(s) of the metadevice(s) to
72 be deleted.
73
74
75 component Specifies the c*d*t*s* name(s) of the compo‐
76 nents containing soft partitions to be deleted.
77
78
79 hot_spare_pool ... Specifies the name(s) of the hot spare pools to
80 be deleted. Names for hot spare pools can be
81 any legal file name that is composed of
82 alphanumeric characters, a dash ("-"), an
83 underscore ("_"), or a period ("."). Names must
84 begin with a letter. The words "all" and "none"
85 are reserved and cannot be used.
86
87
89 Example 1 Deleting Various Devices
90
91
92 The following example deletes a metadevice named d10.
93
94
95 # metaclear /dev/md/dsk/d10
96
97
98
99
100 The following example deletes all local metadevices and hot spare pools
101 on the system.
102
103
104 # metaclear -a
105
106
107
108
109 The following example deletes a mirror, mymirror, with a submirror in
110 an error state.
111
112
113 # metaclear -f mymirror
114
115
116
117
118 The following example deletes a hot spare pool, hsp001.
119
120
121 # metaclear hsp001
122
123
124
125
126 The following example deletes a soft partition, d23.
127
128
129 # metaclear d23
130
131
132
133
134 The following example purges all soft partitions on the slice c2t3d5s2
135 if those partitions are not being used by other metadevices or are not
136 open.
137
138
139 # metaclear -p c2t3d5s2
140
141
142
143
144 The following example purges soft partitions from a metadevice.
145
146
147 # metaclear -p d2
148 d3: Soft Partition is cleared
149 d4: Soft Partition is cleared
150 d5: Soft Partition is cleared
151
152
153
155 The following exit values are returned:
156
157 0 Successful completion.
158
159
160 >0 An error occurred.
161
162
164 See attributes(5) for descriptions of the following attributes:
165
166
167
168
169 ┌─────────────────────────────┬─────────────────────────────┐
170 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
171 ├─────────────────────────────┼─────────────────────────────┤
172 │Availability │SUNWmdu │
173 ├─────────────────────────────┼─────────────────────────────┤
174 │Interface Stability │Stable │
175 └─────────────────────────────┴─────────────────────────────┘
176
178 mdmonitord(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M),
179 metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M),
180 metarename(1M), metareplace(1M), metaroot(1M), metaset(1M), metas‐
181 sist(1M), metastat(1M), metasync(1M), metattach(1M), md.tab(4),
182 md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D)
183
184
185
186
187
188
189SunOS 5.11 26 Mar 2006 metaclear(1M)