Scrubbing a Storage Pool – Manual (CLI)

Scrubbing a storage pool verifies the content by checking for errors. Scheduled storage pool scrubbing is enabled by default, as described in Scrubbing a Storage Pool – Scheduled (CLI). The recommended minimum period for performing a scrub is quarterly.

  • A scrub should be performed at least as often as your oldest backup expires.

  • A scrub should also be run before performing a software upgrade.

A scrubbing operation will not proceed if a scrubbing or resilvering is already in progress. If a scrubbing operation is in progress when a resilvering starts, the resilvering operation suspends the current scrubbing and restarts the scrubbing after the resilvering is complete.

  1. Go to configuration storage.
  2. Select the online pool to scrub.

    If you have a single pool, the pool name is not displayed, but it is selected.

    If you have multiple pools, one of the pools is selected and displayed. Use the set pool= command to select a different pool.

    hostname:configuration storage (pool0)> set pool=pool1
                              pool = pool1
  3. Optional: Check the status of the last scrub.

    Use the ls, show, or get command to see when the last scrub completed in GMT (or how long it ran if it did not complete), and the number of errors that were reported by the scrub:

    hostname:configuration storage (pool1)> get scrub
               scrub = scrub completed after 2d20h with 0 errors on Thu May  6 10:35:16 2022

    The zpool status command also reports the completion time of the last scrub, how long the scrub ran, and whether errors were found and repaired.

  4. Enter scrub start.
    hostname:configuration storage (pool1)> scrub start
  5. Optional: Stop the scrub before it has completed by entering scrub stop.
    hostname:configuration storage (pool1)> scrub stop

    Entering scrub start again restarts the scrub.