Solstice DiskSuite 4.2.1 User's Guide

Example -- Replacing a RAID5 Slice


# 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
# metatstat 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

The metastat command displays the action to take to recover from the errored slice in the d1 RAID5 metadevice. After locating an available slice, the metareplace command is run, specifying the errored slice first, then the replacement slice. (If no other slices are available, run the metareplace(1M) command with the -e option to attempt to recover from possible soft errors by resyncing the errored device.) If multiple errors exist, the slice in the "Maintenance" state must first be replaced or enabled first. Then the slice in the "Last Erred" state can be repaired. After the metareplace, metastat monitors the progress of the resync. During the replacement, the state of the metadevice and the new slice will be "Resyncing." You can continue to use the metadevice while it is in this state.


Note -

You can use the metareplace(1M) command on non-errored devices to change a disk (slice). This can be useful for tuning performance of RAID5 metadevices.