Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Solaris Volume Manager Administration Guide
Previous Next

Working With Submirrors

How 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-7 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.

How to Detach a Submirror

Before You Begin

Read Creating and Maintaining RAID-1 Volumes.

  1. Make sure that you have root privilege. Make sure that you have a current backup of all data.
  2. Verify that the status of the mirror you want to work with is in an “Okay” state using the metastat command.
  3. Use one of the following methods to detach 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 metadetach command to detach a submirror from a mirror.

      # metadetach mirror submirror

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

Example 11-8 Detaching a Submirror
# metastat
d5: mirror
    Submirror 0: d50
...
# metadetach d5 d50
d5: submirror d50 is detached

In this example, mirror d5 has a submirror, d50. You detach the submirror with the metadetach command. The underlying slices from d50 can be reused elsewhere. After the submirror is detached from the mirror, the system displays a confirmation message.

How to Place a Submirror Offline and Online

The metaonline command can only be used when a submirror was taken offline by the metaoffline command. After the metaonline command runs, Solaris Volume Manager automatically begins resynchronizing the submirror with the mirror.


Note - The metaoffline command's capabilities are similar to the capabilities offered by the metadetach command. However, the metaoffline command does not sever the logical association between the submirror and the mirror.


Before You Begin

Read Creating and Maintaining RAID-1 Volumes.

  1. Make sure that you have root privilege and that you have a current backup of all data.
  2. Use one of the following methods to place a submirror online or offline.
    • 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 metaoffline command to a submirror offline.

      # metaoffline mirror submirror

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

    • Use the metaonline command to place a submirror online.

      # metaonline mirror submirror

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

Example 11-9 Placing a Submirror Offline
# metaoffline d10 d11
d10: submirror d11 is offlined

In this example, submirror d11 is taken offline from mirror d10. Reads continue to be made from the other submirror. The mirror is out of sync as soon as the first write is made. This inconsistency is corrected when the offlined submirror is brought back online.

Example 11-10 Placing a Submirror Online
# metaonline d10 d11d10: submirror d11 is onlined

In this example, submirror d11 is brought back online in mirror d10.

How to Enable a Slice in a Submirror

Before You Begin

Read Overview of Replacing and Enabling Components in RAID-1 and RAID-5 Volumes and Creating and Maintaining RAID-1 Volumes.

  1. Make sure that you have root privilege and that you have a current backup of all data.
  2. Use one of the following methods to enable a slice in 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 metareplace command to enable a failed slice in a submirror.

      # metareplace -e mirror failed-slice 

      The metareplace command automatically starts a resynchronization to synchronize the repaired or replaced slice with the rest of the mirror.

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

Example 11-11 Enabling a Slice in a Submirror
# metareplace -e d11 c1t4d0s7
d11: device c1t4d0s7 is enabled

In this example, the mirror d11 has a submirror that contains slice, c1t4d0s7, which had a soft error. The metareplace command with the -e option enables the failed slice.

If a physical disk is defective, you can replace it with another available disk (and its slices) on the system as documented in How to Replace a Slice in a Submirror. Alternatively, you can repair or replace the disk, format it, and then run the metareplace command with the -e option as shown in this example.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire