METATTACH(8) — MAINTENANCE COMMANDS
NAME
metattach, metadetach − attach or detach metadevice to or from metamirror
SYNOPSIS
/usr/etc/metattach [ −h ] [ −n ] metamirror metadevice
/usr/etc/metattach [ −i size ] −a metadevice component...
/usr/etc/metadetach [ −f ] [ −h ] metamirror submirror
AVAILABILITY
These programs are available with the Sun Online: DiskSuite software package.
DESCRIPTION
metattach attaches a metadevice to metamirror as a new submirror beneath the metamirror. It also is used to add a component to an existing metadevice without interrupting service. Components can not be added to metamirrors. To grow the size of a metamirror, the components must be added to all of the submirrors.
The metadisk driver software supports one-to-three-way mirrors. Thus, you can only attach a metadevice to a metamirror if there are two or fewer submirrors beneath the metamirror.
Once a new metadevice is attached, metattach will automatically start a resync operation to the new submirror, unless the option -n is specified on the command line. If no resync is started, then metasync(8) must be used before the submirror can be used.
metadetach detaches the metadevice from the metamirror. Once detached, the metadevice is no longer part of the metamirror, thus reads and writes to and from the metadevice via the metamirror are no longer performed, through the metamirror. Detaching the only existing submirror is not allowed. Detaching submirror that have components that are reported as needing maintenance (by metastat(8)) is not allowed unless the −f (force) flag is used.
OPTIONS
−i Specifies the interlace value for stripes. Where size is a value specified in either kilobytes, megabytes, or blocks. The interlace size number is followed by either “k” for kilobytes, “m” for megabytes, or “b” for blocks. The units can be either upper case or lower case. If size is not specified, the size defaults to the interlace size of the last stripe of the metadevice. When an interlace size change is made on a stripe, it will be carried forward on all stripes that follow.
−f Force detaching metadevices that have components that need maintenance.
−h Display a help message.
−n Specifies no resync(s) will be performed.
−a Adds a component to an existing metadevice. The metadevice can not be a metamirror. If more than one component is specified, the components are added as a stripe.
SEE ALSO
md(4s), md.conf(5), mddb.conf(5), metatab(5), metaclear(8), metad(8), metadb(8), metahs(8), metainit(8), metaoffline(8), metaparam(8), metareplace(8), metastat(8), metasync(8)
Sun Online: DiskSuite Administration Guide
System and Network Administration
CAVEAT
When a submirror is detached from its metamirror, the data on the metadevice is the same as the data that existed prior to running metadetach. In order to verify the data, fsck(8) may need to be invoked if the file system was not locked.
Sun Release 4.1 — Last change: 25 June 1991