ZFS Replace Keeps Disks Online

Submitted by gpmidi on Thu, 12/08/2016 - 13:14

Based on this experiment with ZFS it appears that using 'zfs replace' on a good or semi-good disk will keep the disk in use during the replace. 

  pool: test
 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 Dec  8 18:04:35 2016
    1.50G scanned out of 67.1G at 102M/s, 0h10m to go
    676M resilvered, 2.24% done
config:
        NAME          STATE     READ WRITE CKSUM
        test          DEGRADED     0     0     0
          raidz3-0    DEGRADED     0     0     0
            spare-0   ONLINE       0     0     0
              loop1   ONLINE       0     0     0
              loop10  ONLINE       0     0     0  (resilvering)
            spare-1   DEGRADED     0     0     0
              loop2   OFFLINE      0     0     0
              loop11  ONLINE       0     0     0  (resilvering)
            spare-2   ONLINE       0     0     0
              loop3   ONLINE       0     0     0
              loop12  ONLINE       0     0     0  (resilvering)
            spare-3   ONLINE       0     0     0
              loop4   ONLINE       0     0     0
              loop13  ONLINE       0     0     0  (resilvering)
            loop5     ONLINE       0     0     0
            loop6     ONLINE       0     0     0
            loop7     ONLINE       0     0     0
            loop8     ONLINE       0     0     0
            loop9     ONLINE       0     0     0
        spares
          loop10      INUSE     currently in use
          loop11      INUSE     currently in use
          loop12      INUSE     currently in use
          loop13      INUSE     currently in use
          loop14      AVAIL   
          loop15      AVAIL   
          loop16      AVAIL