This is an upstream of the scrub pause feature pending review in 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. This patch also adds a -p option to zpool import which allows one to pause scrub instead of resuming it on import. If you're testing this change, you probably want to include the patch from #6164 Can't seem to get zfs-tests to run consistently on my setup so let's see what buildbot thinks. 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 also includes this two-liner fix: https://github.com/zfsonlinux/zfs/pull/6164 to prevent unneeded write while we're paused. You can view, comment on, or merge this pull request online at: https://github.com/openzfs/openzfs/pull/407 -- Commit Summary -- * 8414 Implemented zpool scrub pause/resume -- File Changes -- M usr/src/cmd/zpool/zpool_main.c (61) M usr/src/lib/libzfs/common/libzfs.h (3) M usr/src/lib/libzfs/common/libzfs_pool.c (44) M usr/src/lib/libzfs/common/libzfs_util.c (4) M usr/src/man/man1m/zpool.1m (19) M usr/src/test/zfs-tests/include/libtest.shlib (9) M usr/src/test/zfs-tests/tests/functional/cli_root/zpool_scrub/zpool_scrub_002_pos.ksh (23) M usr/src/test/zfs-tests/tests/functional/cli_user/misc/zpool_scrub_001_neg.ksh (2) M usr/src/uts/common/fs/zfs/bpobj.c (4) M usr/src/uts/common/fs/zfs/dsl_scan.c (175) M usr/src/uts/common/fs/zfs/spa.c (14) M usr/src/uts/common/fs/zfs/spa_misc.c (8) M usr/src/uts/common/fs/zfs/sys/dsl_scan.h (13) M usr/src/uts/common/fs/zfs/sys/spa.h (2) M usr/src/uts/common/fs/zfs/sys/spa_impl.h (3) M usr/src/uts/common/fs/zfs/zfs_ioctl.c (8) M usr/src/uts/common/sys/fs/zfs.h (14) -- Patch Links -- https://github.com/openzfs/openzfs/pull/407.patch https://github.com/openzfs/openzfs/pull/407.diff -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/openzfs/openzfs/pull/407 ------------------------------------------ openzfs-developer Archives: https://openzfs.topicbox.com/groups/developer/discussions/T693650e65dc896fc-Mf8c5890756a19deec8650802 Powered by Topicbox: https://topicbox.com
