Solaris Volume Manager Administration Guide

Example—Replacing a RAID 5 Component


# metastat d1
d1: RAID
State: Needs Maintenance
    Invoke: metareplace d1 c0t14d0s6 <new device>
    Interlace: 32 blocks
    Size: 8087040 blocks
Original device:
    Size: 8087520 blocks
	Device              Start Block  Dbase State        Hot Spare
	c0t9d0s6                 330     No    Okay        
	c0t13d0s6                330     No    Okay        
	c0t10d0s6                330     No    Okay        
	c0t11d0s6                330     No    Okay        
	c0t12d0s6                330     No    Okay        
	c0t14d0s6                330     No    Maintenance
 
# metareplace d1 c0t14d0s6 c0t4d0s6
d1: device c0t14d0s6 is replaced with c0t4d0s6
# metastat d1
d1: RAID
    State: Resyncing
    Resync in progress: 98% done
    Interlace: 32 blocks
    Size: 8087040 blocks
Original device:
    Size: 8087520 blocks
	Device              Start Block  Dbase State        Hot Spare
	c0t9d0s6                 330     No    Okay        
	c0t13d0s6                330     No    Okay        
	c0t10d0s6                330     No    Okay        
	c0t11d0s6                330     No    Okay        
	c0t12d0s6                330     No    Okay
	c0t4d0s6                 330     No    Resyncing

In this example, the metastat command displays the action to take to recover from the failed slice in the d1 RAID 5 volume. After locating an available slice, the metareplace command is run, specifying the failed slice first, then the replacement slice. (If no other slices are available, run the metareplace command with the -e option to attempt to recover from possible soft errors by resynchronizing the failed device.) If multiple errors exist, the slice in the “Maintenance” state must first be replaced or enabled. Then the slice in the “Last Erred” state can be repaired. After the metareplace command, the metastat command monitors the progress of the resynchronization. During the replacement, the state of the volume and the new slice will is “Resyncing.” You can continue to use the volume while it is in this state.


Note –

You can use the metareplace command on non-failed devices to change a disk slice or other component. This procedure can be useful for tuning the performance of RAID 5 volumes.