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. |
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.
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.
Make sure that you have root privilege and that you have a current backup of all data.
Check Background Information for Changing RAID 1 Volume Options.
Use one of the following methods to change mirror options.
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.
Use the metaparam command to display and change a mirror's options. For example, to change a mirror to “first”, rather than round-robin, for reading, use the following:
# metaparam -r first mirror |
See RAID 1 Volume Options for a description of mirror options. Also see the metaparam(1M) man page.
# metaparam -r geometric d30 # metaparam d30 d30: mirror current parameters are: Pass: 1 Read option: geometric (-g) Write option: parallel (default) |
In this example, the -r option changes a mirror's read policy to geometric.
# metaparam -w serial d40 # metaparam d40 d40: mirror current parameters are: Pass: 1 Read option: roundrobin (default) Write option: serial (-S) |
In this example, the -w option changes a mirror's write policy to serial.
# metaparam -p 5 d50 # metaparam d50 d50: mirror current parameters are: Pass: 5 Read option: roundrobin (default) Write option: parallel (default) |
In this example, the -p option changes a mirror's pass number to 5.
Make sure that you have root privilege and that you have a current backup of all data.
Use one of the following methods to expand a mirror.
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 metattach command to attach additional slices to each submirror. For example, to attach a component to a submirror, use the following:
# metattach submirror component |
Each submirror in a mirror must be expanded. See the metattach(1M) man page for more information.
# metastat d8: Mirror Submirror 0: d9 State: Okay Submirror 1: d10 State: Okay ... # metattach d9 c0t2d0s5 d9: component is attached # metattach d10 c0t3d0s5 d10: component is attached |
This example shows how to expand a mirrored mounted file system by concatenating two disk drives to the mirror's two submirrors. The mirror is named d8 and contains two submirrors named d9 and d10.
For a UFS, run the growfs(1M) command on the mirror volume. See How to Expand a File System.
An application, such as a database, that uses the raw volume must have its own way of growing the added space.