November 17, 2005
Primary Hard Drive Replaced
Tags: RAHU

The first hard drive (c1t0d0) failed a few days ago, and Sun shipped out a replacement today. I have replaced the drives and the mirrors are currently resyncing.

The replacement procedure is as follows:

  • Install new drive in spare drive slot, then run devfsadm to make Solaris recognize the new drive.
  • Run dd if=/dev/rdsk/c#t#d#s2 of=/dev/rdsk/c#t#d#s2 and cancel shortly thereafter to copy the partition table to the new drive (input is remaining good drive, output is new drive).
  • Remove the new drive from the spare drive slot.
  • For each mirror on the mirror set, run metadetach -f MIRROR SUBMIRROR followed by metaclear SUBMIRROR. This removes the failed drive from the mirror set.
  • If there are any state database replicas on the failed drive, run metadb -d c#t#d#s# to remove them.
  • Remove the failed drive.
  • Insert the new drive.
  • Run devfsadm to rebuild the devices.
  • Run metadevadm -u c#t#d# to tell SVM about the new drive information.
  • Recreate the state database replicas on the new drive with metadb -a -c # c#t#d#s#
  • For each mirror, run metainit SUBMIRROR 1 1 c#t#d#s# for the new drive, followed by metattach MIRROR SUBMIRROR to attach the mirror and begin resyncing.
Posted by Rowan Littell at November 17, 2005 04:04 PM, updated 08:02 PM November 17, 2005