xref: /titanic_41/usr/src/man/man1m/metaclear.1m (revision f3312ec0e8acbd249df97358fb8c3ca92f4e089c)
te
Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved
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.
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.
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]
METACLEAR 1M "Mar 26, 2006"
NAME
metaclear - delete active metadevices and hot spare pools
SYNOPSIS

/usr/sbin/metaclear -h

/usr/sbin/metaclear [-s setname] -a [-f]

/usr/sbin/metaclear component

/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
DESCRIPTION

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.

OPTIONS

Root privileges are required for all of the following options except -h. -a

Deletes all metadevices and configured hot spare pools in the set named by -s, or the local set by default.

-f

Deletes (forcibly) a metadevice that contains a subcomponent in an error state.

-h

Displays usage message.

-p

Deletes (purges) all soft partitions from the specified metadevice or component.

-r

Recursively deletes specified metadevices and hot spare pools, but does not delete metadevices on which others depend.

-s setname

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.

OPERANDS
metadevice ...

Specifies the name(s) of the metadevice(s) to be deleted.

component

Specifies the c*d*t*s* name(s) of the components containing soft partitions to be deleted.

hot_spare_pool ...

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.

EXAMPLES

Example 1 Deleting Various Devices

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
EXIT STATUS

The following exit values are returned: 0

Successful completion.

>0

An error occurred.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface Stability Stable
SEE ALSO

mdmonitord(1M), metadb(1M), metadetach(1M), metahs(1M), metainit(1M), metaoffline(1M), metaonline(1M), metaparam(1M), metarecover(1M), metarename(1M), metareplace(1M), metaroot(1M), metaset(1M), metassist(1M), metastat(1M), metasync(1M), metattach(1M), md.tab(4), md.cf(4), mddb.cf(4), md.tab(4), attributes(5), md(7D)