Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    AUTOREPLACE=ON not automatically replacing failed drive with hot spare?

    Scheduled Pinned Locked Moved 2.4 Development Snapshots
    5 Posts 2 Posters 1.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      pfBasic Banned
      last edited by

      If I'm understanding it correctly, adding a spare to your pool and setting autoreplace=on means that if your pool is degraded, ZFS will automatically re-silver your pool using the designated spare.

      I tested that in a VM just to see exactly how it would work for an actual drive failure, and it didn't.
      It just doesn't do anything.
      I tried off-lining a disk then running zpool status, but it just showed degraded, the spare still showed available and no re-silvering was taking place.
      I tried running a scrub and it scrubbed successfully but still no re-silvering.
      I rebooted and still nothing.

      I tried removing a disk from settings while the system was shutdown, then starting up. Same effect, I tried rebooting and still nothing.

      running zpool replace successfully resilvered the pool.

      So reading up on this I see some documentation from oracle that is confusing to me:
      http://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6qvt/index.html

      Automatic replacement – When a fault is detected, an FMA agent examines the pool to determine if it has any available hot spares. If so, it replaces the faulted device with an available spare.

      Suggests that everything is automatic when a disk fails.
      Seems to conflict with:
      http://docs.oracle.com/cd/E19253-01/819-5461/gbcet/

      Note –
      If you had previously set the pool property autoreplace to on, then any new device, found in the same physical location as a device that previously belonged to the pool is automatically formatted and replaced without using the zpool replace command. This feature might not be supported on all hardware.

      Sounds like I have to physically place the spare into the slot previously occupied by the failed drive in order for this to work? This seems pretty useless though.

      So which is it, does autoreplace=on really automatically replace a failed disk with the designated hot spare, or do I still have to physically move the drive connection?
      If it is automatic, is it broken in 2.4.0 BETA, or am I doing it wrong?

      1 Reply Last reply Reply Quote 0
      • D
        doktornotor Banned
        last edited by

        You'd need zfsd for this.

        https://svnweb.freebsd.org/base?view=revision&revision=300906

        1 Reply Last reply Reply Quote 0
        • P
          pfBasic Banned
          last edited by

          OK great thank you!

          Are there's any plans to bring this to pfSense as a package for 2.4?

          1 Reply Last reply Reply Quote 0
          • D
            doktornotor Banned
            last edited by

            No clue whatsoever.

            1 Reply Last reply Reply Quote 0
            • P
              pfBasic Banned
              last edited by

              @pfBasic:

              OK great thank you!

              Are there's any plans to bring this to pfSense as a package for 2.4?

              It's actually already natively part of FreeBSD 11.

              zfsd
              

              Starts the daemon.
              I couldn't find a man page for it online but there's one on FreeBSD.
              I don't know how to make that command run on boot but I'm betting even I can figure it out with a little searching.

              EDIT: 
              Yup, even I figured it out. Install the shellcmd package and add zfsd.

              ps -auxww to see if the daemon is running.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.