[][src]Enum libzetta::zpool::vdev::CreateVdevRequest

pub enum CreateVdevRequest {
    SingleDisk(PathBuf),
    Mirror(Vec<PathBuf>),
    RaidZ(Vec<PathBuf>),
    RaidZ2(Vec<PathBuf>),
    RaidZ3(Vec<PathBuf>),
}

Consumer friendly wrapper to configure vdev to zpol.

Variants

SingleDisk(PathBuf)

The most basic type of vdev is a standard block device. This can be an entire disk or a partition. In addition to disks, ZFS pools can be backed by regular files, this is especially useful for testing and experimentation. Use the full path to the file as the device path in zpool create. All vdevs must be at least 64MB or 128 MB in size depending on implementation.

Mirror(Vec<PathBuf>)

A mirror of multiple disks. A mirror vdev will only hold as much data as its smallest member. A mirror vdev can withstand the failure of all but one of its members without losing any data.

RaidZ(Vec<PathBuf>)

ZFS implements RAID-Z, a variation on standard RAID-5 that offers better distribution of parity and eliminates the “RAID-5 write hole”.

RaidZ2(Vec<PathBuf>)

The same as RAID-Z, but with 2 parity drives.

RaidZ3(Vec<PathBuf>)

The same as RAID-Z, but with 3 parity drives.

Methods

impl CreateVdevRequest[src]

pub fn is_valid(&self) -> bool[src]

Check if given CreateVdevRequest is valid.

For SingleDisk it means that what ever it points to exists.

For Mirror it checks that it's at least two valid disks.

For RaidZ it checks that it's at least three valid disk. And so goes on. This gives false negative results in RAIDZ2 and RAIDZ3. This is intentional. possible makes no sense.

pub fn into_args(self) -> Vec<OsString>[src]

Make turn CreateVdevRequest into list of arguments.

pub fn disk<O: Into<PathBuf>>(value: O) -> CreateVdevRequest[src]

Short-cut to CreateVdevRequest::SingleDisk(disk)

pub fn kind(&self) -> VdevType[src]

Get kind

Trait Implementations

impl Clone for CreateVdevRequest[src]

impl Debug for CreateVdevRequest[src]

impl Eq for CreateVdevRequest[src]

impl PartialEq<CreateVdevRequest> for CreateVdevRequest[src]

impl PartialEq<CreateVdevRequest> for Vdev[src]

impl PartialEq<Vdev> for CreateVdevRequest[src]

impl StructuralEq for CreateVdevRequest[src]

impl StructuralPartialEq for CreateVdevRequest[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.