Solstice DiskSuite 4.2.1 User's Guide

Mirror and Submirror Status (Command Line)

Running metastat(1M) on a mirror displays the state of each submirror, the pass number, the read option, the write option, and the size of the total number of blocks in the mirror. Refer to "How to Change a Mirror's Options (Command Line)" to change a mirror's pass number, read option, or write option.

Here is sample mirror output from metastat.


# 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, metastat 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.

Table 3-8 explains submirror states.

Table 3-8 Submirror States (Command Line)

State 

Meaning 

Okay 

The submirror has no errors and is functioning correctly. 

Resyncing 

The submirror is actively being resynced. 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 stripe in a submirror, metastat 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 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. Refer to "Overview of Replacing and Enabling Slices in Mirrors and RAID5 Metadevices".

Table 3-9 explains the slice states for submirrors and possible actions to take.

Table 3-9 Submirror Slice States (Command Line)

State 

Meaning 

Action 

Okay 

The slice has no errors and is functioning correctly. 

None. 

Resyncing 

The slice is actively being resynced. 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 resync is done. 

Maintenance 

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

Enable or replace the errored slice. See "How to Enable a Slice in a Submirror (Command Line)", or "How to Replace a Slice in a Submirror (Command Line)". Note: The metastat(1M) command will show an invoke recovery message with the appropriate action to take with the metareplace(1M) command. You can also use the metareplace -e command.

Last Erred 

The slice 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 slices in the "Maintenance" state. See "How to Enable a Slice in a Submirror (Command Line)", or "How to Replace a Slice in a Submirror (Command Line)". Usually, this error results in some data loss, so validate the mirror after it is fixed. For a file system, use the fsck(1M) command to validate the "metadata" then check the user-data. An application or database must have its own method of validating the metadata.