metaclear - delete active metadevices and hot spare pools
/usr/sbin/metaclear [-s setname] -a [-f]
/usr/sbin/metaclear [-s setname] [-f] metadevice... hot_spare_pool...
/usr/sbin/metaclear [-s setname] -r [-f] metadevice... hot_spare_pool...
/usr/sbin/metaclear [-s setname] -p component
/usr/sbin/metaclear [-s setname] -p metadevice
The metaclear command deletes the specified metadevice or hot_spare_pool, or purges all soft partitions from the designated component. Once a metadevice or hot spare pool is deleted, it must be re-created using metainit before it can be used again.
Any metadevice currently in use (open) cannot be deleted.
Root privileges are required for all of the following options except –h.
Deletes all metadevices and configured hot spare pools in the set named by –s, or the local set by default.
Deletes (forcibly) a metadevice that contains a subcomponent in an error state.
Displays usage message.
Deletes (purges) all soft partitions from the specified metadevice or component.
Recursively deletes specified metadevices and hot spare pools, but does not delete metadevices on which others depend.
Specifies the name of the diskset on which metaclear will work. Using the –s option causes the command to perform its administrative function within the specified diskset. Without this option, the command performs its function on local metadevices and/or hot spare pools.
Specifies the name(s) of the metadevice(s) to be deleted.
Specifies the c*d*t*s* name(s) of the components containing soft partitions to be deleted.
Specifies the name(s) of the hot spare pools to be deleted. Names for hot spare pools can be any legal file name that is composed of alphanumeric characters, a dash (“-”), an underscore (“_”), or a period (“.”). Names must begin with a letter. The words “all” and “none“ are reserved and cannot be used.
The following example deletes a metadevice named d10.
# metaclear /dev/md/dsk/d10
The following example deletes all local metadevices and hot spare pools on the system.
# metaclear -a
The following example deletes a mirror, mymirror, with a submirror in an error state.
# metaclear -f mymirror
The following example deletes a hot spare pool, hsp001.
# metaclear hsp001
The following example deletes a soft partition, d23.
# metaclear d23
The following example purges all soft partitions on the slice c2t3d5s2 if those partitions are not being used by other metadevices or are not open.
# metaclear -p c2t3d5s2
The following example purges soft partitions from a metadevice.
# metaclear -p d2 d3: Soft Partition is cleared d4: Soft Partition is cleared d5: Soft Partition is cleared
The following exit values are returned:
An error occurred.
See attributes(7) for descriptions of the following attributes:
md(4D), md.cf(5), md.tab(5), md.tab(5), mddb.cf(5), attributes(7), metattach(8), mdmonitord(8), metadb(8), metadetach(8), metahs(8), metainit(8), metaoffline(8), metaonline(8), metaparam(8), metarecover(8), metarename(8), metareplace(8), metaset(8), metassist(8), metastat(8), metasync(8)