1metahs(1M)              System Administration Commands              metahs(1M)
2
3
4

NAME

6       metahs - manage hot spares and hot spare pools
7

SYNOPSIS

9       /usr/sbin/metahs [-s setname] -a all component
10
11
12       /usr/sbin/metahs [-s setname] -a hot_spare_pool [component]
13
14
15       /usr/sbin/metahs [-s setname] -d hot_spare_pool [component]
16
17
18       /usr/sbin/metahs [-s setname] -d all component
19
20
21       /usr/sbin/metahs [-s setname] -e component
22
23
24       /usr/sbin/metahs [-s setname] -r hot_spare_pool component-old
25
26
27       /usr/sbin/metahs [-s setname] -r all component-old component-new
28
29
30       /usr/sbin/metahs [-s setname] -i [hot_spare_pool]...
31
32

DESCRIPTION

34       The  metahs command manages existing hot spares and hot spare pools. It
35       is used to add, delete, enable, and replace components (slices) in  hot
36       spare  pools.  Like  the  metainit command, the metahs command can also
37       create an initial hot spare pool. The metahs command does not replace a
38       component  of  a  metadevice. This function is performed by the metare‐
39       place command.
40
41
42       Hot spares are always in one of three  states:  available,  in-use,  or
43       broken.  Available hot spares are running and ready to accept data, but
44       are not currently being written to or read from. In-use hot spares  are
45       currently  being written to and read from. Broken hot spares are out of
46       service and should be repaired. The status of hot spares  is  displayed
47       when metahs is invoked with the -i option.
48
49
50       Solaris  Volume  Manager  supports storage devices and logical volumes,
51       including hot spares, greater than 1 terabyte (TB) when Solaris  10  is
52       running a 64-bit kernel.
53
54
55       If a system with large volumes or hot spares is rebooted under a 32-bit
56       Solaris 10 kernel, the large volumes are visible through metastat  out‐
57       put, but they cannot be accessed, modified or deleted, and no new large
58       volumes can be created. Any volumes or file systems on a  large  volume
59       in  this situation are also unavailable. If a system with large volumes
60       is rebooted under a version of Solaris prior  to  Solaris  10,  Solaris
61       Volume Manager will not start. All large volumes must be removed before
62       Solaris Volume Manager runs under another version of the Solaris  Oper‐
63       ating Environment.
64

OPTIONS

66       Root  privileges  are  required for any of the following options except
67       -i.
68
69
70       The following options are supported:
71
72       -a all component
73
74           Add component to all hot spare pools. all is not case sensitive.
75
76
77       -a hot_spare_pool [component]
78
79           Add the component to the specified  hot_spare_pool.  hot_spare_pool
80           is created if it does not already exist.
81
82
83       -d all component
84
85           Delete component from all the hot spare pools. The component cannot
86           be deleted if it is in the in-use state.
87
88
89       -d hot_spare_pool [component]
90
91           Delete hot_spare_pool, if the hot_spare_pool is both empty and  not
92           referenced  by  a  metadevice.  If  component  is  specified, it is
93           deleted from the hot_spare_pool. Hot spares  in  the  in-use  state
94           cannot be deleted.
95
96
97       -e component
98
99           Enable component to be available for use as a hot spare. The compo‐
100           nent can be enabled if it is in  the  broken  state  and  has  been
101           repaired.
102
103
104       -i [hot_spare_pool...]
105
106           Display  the  status of the specified hot_spare_pool or for all hot
107           spare pools if one is not specified.
108
109
110       -r all component-old component-new
111
112           Replace component-old with component-new in  all  hot  spare  pools
113           which  have the component associated. Components cannot be replaced
114           from any hot spare pool if the old  hot  spare  is  in  the  in-use
115           state.
116
117
118       -r hot_spare_pool component-old component-new
119
120           Replace   component-old   with   component-new   in  the  specified
121           hot_spare_pool. Components cannot be replaced from a hot spare pool
122           if the old hot spare is in the in-use state.
123
124
125       -s setname
126
127           Specify the name of the diskset on which metahs works. Using the -s
128           option causes the command to perform  its  administrative  function
129           within the specified diskset. Without this option, the command per‐
130           forms its function on local hot spare pools.
131
132

OPERANDS

134       The following operands are supported:
135
136       component         The logical name for the physical  slice  (partition)
137                         on a disk drive, such as /dev/dsk/c0t0d0s2.
138
139
140       hot_spare_pool    Names  for hot spare pools can be any legal file name
141                         that is composed of alphanumeric characters,  a  dash
142                         ("-"),  an underscore ("_"), or a period ("."). Names
143                         must begin with a letter. The words "all" and  "none"
144                         are reserved and cannot be used.
145
146

EXAMPLES

148       Example 1 Adding a Hot Spare to a Hot Spare Pool
149
150
151       The following example adds a hot spare /dev/dsk/c0t0d0s7 to a hot spare
152       pool mirror1_pool:
153
154
155         # metahs -a mirror1_pool c0t0d0s7
156
157
158
159
160       When the hot spare is added to the pool, the existing order of the  hot
161       spares  already in the pool is preserved. The new hot spare is added at
162       the end of the list of hot spares in the hot spare pool specified.
163
164
165       Example 2 Adding a Hot Spare to All Currently Defined Pools
166
167
168       This example adds a hot spare to the hot spare pools that are currently
169       defined:
170
171
172         # metahs -a all c0t0d0s7
173
174
175
176
177       The  keyword  all  in  this  example  specifies  adding  the hot spare,
178       /dev/dsk/c0t0d0s7, to all the hot spare pools.
179
180
181       Example 3 Deleting a Hot Spare
182
183
184       This example deletes a hot spare, /dev/dsk/c0t0d0s7, from a  hot  spare
185       pool, hsp003:
186
187
188         # metahs -d hsp003 c0t0d0s7
189
190
191
192
193       When  you  delete a hot spare, the position of the remaining hot spares
194       in the pool changes to reflect the new order. For instance, if in  this
195       example  /dev/dsk/c0t0d0s7  were  the second of three hot spares, after
196       deletion the third hot spare would move to the second position.
197
198
199       Example 4 Replacing a Hot Spare
200
201
202       This example replaces a hot spare that was previously defined:
203
204
205         # metahs -r hsp001 c0t1d0s0 c0t3d0s0
206
207
208
209
210       In this  example,  the  hot  spare  /dev/dsk/c0t1d0s0  is  replaced  by
211       /dev/dsk/c0t3d0s0. The order of the hot spares does not change.
212
213

EXIT STATUS

215       The following exit values are returned:
216
217       0     Successful completion.
218
219
220       >0    An error occurred.
221
222

ATTRIBUTES

224       See attributes(5) for descriptions of the following attributes:
225
226
227
228
229       ┌─────────────────────────────┬─────────────────────────────┐
230       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
231       ├─────────────────────────────┼─────────────────────────────┤
232       │Availability                 │SUNWmdu                      │
233       ├─────────────────────────────┼─────────────────────────────┤
234       │Interface Stability          │Stable                       │
235       └─────────────────────────────┴─────────────────────────────┘
236

SEE ALSO

238       mdmonitord(1M),      metaclear(1M),     metadb(1M),     metadetach(1M),
239       metainit(1M), metaoffline(1M), metaonline(1M),  metaparam(1M),  metare‐
240       cover(1M),  metarename(1M), metareplace(1M), metaroot(1M), metaset(1M),
241       metassist(1M), metastat(1M),  metasync(1M),  metattach(1M),  md.tab(4),
242       md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D)
243
244
245
246

WARNINGS

248       Do  not  create  large (>1 TB) volumes if you expect to run the Solaris
249       Operating Environment with a 32-bit kernel or if you expect  to  use  a
250       version of the Solaris Operating Environment prior to Solaris 10.
251
252
253
254SunOS 5.11                        26 Mar 2006                       metahs(1M)
Impressum