[test@freenas ~]$ zpool status POOL
  pool: POOL
 state: DEGRADED
 scrub: none requested
config:
    NAME        STATE     READ WRITE CKSUM
    POOL        DEGRADED     0     0     0
      raidz2    DEGRADED     0     0     0
        ad1     ONLINE       0     0     0
        ad3     ONLINE       0     0     0
        da0     ONLINE       0     0     0
        da1     ONLINE       0     0     0
        da2     REMOVED      0     0     0
        da3     REMOVED      0     0     0
    spares
      da4       AVAIL
      da5       AVAIL
errors: No known data errors
[test@freenas ~]$ zpool status -x
all pools are healthy        <--------------------- WEIRD, I think !!!!! It seems the automatic replacement does not work, because Zpool status -x thinks that every pool is correct
[test@freenas ~]$
Following this link: http://dlc.sun.com/osol/docs/content/ZFSADMIN/gayrd.html#gcvcw
The documentation clearly state :
Activating and Deactivating Hot Spares in Your Storage Pool
Hot spares are activated in the following ways:
Manually replacement – Replace a failed device in a storage pool with a hot spare by using the zpool replace command.
Automatic replacement – When a fault is received, an FMA agent examines the pool to see if it has any available hot spares. If so, it replaces the faulted device with an available spare.
If a hot spare that is currently in use fails, the agent detaches the spare and thereby cancels the replacement. The agent then attempts to replace the device with another hot spare, if one is available. This feature is currently limited by the fact that the ZFS diagnosis engine only emits faults when a device disappears from the system.
Currently, no automated response is available to bring the original device back online. You must explicitly take one of the actions described in the example below. A future enhancement will allow ZFS to subscribe to hotplug events and automatically replace the affected device when it is replaced on the system.
Trying to manually replace the drive with
[test@freenas ~]$ zpool replace POOL da4
cannot use '/dev/da4': must be a GEOM provider or regular file
Does not work either
Hi,
see
http://www.sysops.tv/2010/11/05/079-freenas-entfesselt/
starting at 1h 00 00 (it is excactly what you mean, and how I solved it (using shell and "detach" later))