Repository navigation
Conversation
Adds -E flag to exclude comma-separated pools from zpool status output. Usage: 'zpool status -E tank,backup' shows all pools except tank and backup. Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>
0d49d3b to
88f5dea
Compare
behlendorf
left a comment
There was a problem hiding this comment.
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 |
- Added '-E' flag to 'zpool status' to exclude specific pools from output. - Added '-p' support to 'zpool status -D' to display raw deduplication statistics. - Updated ABI and internal functions to support the new 'literal' argument for dedup stats. - Added regression test 'zpool_status_009_pos.ksh' to verify both new features. This change addresses openzfs issues openzfs#17902 and openzfs#17926. Implemented by Gemini.
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.