diff options
author | Tom Caputi <tcaputi@datto.com> | 2018-10-19 00:06:18 -0400 |
---|---|---|
committer | Brian Behlendorf <behlendorf1@llnl.gov> | 2018-10-18 21:06:18 -0700 |
commit | 80a91e7469669e2a5da5873b8f09a752f7869062 (patch) | |
tree | ef5a4462892becccb939b2cd42a54ed580f5894f /include/zfeature_common.h | |
parent | 9f438c5f948c0072f16431407a373ead34fabf6e (diff) |
Defer new resilvers until the current one ends
Currently, if a resilver is triggered for any reason while an
existing one is running, zfs will immediately restart the existing
resilver from the beginning to include the new drive. This causes
problems for system administrators when a drive fails while another
is already resilvering. In this case, the optimal thing to do to
reduce risk of data loss is to wait for the current resilver to end
before immediately replacing the second failed drive, which allows
the system to operate with two incomplete drives for the minimum
amount of time.
This patch introduces the resilver_defer feature that essentially
does this for the admin without forcing them to wait and monitor
the resilver manually. The change requires an on-disk feature
since we must mark drives that are part of a deferred resilver in
the vdev config to ensure that we do not assume they are done
resilvering when an existing resilver completes.
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: @mmaybee
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #7732
Diffstat (limited to 'include/zfeature_common.h')
-rw-r--r-- | include/zfeature_common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/zfeature_common.h b/include/zfeature_common.h index 3804d7b1a..089a7e29d 100644 --- a/include/zfeature_common.h +++ b/include/zfeature_common.h @@ -65,6 +65,7 @@ typedef enum spa_feature { SPA_FEATURE_POOL_CHECKPOINT, SPA_FEATURE_SPACEMAP_V2, SPA_FEATURE_ALLOCATION_CLASSES, + SPA_FEATURE_RESILVER_DEFER, SPA_FEATURES } spa_feature_t; |