Project

General

Profile

Actions

Feature #8414

closed

Implemented zpool scrub pause/resume

Added by Alek Pinchuk over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2017-06-21
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

This issue tracks the port of scrub pause from ZoL: https://github.com/zfsonlinux/zfs/pull/6167

Currently, there is no way to pause a scrub. Pausing may
be useful when the pool is busy with other I/O to preserve
bandwidth.

Description

This patch adds the ability to pause and resume scrubbing.
This is achieved by maintaining a persistent on-disk scrub state.
While the state is 'paused' we do not scrub any more blocks.
We do however perform regular scan housekeeping such as
freeing async destroyed and deadlist blocks while paused.

If you're testing this change, you probably want to include the patch from #6164

Motivation and Context

Scrub pausing can be an I/O intensive operation and people have been asking for the ability to pause a scrub for a while. This allows one to preserve scrub progress while freeing up bandwidth for other I/O.

How Has This Been Tested?

Unit testing and zfs-tests.
to the pool.

This patch will also include the patch from https://github.com/zfsonlinux/zfs/pull/6164

In certain cases (dsl_scan_sync() is one), we may end up calling
bpobj_iterate() on an empty bpobj. Even though we don't end up
modifying the bpobj it still gets dirtied, causing unneeded writes to the pool.

The fix adds an early bail from bpobj_iterate_impl() if bpobj
is empty to prevent unneeded writes to the pool.

Actions #1

Updated by Alek Pinchuk about 6 years ago

  • Description updated (diff)
Actions #2

Updated by Electric Monk about 6 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 80 to 100

git commit 1702cce751c5cb7ead878d0205a6c90b027e3de8

commit  1702cce751c5cb7ead878d0205a6c90b027e3de8
Author: Alek Pinchuk <apinchuk@datto.com>
Date:   2017-08-21T19:29:56.000Z

    8414 Implemented zpool scrub pause/resume
    Reviewed by: George Melikov <mail@gmelikov.ru>
    Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
    Reviewed by: Brad Lewis <brad.lewis@delphix.com>
    Reviewed by: Serapheim Dimitropoulos <serapheim@delphix.com>
    Reviewed by: Matt Ahrens <mahrens@delphix.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF