Replacing a failed zpool ZFS drive

We have a Sun X4500 ‘Thumper’ that recently had a failed drive. Our zpools are all raidz2 with 4 spares. We were getting errors on the disk c1t5d0, although the drive hadn’t failed completely.

As we had not yet tested replacing a ‘live’ drive the disk was pulled from the system before running any commands to remove it from the pool.

You can run the following command to see the status of your pools –

zpool status

Our pool was showing as degraded and that a spare drive had been brought online –

raidz2      DEGRADED     0     0     0<br>
c0t5d0    ONLINE       0     0     0<br>
c0t6d0    ONLINE       0     0     0<br>
spare     DEGRADED     0     0     0<br>
c1t5d0  UNAVAIL      0     0     0  cannot open<br>
c1t0d0  ONLINE       0     0     0<br>

To remove the failed disk from the pool we ran the command –

zpool detach zpoolname c1t5d0

Now our pool showed as being online and all that was left to do was to set up the replaced drive to be a new spare.

First we have to configure it in Solaris. To check that the system is seeing the drive run –


and there was our new, unconfigured drive –

sata1/5                        disk         connected    unconfigured unknown

To configure the disk in Solaris run –

cfgadm -cconfigure sata1/5::dsk/c1t5d0

and then just add it to the pool as a spare –

zpool add zpoolname spare c1t5d0