Spare drive not working as expected ?

myozone

Dabbler
Joined
Sep 18, 2016
Messages
15
I've noticed with I offline a drive then remove it from a pool the spare becomes unavailable (replacing the removed drive) and the pool is still degraded is this normal ?
 

myozone

Dabbler
Joined
Sep 18, 2016
Messages
15
I think it resilvered, given the fact the is a VM with 16GB virtual drives I would have thought it would have been pretty quick

2019-07-03 14_06_44-FreeNAS - 192.168.1.110.jpg
 
Last edited:

myozone

Dabbler
Joined
Sep 18, 2016
Messages
15
Code:
root@freenas[~]# zpool status
  pool: Mirror
 state: ONLINE
  scan: none requested
config:

        NAME                                                STATE     READ WRITE                              CKSUM
        Mirror                                              ONLINE       0     0                                  0
          mirror-0                                          ONLINE       0     0                                  0
            gptid/da46f580-9bdc-11e9-8108-080027e67489.eli  ONLINE       0     0                                  0
            gptid/daebc7e0-9bdc-11e9-8108-080027e67489.eli  ONLINE       0     0                                  0

errors: No known data errors

  pool: freenas-boot
 state: ONLINE
  scan: none requested
config:

        NAME        STATE     READ WRITE CKSUM
        freenas-boot  ONLINE       0     0     0
          ada0p2    ONLINE       0     0     0

errors: No known data errors

  pool: with-spare
 state: DEGRADED
status: One or more devices has been taken offline 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 12K in 0 days 00:00:02 with 0 errors on Tue Jul  2 20:28:54 2                             019
config:

        NAME                                              STATE     READ WRITE C                             KSUM
        with-spare                                        DEGRADED     0     0                                  0
          raidz1-0                                        DEGRADED     0     0                                  0
            gptid/f7a1f717-9ce4-11e9-8b29-080027e67489    ONLINE       0     0                                  0
            spare-1                                       DEGRADED     0     0                                  0
              16969101116788476841                        OFFLINE      0     0                                  0  was /dev/gptid/657253f2-9cf3-11e9-9b2c-080027e67489
              gptid/6afe81b1-9cf9-11e9-88e2-080027e67489  ONLINE       0     0                                  0
            gptid/39eb1b4f-9cb2-11e9-8c76-080027e67489    ONLINE       0     0                                  0
        spares
          4372633962829575327                             INUSE     was /dev/gpt                             id/6afe81b1-9cf9-11e9-88e2-080027e67489

errors: No known data errors
 
Joined
Jul 3, 2015
Messages
926
That looks very normal behavior to me. ZFS is saying it's degraded as it's not got the level of redundancy you originally created i.e. a hot-spare as that spare is now performing another role in the pool. Only when you replace the failed disk with a new one and re-silver is complete will the hot-spare go back to being a hot-spare and ZFS will report everything is fine again.
 
Joined
Jul 3, 2015
Messages
926
PS: remember when you tell ZFS to replace make sure you choose to replace the failed disk and NOT the hot-spare otherwise once re-silver is complete you won't have a spare anymore.
 

myozone

Dabbler
Joined
Sep 18, 2016
Messages
15
Thanks JF, I assumed the spare would automatically replace the removed drive, rather than replacing the spare. This is how I understood the manual.

9.2.5 Adding Spare Devices ZFS provides the ability to have “hot” spares. These are drives that are connected to a pool, but not in use. If the pool experiences the failure of a data drive, the system uses the hot spare as a temporary replacement. If the failed drive is replaced with a new drive, the hot spare drive is no longer needed and reverts to being a hot spare. If the failed drive is instead removed from the pool, the spare is promoted to a full member of the pool
 
Joined
Jul 3, 2015
Messages
926
ZFS treats hot-spares as temporary devices. They jump in to save the day as and when required but once the bad drive is replaced with a good one they go back to being a good old hot-spare ready to save the day at some other point in the future. Just so long as you replace bad with good. A common error is to physically remove the bad drive replace with a good and then via the UI replace the hot-spare drive which is now a member of the pool with your new good one. That does work just means you lose your hot-spare at the end of re-silver and you need to go back in and add it again so best to get it right first time.
 

myozone

Dabbler
Joined
Sep 18, 2016
Messages
15
I just tested it replacing the failed drive with another and all is ok - I still have a hot spare. It's the bit in the manual If the failed drive is instead removed from the pool, the spare is promoted to a full member of the pool I assumed 'off-lining' then removing the drive the spare would would become a full member of the pool rather than a temporary stand in.
 
D

dlavigne

Guest
Looks like the Guide could be improved. Please take a moment to create an improvement request at bugs.ixsystems.com and post the issue number here.
 
Top