pub struct ZfsPool {
pub name: String,
pub state: String,
pub devices: Vec<ZfsDevice>,
pub scan: Option<String>,
pub data_errors: Option<u64>,
pub size_bytes: Option<u64>,
pub allocated_bytes: Option<u64>,
}Expand description
A ZFS pool and its health.
Fields§
§name: StringPool name (e.g. "tank").
state: StringHealth as zpool status shows it: ONLINE, DEGRADED, FAULTED,
OFFLINE, UNAVAIL, REMOVED or SUSPENDED.
devices: Vec<ZfsDevice>Its vdevs and devices as zpool status lists them, top to bottom
(empty where zpool could not be run, and from agents before 0.26).
scan: Option<String>The last or running scrub or resilver (“scrub repaired 0B in
00:00:01 with 0 errors on …”, “resilver in progress … 42.1%
done”), from the scan: line.
data_errors: Option<u64>Permanent data errors (errors: N data errors); None unknown.
size_bytes: Option<u64>Size and space in use (zpool list).
allocated_bytes: Option<u64>Implementations§
Source§impl ZfsPool
impl ZfsPool
Sourcepub fn layout(&self) -> Option<String>
pub fn layout(&self) -> Option<String>
The layout of its data vdevs: “raidz1”, “mirror”, “2 × mirror”,
“stripe” (devices directly under the pool), or None when unknown.
Sourcepub fn has_errors(&self) -> bool
pub fn has_errors(&self) -> bool
Whether zpool status reported data errors or device errors, which
a healthy-looking ONLINE state does not show.
Sourcepub fn troubled_devices(&self) -> impl Iterator<Item = &ZfsDevice>
pub fn troubled_devices(&self) -> impl Iterator<Item = &ZfsDevice>
Its devices (not vdevs) with errors or in a bad state.
Sourcepub fn is_failing(&self) -> bool
pub fn is_failing(&self) -> bool
Whether the pool lost redundancy or data is at risk (worse than an administratively offline pool).