Implemented zpool scrub pause/resume
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.
Updated by Electric Monk about 6 years ago
- Status changed from In Progress to Closed
- % Done changed from 80 to 100
commit 1702cce751c5cb7ead878d0205a6c90b027e3de8 Author: Alek Pinchuk <email@example.com> Date: 2017-08-21T19:29:56.000Z 8414 Implemented zpool scrub pause/resume Reviewed by: George Melikov <firstname.lastname@example.org> Reviewed by: Brian Behlendorf <email@example.com> Reviewed by: Brad Lewis <firstname.lastname@example.org> Reviewed by: Serapheim Dimitropoulos <email@example.com> Reviewed by: Matt Ahrens <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>