ZFS Replacing Disk

By | July 1, 2013

[stor] ~> zpool status | more
pool: mpool
state: DEGRADED
status: One or more devices has been removed by the administrator.
Sufficient replicas exist for the pool to continue functioning in a
degraded state.
action: Online the device using ‘zpool online’ or replace the device with
‘zpool replace’.
scan: resilvered 985G in 9h47m with 0 errors on Tue Apr 2 07:22:02 2013
config:
NAME STATE READ WRITE CKSUM
mpool DEGRADED 0 0 0
mirror-0 ONLINE 0 0 0
gpt/disk0 ONLINE 0 0 0
gpt/disk8 ONLINE 0 0 0
gpt/disk16 ONLINE 0 0 0
mirror-1 DEGRADED 0 0 0
gpt/disk1 ONLINE 0 0 0
15215693814556243 REMOVED 0 0 0 was /dev/gpt/disk9

 

Down-down-down… lucky only single disk has failed.

stor# gpart create -s gpt da9
stor# gpart add -s 3907029101 -t freebsd-zfs -l disk9 da9
stor# zpool replace mpool /dev/gpt/disk9 /dev/gpt/disk9
stor# zpool status|more

pool: mpool
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 Mon Jul 1 11:11:19 2013
1.12G scanned out of 7.49T at 46.1M/s, 47h20m to go
152M resilvered, 0.01% done
config:

mirror-1 DEGRADED 0 0 0
gpt/disk1 ONLINE 0 0 0
replacing-1 REMOVED 0 0 0
15215693814556243 REMOVED 0 0 0 was /dev/gpt/disk9/old
gpt/disk9 ONLINE 0 0 0 (resilvering)
gpt/disk17 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *