-
Notifications
You must be signed in to change notification settings - Fork 1.9k
zpool/zfs: Add '-a|--all' option to scrub, trim, initialize. #17524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe some small tests which verifies that zpool trim|scrub|... -a
does it for all pools would be nice. You can use zpool events -H pool
for this.
9dd8ee1
to
0d23aff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good for me.
@behlendorf @tonyhutter - what do you think?
23fb2b4
to
9465189
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, thanks for adding this support. Just a couple comments.
29ebe3a
to
4472ba0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have major objections, but I am not sure this improves libzfs API, nor making it more stable.
tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_multiple_pools.ksh
Outdated
Show resolved
Hide resolved
Add support for the '-a | --all' option to perform trim, scrub, and initialize operations on all pools. Previously, specifying a pool name was mandatory for these operations. With this enhancement, users can now execute these operations across all pools at once, without needing to manually iterate over each pool from the command line. Signed-off-by: Akash B <akash-b@hpe.com>
4472ba0
to
79fd0b5
Compare
Add support for the '-a | --all' option to perform trim, scrub, and initialize operations on all pools.
Previously, specifying a pool name was mandatory for these operations. With this enhancement, users can now execute these operations across all pools at once, without needing to manually iterate over each pool from the command line.
Motivation and Context
It would be helpful to have the ability to initiate these operations (scrub, trim, initialize) on multiple pools simultaneously.
Description
Add support for commands like zpool scrub -a, zpool trim -a, and zpool initialize -a to run the respective operation on all pools present in the system. This enhancement allows users to perform these tasks across all pools with a single command, improving efficiency and convenience.
How Has This Been Tested?
Tested this manually.
Types of changes
Checklist:
Signed-off-by
.