[][src]Enum libzetta::zpool::ZpoolErrorKind

pub enum ZpoolErrorKind {
    CmdNotFound,
    Io,
    PoolNotFound,
    DeviceNotFound,
    VdevReuse,
    InvalidTopology,
    ParseError,
    DeviceTooSmall,
    PermissionDenied,
    NoActiveScrubs,
    NoValidReplicas,
    UnknownRaidType,
    CannotAttach,
    NoSuchDevice,
    OnlyDevice,
    MismatchedReplicationLevel,
    InvalidCacheDevice,
    Other,
}

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

impl Clone for ZpoolErrorKind[src]

impl Debug for ZpoolErrorKind[src]

impl Eq for ZpoolErrorKind[src]

impl PartialEq<ZpoolErrorKind> for ZpoolErrorKind[src]

impl StructuralEq for ZpoolErrorKind[src]

impl StructuralPartialEq for ZpoolErrorKind[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.