From 0d77e738e65d2fdc37c9c345c022f14239ae67cb Mon Sep 17 00:00:00 2001 From: Pavel Snajdr Date: Fri, 4 Oct 2024 19:41:17 +0200 Subject: Defer resilver only when progress is above a threshold Restart a resilver from scratch, if the current one in progress is below a new tunable, zfs_resilver_defer_percent (defaulting to 10%). The original rationale for deferring additional resilvers, when there is already one in progress, was to help achieving data redundancy sooner for the data that gets scanned at the end of the resilver. But in case the admin wants to attach multiple disks to a single vdev, it wasn't immediately obvious the admin is supposed to run `zpool resilver` afterwards to reset the deferred resilvers and start a new one from scratch. Reviewed-by: Brian Behlendorf Signed-off-by: Pavel Snajdr Closes #15810 --- man/man4/zfs.4 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'man') diff --git a/man/man4/zfs.4 b/man/man4/zfs.4 index cf6720317..e19573d5e 100644 --- a/man/man4/zfs.4 +++ b/man/man4/zfs.4 @@ -2012,6 +2012,13 @@ Ignore the feature, causing an operation that would start a resilver to immediately restart the one in progress. . +.It Sy zfs_resilver_defer_percent Ns = Ns Sy 10 Ns % Pq uint +If the ongoing resilver progress is below this threshold, a new resilver will +restart from scratch instead of being deferred after the current one finishes, +even if the +.Sy resilver_defer +feature is enabled. +. .It Sy zfs_resilver_min_time_ms Ns = Ns Sy 3000 Ns ms Po 3 s Pc Pq uint Resilvers are processed by the sync thread. While resilvering, it will spend at least this much time -- cgit v1.2.3