aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorAndriy Gapon <avg@FreeBSD.org>2017-09-01 17:43:08 +0000
committerAndriy Gapon <avg@FreeBSD.org>2017-09-01 17:43:08 +0000
commitefd3d79ea33392718095ebe6efcd726bcc945760 (patch)
tree6c065f0b28a76d00466b0048eab85b438d803c69 /man
parent7d823d46e55ae8e45e1b2e2b4c6d2c6572d33374 (diff)
downloadsrc-efd3d79ea33392718095ebe6efcd726bcc945760.tar.gz
src-efd3d79ea33392718095ebe6efcd726bcc945760.zip
8414 Implemented zpool scrub pause/resume
illumos/illumos-gate@1702cce751c5cb7ead878d0205a6c90b027e3de8 https://github.com/illumos/illumos-gate/commit/1702cce751c5cb7ead878d0205a6c90b027e3de8 https://www.illumos.org/issues/8414 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 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> Author: Alek Pinchuk <apinchuk@datto.com>
Notes
Notes: svn path=/vendor-sys/illumos/dist/; revision=323107
Diffstat (limited to 'man')
-rw-r--r--man/man1m/zpool.1m25
1 files changed, 19 insertions, 6 deletions
diff --git a/man/man1m/zpool.1m b/man/man1m/zpool.1m
index 3efb9930af45..1d7c3e295bbb 100644
--- a/man/man1m/zpool.1m
+++ b/man/man1m/zpool.1m
@@ -22,8 +22,9 @@
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2013 by Delphix. All rights reserved.
.\" Copyright 2017 Nexenta Systems, Inc.
+.\" Copyright (c) 2017 Datto Inc.
.\"
-.Dd Oct 2, 2016
+.Dd June 21, 2017
.Dt ZPOOL 1M
.Os
.Sh NAME
@@ -137,7 +138,7 @@
.Ar pool Ar device Op Ar new_device
.Nm
.Cm scrub
-.Op Fl s
+.Op Fl s | Fl p
.Ar pool Ns ...
.Nm
.Cm set
@@ -1445,10 +1446,10 @@ Not all devices can be overridden in this manner.
.It Xo
.Nm
.Cm scrub
-.Op Fl s
+.Op Fl s | Fl p
.Ar pool Ns ...
.Xc
-Begins a scrub.
+Begins a scrub or resumes a paused scrub.
The scrub examines all data in the specified pools to verify that it checksums
correctly.
For replicated
@@ -1471,15 +1472,27 @@ faults or disk failure.
.Pp
Because scrubbing and resilvering are I/O-intensive operations, ZFS only allows
one at a time.
-If a scrub is already in progress, the
+If a scrub is paused, the
.Nm zpool Cm scrub
-command terminates it and starts a new scrub.
+resumes it.
If a resilver is in progress, ZFS does not allow a scrub to be started until the
resilver completes.
.Bl -tag -width Ds
.It Fl s
Stop scrubbing.
.El
+.Bl -tag -width Ds
+.It Fl p
+Pause scrubbing.
+Scrub pause state and progress are periodically synced to disk.
+If the system is restarted or pool is exported during a paused scrub,
+even after import, scrub will remain paused until it is resumed.
+Once resumed the scrub will pick up from the place where it was last
+checkpointed to disk.
+To resume a paused scrub issue
+.Nm zpool Cm scrub
+again.
+.El
.It Xo
.Nm
.Cm set