metahs
Maintenance Commands metahs(1M)NAME
metahs - manage hot spares and hot spare poolsSYNOPSIS
metahs [ -s setname ] -a all component metahs [ -s setname ] -a hot_spare_pool [ component ] metahs [ -s setname ] -d hot_spare_pool [ component ] metahs [ -s setname ] -d all component metahs [ -s setname ] -e component metahs [ -s setname ] -r hot_spare_pool component-old metahs [ -s setname ] -r all component-old component-new metahs [ -s setname ] -i [ hot_spare_pool... ]DESCRIPTION
The metahs command manages existing hot spares and hot spare pools. It is used to add, delete, enable, and replace com- ponents (slices) in hot spare pools. Like the metainit com- mand, the metahs command can also create an initial hot spare pool. The metahs command does not replace a component of a metadevice. This function is performed by the metare- place command. 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 metahs is invoked with the -i option.OPTIONS
Root privileges are required for any of the following options except -i. -a all component Adds component to all hot spare pools. all is not case sensitive. -a hot_spare_pool [ component ] Adds the component to the specified hot_spare_pool. hot_spare_pool is created if it does not already exist. -d all component Deletes component from all the hot spare pools. The component cannot be deleted if it is in the in-use state. -d hot_spare_pool [ component ] Deletes hot_spare_pool, if the hot_spare_pool is both empty and not referenced by a metadevice. If component is specified, it is deleted from the hot_spare_pool. Hot spares in the in-use state cannot be deleted. -e component Enables component to be available for use as a hot spare. The component can be enabled if it is in the broken state and has been repaired. -i [ hot_spare_pool ... ] Displays the status of the specified hot_spare_pool or for all hot spare pools if one is not specified. -r all component-old component-new Replace component-old with component-new in all hot spare pools which have the component associated. Com- ponents cannot be replaced from any hot spare pool if the old hot spare is in the in-use state. -r hot_spare_pool component-old component-new Replaces component-old with component-new in the speci- fied hot_spare_pool. Components cannot be replaced from a hot spare pool if the old hot spare is in the in-use state. -s setname Specifies the name of the diskset on which metahs will work. Using the -s option will cause the command to perform its administrative function within the speci- fied diskset. Without this option, the command will perform its function on local hot spare pools. component The logical name for the physical slice (partition) on a disk drive, such as /dev/dsk/c0t0d0s2. hot_spare_pool Hot spare pools must be of the form hspnnn, where nnn is a number in the range 000-999. EXAMPLES The following example adds a hot spare /dev/dsk/c0t0d0s7 to a hot spare pool hsp003. # metahs -a hsp003 c0t0d0s7 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. This example adds a hot spare to the hot spare pools that are currently defined. # metahs -a all c0t0d0s7 The keyword all in this example specifies adding the hot spare, /dev/dsk/c0t0d0s7, to all the hot spare pools. This example deletes a hot spare, /dev/dsk/c0t0d0s7, from a hot spare pool, hsp003. # metahs -d hsp003 c0t0d0s7 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 /dev/dsk/c0t0d0s7 were the second of three hot spares, after deletion the third hot spare would move to the second position. This example replaces a hot spare that was previously defined. # metahs -r hsp001 c0t1d0s0 c0t3d0s0 In this example, the hot spare /dev/dsk/c0t1d0s0 is replaced by /dev/dsk/c0t3d0s0. The order of the hot spares does not change.ATTRIBUTES
See attributes(5) for descriptions of the following attri- bute: box; cbp-1 | cbp-1 l | l . ATTRIBUTE TYPE ATTRIBUTE VALUE = Availability SUNWmduSEE ALSO
metaclear(1M), metadb(1M), metadetach(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metareplace(1M), metaroot(1M), metaset(1M), metastat(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4), mddb.cf(4) Solstice DiskSuite User's Guide, Solstice DiskSuite Refer- ence SunOS 5.8 Last change: 1 Oct 1999 3