DiskSuite supports one-to-three-way mirrors. Thus, you can only attach a metadevice to a mirror if there are two or fewer submirrors beneath the mirror. Once a new metadevice is attached to a mirror, metattach will automatically start a resync operation to the new submirror.
Attaching a new logging device to a busy trans metadevice is allowed, although a trans metadevice will start using its new logging device only after the trans is idle (after it is unmounted, for example). The busy trans will be in an Attaching state (metastat) until the logging device is actually attached. Attaching a logging device in the Hard Error or Error state (metastat) is not allowed.
metadetach is used to detach submirrors from mirrors, or detach logging devices from trans metadevices.
When a submirror is detached from a mirror, it is no longer part of the mirror, thus reads and writes to and from that metadevice via the mirror are no longer performed through the mirror. Detaching the only existing submirror is not allowed. Detaching a submirror that has slices reported as needing maintenance (by metastat) is not allowed unless the -f (force) flag is used.
metadetach also detaches the logging device from a trans. Once detached, the logging device is no longer part of the trans, thus the trans is no longer logging and all benefits of logging are lost. Any information on the logging device that pertains to the master device is written to the master device before the logging device is detached.
Detaching the logging device from a busy trans device is not allowed unless the -f (force) flag is used. Even so, the logging device is not actually detached until the trans is idle. The trans is in the Detaching state (metastat) until the logging device is detached.
metadevice
Specifies the name of the metadevice to be attached to the mirror as a submirror. This metadevice must have been previously created by the metainit command.
concat/stripe
Specifies the metadevice name of the concatenation, stripe, or concatenation of stripes.
component...
The logical name for the physical slice (partition) on a disk drive, such as /dev/dsk/c0t0d0s2, being added to the concatenation, stripe, concatenation of stripes, or RAID5 metadevice.
RAID
Specifies the metadevice name of the RAID5 metadevice.
trans
Specifies the metadevice name of the trans metadevice (not the master or logging device).
log
Specifies the metadevice name of the logging device to be attached to the trans metadevice.
submirror
The metadevice name of the submirror to be detached from the mirror.
# metattach d8 /dev/dsk/c0t1d0s2
This example adds four slices to an existing metadevice, d9. (Afterwards, you would use the growfs command to expand the file system.)
# metattach d9 /dev/dsk/c0t1d0s2 /dev/dsk/c0t2d0s2 \ /dev/dsk/c0t3d0s2 /dev/dsk/c0t4d0s2
This example detaches the logging device from a trans metadevice d9. Notice that you do not have to specify the logging device itself, as there can only be one.
# metadetach d9
This example expands a RAID5 metadevice, d45, by attaching another slice.
# metattach d45 /dev/dsk/c3t0d0s2
When you add additional slices to a RAID5 metadevice, the additional space is devoted to data. No new parity blocks are allocated. The data on the added slices is, however, included in the overall parity calculations, so it is protected against single device failure.
This example adds space to a two-way mirror by adding a slice to each submirror. (Afterwards, you would use the growfs command to expand the file system.)
# metattach d9 /dev/dsk/c0t2d0s5
# metattach d10 /dev/dsk/c0t3d0s5
This example detaches a submirror, d2, from a mirror, d4.
# metadetach d4 d2
Solstice DiskSuite User's Guide, Solstice DiskSuite Reference