Table of Contents

FreeNAS - Replace a Drive

The GUI informs that the zpool is degraded.


List the Pools

zpool list

returns:

NAME           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
Pool1         43.5T  35.6T  7.94T        -         -    10%    81%  1.00x    ONLINE  /mnt
freenas-boot   216G  5.08G   211G        -         -     0%     2%  1.00x    ONLINE  -

Check the status of the Pool

zpool status Pool1

returns:

  pool: Pool1
 state: DEGRADED
status: One or more devices has experienced an unrecoverable error.  An
    attempt was made to correct the error.  Applications are unaffected.
action: Determine if the device needs to be replaced, and clear the errors
    using 'zpool clear' or replace the device with 'zpool replace'.
   see: http://illumos.org/msg/ZFS-8000-9P
config:
 
	NAME                                            STATE     READ WRITE CKSUM
	Pool1                                           ONLINE       0     0     0
	  raidz1-0                                      ONLINE       0     0     0
	    gptid/2d35e96c-b611-11ea-be33-00d861fcb7d8  ONLINE       0     0     0
	    gptid/2d41dcbd-b611-11ea-be33-00d861fcb7d8  ONLINE       0     0    40  too many errors
	    gptid/2ddb5cb2-b611-11ea-be33-00d861fcb7d8  ONLINE       0     0     0
 
errors: No known data errors

NOTE: This shows the disks within the Pool.

It also shows that device 2d41dcbd-b611-11ea-be33-00d861fcb7d8 has errors.


Determine the actual disk connected to that device

glabel status | grep 2d41dcbd

returns:

gptid/2d41dcbd-b611-11ea-be33-00d861fcb7d8     N/A  ada3p2

NOTE: This shows that the disk is /dev/ada3


Determine the Serial Number of the Disk

sudo camcontrol identify ada3 | grep serial

returns:

serial number         ZL21DEPA


Estimate how long it will take to resilver

zpool status -v Pool1

returns:

  pool: Pool1
 state: ONLINE
tatus: 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 Wed Jan 12 12:34:19 2014
        16.3G scanned out of 15.85T at 592M/s, 8h12m to go
        1.4G resilvered, 9.82% done
config:
 
	NAME                                            STATE     READ WRITE CKSUM
	Pool1                                           ONLINE       0     0     0
	  raidz1-0                                      ONLINE       0     0     0
	    gptid/2d35e96c-b611-11ea-be33-00d861fcb7d8  ONLINE       0     0     0
	    gptid/11111111-b611-11ea-be33-00d861fcb7d8  ONLINE       0     0     0  (resilvering)
	    gptid/2ddb5cb2-b611-11ea-be33-00d861fcb7d8  ONLINE       0     0     0
 
errors: No known data errors

NOTE: Notice the resilvered disk has a new id, starting 11111111, which will differ as it is a different disk.