Replacing a disk on Sun Cluster 3

How to replace a disk on a Sun Cluster 3/3.1 cluster with a A5200 array or similar FCAL.

Obviously it's different depending on whether is under SVM or VxVM control.

VxVM

 * Check if the cluster is using 'CVM' (cluster volume manager).
 * vxdctl -c mode (If it shows master/slave then CVM is in use, DO OPERATIONS ON MASTER NODE).
 * Identify the failed drive  (note: if the device is 'failing' rather than 'failed' you need to 'remove a disk for replacement' in vxdiskadm first)
 * On the node hosting the device group: replace the device with luxadm
 * On the other node connected to the array: Run
 * On either node, reconfigure the DID info  then   (with the did returned from the first command)
 * On the node hosting the device group, then then 'replace a failed or removed disk' in vxdiskadm

SVM

 * Identify the failed drive  (note: if the device is 'failing' rather than 'failed' you need to detach the relevent plexes first)
 * On the node hosting the device group: replace the device with luxadm
 * On the other node connected to the array: Run devfsadm
 * On either node, reconfigure the DID info  then   (with the did returned from the first command)
 * On any node connected to the storage, copy the partition table from the mirrored disk to the new disk
 * On any node connected to the storage, delete and add back any broken metadb's
 * Repair the failed mirror
 * Repair the failed mirror
 * Repair the failed mirror
 * Repair the failed mirror