zpool.query =========== Query ZFS pools with flexible options for properties, topology, scan, and features. Returns information about both imported and non-imported pools. By default, only minimal data is returned (name, guid, status, health); additional sections like topology, scan, properties, etc. must be opted into via their respective flags. Pools that exist in the database but are not currently imported are returned with an OFFLINE status. The boot pool can be queried by explicitly passing its name in ``pool_names``. It is excluded from results when ``pool_names`` is null (query-all mode). Examples:: # Query all pools (minimal info: name, guid, status, health) {} # Query specific pools with properties { "pool_names": ["tank", "boot-pool"], "properties": ["size", "capacity"] } # Query with full topology and scan information { "pool_names": ["tank"], "topology": true, "scan": true } # Query everything { "topology": true, "scan": true, "expand": true, "features": true, "properties": ["size", "capacity", "health"] } .. raw:: html
Query parameters.
No Additional PropertiesPool names to query. None queries all imported pools.
Property names to retrieve. None returns no properties.
Include vdev topology.
Include scan/scrub information.
Include expansion information.
Include feature flags.
Name of the zpool.
Globally unique identifier for the pool.
Current pool status (ONLINE, DEGRADED, FAULTED, OFFLINE, etc.).
Whether the pool is in a healthy state.
Whether the pool has warning conditions.
Detailed status code (e.g., OK, ERRATA, FEATDISABLED, LOCKEDSED_DISKS).
Human-readable status description.
Pool properties, keyed by property name.
Each additional property must conform to the following schema
The raw string representation of the property.
The source from where this property received its value (DEFAULT, LOCAL, NONE, etc.).
The native Python value of the property.
Pool vdev topology.
Array of data vdev configurations.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
No Additional PropertiesHigh-resolution timestamp (nanoseconds).
Allocated space in bytes.
Total space in bytes.
Deflated (compressed) space.
Physical space.
Replaceable dev size.
Expandable dev size.
Number of read errors.
Number of write errors.
Number of checksum errors.
Number of initialize errors.
Number of direct I/O verify errors.
Number of slow I/Os.
Self-healed bytes.
Fragmentation percentage.
Bytes processed by scan.
Bytes processed by removal.
Bytes processed by rebuild.
Allocations halted.
Read operations.
Write operations.
Bytes read.
Bytes written.
Configured ashift value.
Logical ashift value.
Physical ashift value.
Child vdevs.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
Child vdevs.
No Additional ItemsGUID of the top-level vdev this belongs to.
GUID of the top-level vdev this belongs to.
Array of ZFS Intent Log (ZIL) vdev configurations.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
Child vdevs.
No Additional ItemsGUID of the top-level vdev this belongs to.
Array of L2ARC cache vdev configurations.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
Child vdevs.
No Additional ItemsGUID of the top-level vdev this belongs to.
Array of spare disk configurations.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
Child vdevs.
No Additional ItemsGUID of the top-level vdev this belongs to.
Array of stripe (single-disk) vdev configurations.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
Child vdevs.
No Additional ItemsGUID of the top-level vdev this belongs to.
Array of special vdev configurations for metadata.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
Child vdevs.
No Additional ItemsGUID of the top-level vdev this belongs to.
Array of deduplication table vdev configurations.
No Additional ItemsVdev name (e.g., 'mirror-0', '/dev/sda1').
Vdev type (e.g., 'mirror', 'raidz1', 'disk').
Globally unique identifier for this vdev.
Current state (ONLINE, DEGRADED, FAULTED, OFFLINE, UNAVAIL, etc.).
Vdev I/O statistics.
Child vdevs.
No Additional ItemsGUID of the top-level vdev this belongs to.
Most recent scrub or resilver information.
Type of ZFS pool scan.
Current lifecycle state of the scan.
Scan start time (unix timestamp).
Scan end time as unix timestamp (null while the scan is still running).
Scan progress (between 0 and 100%).
Total bytes located by scanner.
Total bytes to scan.
Issued bytes per scan pass.
Pause time as unix timestamp (null if the scan is not paused).
Number of scan errors.
Number of seconds left (null if the scan is not running).
RAIDZ expansion information.
Expansion state (e.g., SCANNING, FINISHED).
Index of the vdev being expanded.
Expansion start time (unix timestamp).
Expansion end time as unix timestamp (null while expanding).
Total bytes that need to be reflowed.
Total bytes reflowed so far.
Non-zero if expansion is waiting for a resilver to complete.
Estimated seconds remaining (null if not expanding).
Expansion progress (between 0 and 100%).
Pool feature flags.
Feature name.
Feature GUID.
Feature description.
Feature state.