Change zpool offline spares policy#18282
Merged
behlendorf merged 1 commit intoopenzfs:masterfrom Mar 25, 2026
Merged
Conversation
2b3154a to
f12f5ff
Compare
akashb-22
approved these changes
Mar 5, 2026
tests/zfs-tests/tests/functional/cli_root/zpool_offline/zpool_offline_spare.ksh
Outdated
Show resolved
Hide resolved
f12f5ff to
9118174
Compare
ixhamza
reviewed
Mar 6, 2026
ixhamza
approved these changes
Mar 6, 2026
9118174 to
415f81b
Compare
415f81b to
58ef492
Compare
behlendorf
approved these changes
Mar 18, 2026
behlendorf
reviewed
Mar 18, 2026
tests/zfs-tests/tests/functional/cli_root/zpool_offline/zpool_offline_spare.ksh
Outdated
Show resolved
Hide resolved
The zpool offline man page says that you cannot use 'zpool offline' on spares. However, testing found that you could in fact force fault (zpool offline -f) spares. Change the policy to: 1. You can never force-fault or offline dRAID spares. 2. You can only force-fault or offline traditional spares if they're active. Signed-off-by: Tony Hutter <hutter2@llnl.gov>
58ef492 to
6819128
Compare
Contributor
Author
|
I've tweaked this PR a little. The new policy for force-faulting spares is:
|
behlendorf
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation and Context
Make sure you can't force fault an offline spare.
Description
The zpool offline man page says that you cannot use
zpool offlineon spares. However, testing found that you could in fact force fault (zpool offline -f) spares.Change the policy to:
How Has This Been Tested?
Added test case
Types of changes
Checklist:
Signed-off-by.