summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmd/zpool/zpool_main.c5
-rw-r--r--man/man8/zpool.84
2 files changed, 7 insertions, 2 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index c167324ce..32c94d7db 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -7011,7 +7011,7 @@ print_scan_status(pool_scan_stat_t *ps)
scan_rate = pass_scanned / elapsed;
issue_rate = pass_issued / elapsed;
- total_secs_left = (issue_rate != 0) ?
+ total_secs_left = (issue_rate != 0 && total >= issued) ?
((total - issued) / issue_rate) : UINT64_MAX;
days_left = total_secs_left / 60 / 60 / 24;
@@ -7045,7 +7045,8 @@ print_scan_status(pool_scan_stat_t *ps)
}
if (pause == 0) {
- if (issue_rate >= 10 * 1024 * 1024) {
+ if (total_secs_left != UINT64_MAX &&
+ issue_rate >= 10 * 1024 * 1024) {
(void) printf(gettext(", %llu days "
"%02llu:%02llu:%02llu to go\n"),
(u_longlong_t)days_left, (u_longlong_t)hours_left,
diff --git a/man/man8/zpool.8 b/man/man8/zpool.8
index 76bc1cf74..eb93d3bb3 100644
--- a/man/man8/zpool.8
+++ b/man/man8/zpool.8
@@ -2189,6 +2189,10 @@ If a scrub is paused, the
resumes it.
If a resilver is in progress, ZFS does not allow a scrub to be started until the
resilver completes.
+.Pp
+Note that, due to changes in pool data on a live system, it is possible for
+scrubs to progress slightly beyond 100% completion. During this period, no
+completion time estimate will be provided.
.Bl -tag -width Ds
.It Fl s
Stop scrubbing.