zfs replacing a drive

Could some please confirm the steps too replace ad8 in this pool please no hot swap. The machine will be shutdown and the failing drive changed

Code:
bsd# zpool status
  pool: tank
 state: ONLINE
 scrub: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        tank        ONLINE       0     0     0
          mirror    ONLINE       0     0     0
            ad8     ONLINE       0     0     0
            ad10    ONLINE       0     0     0

errors: No known data errors

FreeBSD 7.1-RELEASE (GENERIC)

I have googled but things are still a bit unclear
Thank you
 
I would offline the failing disk, install new disk then replace:

Code:
# zpool offline tank ad10
... reboot and replace ...
# zpool replace tank ad10

This assumes that it's ad10 that's failing and that the new disk gets the same device name. If the device name changes the replace command needs to be slightly different:

Code:
# zpool replace tank ad10 {newdevice}

You could also 'detach' the failing disk, effectively making your pool a single unmirrored disk, then attach the new disk making it back into a mirror, I'd probably just use the offline/replace method though.

Code:
# zpool detach tank ad10
... pool is now a single disk ...
... reboot and replace disk ...
# zpool attach tank ad8 {newdevice}
 
Back
Top