Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
10.  RAID 1 (Mirror) Volumes (Tasks) Working with Submirrors How to Place a Submirror Offline and Online Example--Placing a Submirror Online  Previous   Contents   Next 
   
 

How to Enable a Slice in a Submirror

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

  2. Read "Overview of Replacing and Enabling Components in RAID 1 and RAID 5 Volumes" and "Background Information for RAID 1 Volumes".

  3. 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 Components tab. Follow the instructions on screen. 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--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.


Note - If a physical disk is defective, you can either 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/replace the disk, format it, and run the metareplace command with the -e option as shown in this example.


Maintaining RAID 1 Volumes

Solaris Volume Manager reports status information on RAID 1 volumes and submirrors so a system administrator can determine what, if any, maintenance action is required. The following table explains mirror states.

Table 10-1 Submirror States

State

Meaning

Okay

The submirror has no errors and is functioning correctly.

Resyncing

The submirror is actively being resynchronized. An error has occurred and been corrected, the submirror has just been brought back online, or a new submirror has been added.

Needs Maintenance

A slice (or slices) in the submirror has encountered an I/O error or an open error. All reads and writes to and from this slice in the submirror have been discontinued.

Additionally, for each slice in a submirror, the metastat command shows the "Device" (device name of the slice in the stripe); "Start Block" on which the slice begins; "Dbase" to show if the slice contains a state database replica; "State" of the slice; and "Hot Spare" to show the slice being used to hot spare a failed slice.

The slice state is perhaps the most important information when you are troubleshooting mirror errors. The submirror state only provides general status information, such as "Okay" or "Needs Maintenance." If the submirror reports a "Needs Maintenance" state, refer to the slice state. You take a different recovery action if the slice is in the "Maintenance" or "Last Erred" state. If you only have slices in the "Maintenance" state, they can be repaired in any order. If you have a slices in the "Maintenance" state and a slice in the "Last Erred" state, you must fix the slices in the "Maintenance" state first then the "Last Erred" slice. See "Overview of Replacing and Enabling Components in RAID 1 and RAID 5 Volumes".

The following table explains the slice states for submirrors and possible actions to take.

Table 10-2 Submirror Slice States

State

Meaning

Action

Okay

The component has no errors and is functioning correctly.

None.

Resyncing

The component is actively being resynchronized. An error has occurred and been corrected, the submirror has just been brought back online, or a new submirror has been added.

If desired, monitor the submirror status until the resynchronization is done.

Maintenance

The component has encountered an I/O error or an open error. All reads and writes to and from this component have been discontinued.

Enable or replace the failed component. See "How to Enable a Slice in a Submirror", or "How to Replace a Slice in a Submirror". The metastat command will show an invoke recovery message with the appropriate action to take with the metareplace command. You can also use the metareplace -e command.

Last Erred

The component has encountered an I/O error or an open error. However, the data is not replicated elsewhere due to another slice failure. I/O is still performed on the slice. If I/O errors result, the mirror I/O will fail.

First, enable or replace components in the "Maintenance" state. See "How to Enable a Slice in a Submirror", or "How to Replace a Slice in a Submirror". Usually, this error results in some data loss, so validate the mirror after it is fixed. For a file system, use the fsck command, then check the data. An application or database must have its own method of validating the device.

How to Check the Status of Mirrors and Submirrors

  • Use one of the following methods to check mirror or submirror status.

    • From the Enhanced Storage tool within the Solaris Management Console, open the Volumes node, choose the mirror, then choose Action->Properties. Follow the instructions on screen. For more information, see the online help.

    • Run the metastat command on a mirror to see the state of each submirror, the pass number, the read option, the write option, and the size of the total number of blocks in mirror. For example, to check the status of the one-way mirror d70, use:

      # metastat d70
      d70: Mirror
          Submirror 0: d71
            State: Okay         
          Pass: 1
          Read option: roundrobin (default)
          Write option: parallel (default)
          Size: 12593637 blocks
      
      d71: Submirror of d70
          State: Okay         
          Size: 12593637 blocks
          Stripe 0:
              Device              Start Block  Dbase State        Reloc  Hot Spare
              c1t3d0s3                   0     No    Okay         Yes    
          Stripe 1:
              Device              Start Block  Dbase State        Reloc  Hot Spare
              c1t3d0s4                   0     No    Okay         Yes    
          Stripe 2:
              Device              Start Block  Dbase State        Reloc  Hot Spare
              c1t3d0s5                   0     No    Okay         Yes    

      See "How to Change RAID 1 Volume Options" to change a mirror's pass number, read option, or write option.

      See metastat(1M) for more information about checking device status.

Example--Checking Status of RAID 1 Volumes

Here is sample output from the metastat command.

# metastat
d0: Mirror
    Submirror 0: d1
      State: Okay        
    Submirror 1: d2
      State: Okay        
    Pass: 1
    Read option: roundrobin (default)
    Write option: parallel (default)
    Size: 5600 blocks
 
d1: Submirror of d0
    State: Okay        
    Size: 5600 blocks
    Stripe 0:
        Device              Start Block  Dbase State        Hot Spare
        c0t2d0s7                   0     No    Okay        
 
...

For each submirror in the mirror, the metastat command shows the state, an "invoke" line if there is an error, the assigned hot spare pool (if any), size in blocks, and information about each slice in the submirror.

 
 
 
  Previous   Contents   Next