How to Replace a Failed Disk Mirrored with the raidctl Command in Solaris

This post describes the process of replacing a failed disk with the raidctl command in the mirroring configuration on the Sun Fire V440 server.

Hardware Disk Layout:

Disk Slot Number    Logical Device Name[1]             Physical Device Name
Slot 0            c1t0d0                /devices/pci@1f,700000/scsi@2/sd@0,0
Slot 1            c1t1d0                /devices/pci@1f,700000/scsi@2/sd@1,0
Slot 2            c1t2d0                /devices/pci@1f,700000/scsi@2/sd@2,0
Slot 3            c1t3d0                /devices/pci@1f,700000/scsi@2/sd@3,0

How to Replace a Failed Disk Mirrored with the raidctl Command;

1. To confirm a failed disk, type the following command:

# raidctl
RAID      RAID              RAID     Disk
Volume    Status          Disk     Status
-----------------------------------------------
c1t1d0       DEGRADED          c1t1d0   OK
                                           c1t2d0   DEGRADED

This example indicates that the disk mirror has degraded due to a failure in disk c1t2d0. The raidctl command can also be used to determine the drive model:

# raidctl -l -g [disk] [controller]

For additional information see the manpages for raidctl.

# man raidctl

2. Install a new disk drive. The RAID utility automatically restores the data to the disk.

3. To check the status of a RAID rebuild, type the following command:

# raidctl
RAID      RAID                RAID      Disk
Volume    Status            Disk      Status
--------------------------------------------------
c1t1d0       RESYNCING        c1t1d0      OK
                              c1t2d0      OK

This example indicates that RAID volume c1t1d0 is resynchronizing. If you issue the command again some minutes later, it indicates that the RAID mirror is finished resynchronizing and is back online:

# raidctl
RAID      RAID                RAID      Disk
Volume    Status            Disk      Status
-------------------------------------------------
c1t1d0       OK                c1t1d0    OK
                               c1t2d0    OK