Skip to content

Commit

Permalink
Implemented zpool scrub pause/resume
Browse files Browse the repository at this point in the history
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.

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.
  • Loading branch information
alek-p committed Jul 3, 2017
1 parent 11268b1 commit c9d48af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ log_onexit cleanup

log_assert "Verify scrub, scrub -p, and scrub -s show the right status."

log_must zinject -d $DISK1 -D10:1 $TESTPOOL
log_must zinject -d $DISK1 -D20:1 $TESTPOOL
log_must zpool scrub $TESTPOOL
log_must is_pool_scrubbing $TESTPOOL true
log_must zpool scrub -p $TESTPOOL
Expand Down

0 comments on commit c9d48af

Please sign in to comment.