TO replace disk in zfs rpool.
# prtconf -vp |grep -i bootpath
bootpath: '/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/disk@0,0:a'(faulted disk)
# ls -l /dev/rdsk/c1t0d0s0
lrwxrwxrwx 1 root root 65 Mar 11 2010 /dev/rdsk/c1t0d0s0 -> ../../devices/pci@10,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0:a,raw
# ls -ld /dev/rdsk/c0t0d0s0
lrwxrwxrwx 1 root root 64 Mar 11 2010 /dev/rdsk/c0t0d0s0 -> ../../devices/pci@0,600000/pci@0/pci@8/pci@0/scsi@1/sd@0,0:a,raw
# cfgadm -c unconfigure c0::dsk/c0t0d0
<Physically remove failed disk c0t0d0>
<Physically insert replacement disk c0t0d0>
Once replacement is done ,we will configure the disk
# cfgadm -c configure c0::dsk/c0t0d0
echo |format |grep –i c0t0d0
prtvtoc /dev/rdsk/c1t0d0s2 | fmthard -s - /dev/rdsk/c0t0d0s2
label the new device with SMI as it is zfs rpool.
# zpool replace rpool c0t0d0s0
Make sure to wait until resilver is done before rebooting
# zpool online rpool c0t0d0s0
# zpool status rpool
# zpool status rpool
pool: rpool
state: DEGRADED
status: One or more devices is currently being resilvered. The pool will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Thu Feb 4 12:16:01 2016
24.5G scanned out of 114G at 56.1M/s, 0h27m to go
24.5G resilvered, 21.41% done
config:
NAME STATE READ WRITE CKSUM
rpool DEGRADED 0 0 0
mirror-0 DEGRADED 0 0 0
replacing-0 DEGRADED 0 0 0
c0t0d0s0/old FAULTED 0 951 0 too many errors
c0t0d0s0 ONLINE 0 0 0 (resilvering)
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
Once resilveing done automatically c0t0d0s0/old will get removed.
# zpool status rpool
pool: rpool
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scan: resilvered 114G in 0h51m with 0 errors on Thu Feb 4 13:07:55 2016
config:
NAME STATE READ WRITE CKSUM
rpool ONLINE 0 0 0
mirror-0 ONLINE 0 0 0
c0t0d0s0 ONLINE 0 0 0
c1t0d0s0 ONLINE 0 0 0
errors: No known data errors
<Let disk resilver before installing the boot blocks>
SPARC# installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t0d0s0