Solaris Volume Manager Administration Guide

ProcedureHow to Attach a Submirror

Note –

An error message stating “can't attach labeled submirror to an unlabeled mirror” indicates that you unsuccessfully attempted to attach a RAID-0 volume to a mirror. A labeled volume (submirror) is a volume whose first component starts at cylinder 0, while an unlabeled volume's first component starts at cylinder 1. To prevent the labeled submirror's label from being corrupted, Solaris Volume Manager does not allow labeled submirrors to be attached to unlabeled mirrors.

Before You Begin

Read Creating and Maintaining RAID-1 Volumes.

  1. Identify the component (concatenation or stripe) to be used as a submirror.

    The component must be the same size as, or larger than the existing submirror in the mirror. If you have not yet created a volume to be a submirror, see Creating RAID-0 (Stripe) Volumes or Creating RAID-0 (Concatenation) Volumes.

  2. Make sure that you have root privilege and that you have a current backup of all data.

  3. Verify that the status of the mirror you want to work with is in an “Okay” state using the metastat command.

    # metastat mirror
  4. Use one of the following methods to attach a submirror.

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node. Choose the mirror. Then, choose Action⇒Properties and click the Submirror tab. Follow the onscreen instructions. For more information, see the online help.

    • Use the metattach mirror submirror command.

      # metattach mirror submirror

    See the metattach(1M) man page for more information.

  5. View the status of the mirror using the metastat command.

    # metastat mirror

Example 11–8 Attaching a Submirror

# metastat d30
d30: mirror
    Submirror 0: d60
      State: Okay   
# metattach d30 d70
d30: submirror d70 is attached
# metastat d30
d30: mirror
    Submirror 0: d60
      State: Okay        
    Submirror 1: d70
      State: Resyncing
    Resync in progress: 41 % done
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 2006130 blocks

This example shows the attaching of a submirror, d70, to a one-way mirror, d30. You create a two-way mirror when your attach the submirror to the mirror. The mirror d30 initially consists of submirror d60. The submirror d70 is a RAID-0 volume. You verify that the status of the mirror is “Okay” with the metastat command, then attach the submirror. When the metattach command is run, the new submirror is resynchronized with the existing mirror. When you attach an additional submirror to the mirror, the system displays a message. To verify that the mirror is resynchronizing, use the metastat command.