Make sure that you have root privilege and that you have a current backup of all data.
Read Overview of Replacing and Enabling Components in RAID 1 and RAID 5 Volumes and Background Information for RAID 1 Volumes.
Use one of the following methods to replace a slice in 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 following form of the metareplace command to replace a slice in a submirror:
metareplace {mirror-name} {component-name…}mirror-name is the name of the volume to create.
component-name specifies the name of the component that is to be replaced.
See the following examples and the metainit(1M) man page for more information.
The following example illustrates how to replace a failed slice when the system is not configured to use hot spare pools for the automatic replacement of failed disks. See Chapter 15, Hot Spare Pools (Overview) for more information about using hot spare pools.
# metastat d6 d6: Mirror Submirror 0: d16 State: Okay Submirror 1: d26 State: Needs maintenance ... d26: Submirror of d6 State: Needs maintenance Invoke: metareplace d6 c0t2d0s2 <new device> ... # metareplace d6 c0t2d0s2 c0t2d2s2 d6: device c0t2d0s2 is replaced with c0t2d2s2 |
The metastat command confirms that mirror d6 has a submirror, d26, with a slice in the “Needs maintenance” state. The metareplace command replaces the slice as specified in the “Invoke” line of the metastat output with another available slice on the system. The system confirms that the slice is replaced, and starts resynchronizing the submirror.