Procedure for replacing a faulty zfs mirrored disk in Solaris rpool on a SPARC System

Procedure for replacing a faulty zfs mirrored disk in Solaris rpool on a SPARC System

Procedure for replacing a faulty zfs mirrored disk in Solaris rpool on a SPARC System

1 - Determine which disk is faulty
- format output
- cfgadm output
- iostat -E
- zpool status
2 - Remove the disk from the rpool
- zpool offline rpool c0t5000C5003AFF981Bd0
        NAME                       STATE      READ WRITE CKSUM
        rpool                      DEGRADED      0     0     0
          mirror-0                 DEGRADED      0     0     0
            c0t5000C5003AFF981Bd0  OFFLINE       0     0     0
            c0t5000C5003B0013D7d0  ONLINE        0     0     0
3 - Unconfigure the disk

c3                             connected    configured   unknown
unavailable  scsi-sas     n        /devices/pci@400/pci@1/pci@0/pci@4/scsi@0/iport@4:scsi
c3::w5000c5003aff9819,0        connected    configured   unknown    Client Device: /dev/dsk/c0t5000C5003AFF981Bd0s0(sd5)
unavailable  disk-path    n        /devices/pci@400/pci@1/pci@0/pci@4/scsi@0/iport@4:scsi::w5000c5003aff9819,0

- cfgadm -c unconfigure c3::w5000c5003aff9819,0
4 - Wait for the blue led to indicate it is save to pull the disk
- Remove the faulty disk
- Wait a few minutes
- Insert the new disk
5 - Verify the new disk inserted has been configured with cfgadm
- cfgadm -avl
c3                             connected    configured   unknown
unavailable  scsi-sas     n        /devices/pci@400/pci@1/pci@0/pci@4/scsi@0/iport@4:scsi
c3::w5000c5003aff9819,0        connected    configured   unknown    Client Device: /dev/dsk/c0t5000C5003AFF981Bd0s0(sd5)
unavailable  disk-path    n        /devices/pci@400/pci@1/pci@0/pci@4/scsi@0/iport@4:scsi::w5000c5003aff9819,0
- If not, run cfgadm -c configure <disk>
6 - Complete the zfs part of the replacement
- zpool replace rpool <disk currently in rpool> <new disk to be added to rpool>
- As we added the disk with the same wwn, we only has to online the disk and not replace it
- zpool online rpool c0t5000C5003AFF981Bd0
7 - Install the boot block on the new disk
- installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk//dev/rdsk/c0t5000C5003AFF981Bd0s0