summaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorAlek P <[email protected]>2017-07-06 22:16:13 -0700
committerBrian Behlendorf <[email protected]>2017-07-06 22:16:13 -0700
commit0ea05c64f8d08c20439dd2a06e949a2aa4115101 (patch)
tree28c543bbb096dfdb9809c754722445fa699d6ec4 /man
parent94b25662c51696ec081494e69efb5896566dede2 (diff)
Implemented zpool scrub pause/resume
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. Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Thomas Caputi <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alek Pinchuk <[email protected]> Closes #6167
Diffstat (limited to 'man')
-rw-r--r--man/man8/zpool.823
1 files changed, 17 insertions, 6 deletions
diff --git a/man/man8/zpool.8 b/man/man8/zpool.8
index 9a1520e77..ea25da300 100644
--- a/man/man8/zpool.8
+++ b/man/man8/zpool.8
@@ -25,8 +25,9 @@
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
.\" Copyright (c) 2017 Datto Inc.
.\" Copyright (c) 2017 George Melikov. All Rights Reserved.
+.\" Copyright (c) 2017 Datto Inc.
.\"
-.Dd June 22, 2017
+.Dd June 28, 2017
.Dt ZPOOL 8 SMM
.Os Linux
.Sh NAME
@@ -151,7 +152,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
@@ -1769,10 +1770,10 @@ The only property supported at the moment is
.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
@@ -1795,15 +1796,25 @@ 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 progress is periodically synced to disk so if the system
+is restarted or pool is exported during a paused scrub, the scrub will resume
+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