- Notifications
You must be signed in to change notification settings - Fork1.9k
zpool status: add -E flag for pool exclusion#17902
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Conversation
Adds -E flag to exclude comma-separated pools from zpool status output.Usage: 'zpool status -E tank,backup' shows all pools except tank andbackup.Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
0d49d3b to88f5deaCompareThere 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.
Actually there is an existing undocumented interface to exclude pools. The__ZFS_POOL_EXCLUDE environment variable can be set with a list of pools to exclude and it's applied to all of the subcommands. This is used by the test suite today to protect existing pools on a test system. I think adding a proper command line option for this is useful, but we should 1) add it to all the subcommands where it makes sense, and 2) use the same code internally to implement both the-E flag and__ZFS_POOL_EXCLUDE environment variable.
Thanks@behlendorf for the feedback, totally agreed. I'll extend it to all applicable subcommands and integrate with |
Uh oh!
There was an error while loading.Please reload this page.
Motivation and Context
Currently,
zpool statuslacks an option to exclude specific pools from output. Useful for hidingtest/backup/bootpools when monitoring systems with many pools.Description
Adds
-Eflag to exclude specified pools from output. Takes comma-separated pool names and filters them out.Example:
zpool status -E tank,backupexcludestankandbackup, showing all other pools.How Has This Been Tested?
Manually tested exclusion from all pools and specific pools, edge cases (trailing commas, duplicate flags, invalid arguments), and combination with other flags.
Types of changes
Checklist:
Signed-off-by.