Enum libzetta::zpool::ZpoolErrorKind
source · pub enum ZpoolErrorKind {
Show 18 variants
CmdNotFound,
Io,
PoolNotFound,
DeviceNotFound,
VdevReuse,
InvalidTopology,
ParseError,
DeviceTooSmall,
PermissionDenied,
NoActiveScrubs,
NoValidReplicas,
UnknownRaidType,
CannotAttach,
NoSuchDevice,
OnlyDevice,
MismatchedReplicationLevel,
InvalidCacheDevice,
Other,
}
Expand description
This is a hack to allow doing Eq
on errors because std::io::Error
doesn’t implement
PartialEq
. Error descriptions are copied from ZpoolError. Might be out
of date.
Variants§
CmdNotFound
zpool
not found in path. Open3 specific error.
Io
Any other Io related error. Exists as a fallback. Presence of this error is a bug.
PoolNotFound
Trying to manipulate non-existent pool.
DeviceNotFound
At least one vdev points to incorrect location. If vdev type is File then it means file not found.
VdevReuse
Trying to create a new Zpool, but one or more vdevs already used in another pool.
InvalidTopology
Given topology failed validation.
ParseError
Failed to parse value. Ideally you never see it, if you see it - it’s a bug.
DeviceTooSmall
Device used in CreateZpoolRequest is smaller than 64M (or 128M on some platforms)
PermissionDenied
Permission denied to create zpool. This might happened because: a) you are not running it as root b) you are running it inside jail that isn’t allowed to operate zfs
NoActiveScrubs
Trying to pause/stop a scrub that either never started or has already completed
NoValidReplicas
Trying to take the only device offline.
UnknownRaidType
Couldn’t parse string to raid type.
CannotAttach
Cannot attach a device to device that is part of raidz. It can only be attached to mirrors and top-level disks.
NoSuchDevice
Operation on device that was not found in the pool.
OnlyDevice
Trying to detach a device from vdev without any valid replicas left.
MismatchedReplicationLevel
Trying to add vdev with wrong replication level to existing zpool with different replication level. For example: mirror to zpool.
InvalidCacheDevice
Cache device must be a disk or disk slice/partition.
Other
Don’t know (yet) how to categorize this error. If you see this error - open an issue.
Trait Implementations§
source§impl Clone for ZpoolErrorKind
impl Clone for ZpoolErrorKind
source§fn clone(&self) -> ZpoolErrorKind
fn clone(&self) -> ZpoolErrorKind
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ZpoolErrorKind
impl Debug for ZpoolErrorKind
source§impl PartialEq<ZpoolErrorKind> for ZpoolErrorKind
impl PartialEq<ZpoolErrorKind> for ZpoolErrorKind
source§fn eq(&self, other: &ZpoolErrorKind) -> bool
fn eq(&self, other: &ZpoolErrorKind) -> bool
self
and other
values to be equal, and is used
by ==
.