[][src]Struct libzetta::zpool::topology::CreateZpoolRequestBuilder

pub struct CreateZpoolRequestBuilder { /* fields omitted */ }

Builder for CreateZpoolRequest.

Methods

impl CreateZpoolRequestBuilder[src]

pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

Name to give new zpool

pub fn props<VALUE: Into<Option<ZpoolPropertiesWrite>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Properties if new zpool

pub fn altroot<VALUE: Into<Option<PathBuf>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Altroot for zpool

pub fn mount<VALUE: Into<Option<PathBuf>>>(&mut self, value: VALUE) -> &mut Self[src]

Mount mount point for zpool

pub fn create_mode<VALUE: Into<CreateMode>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Use -f or not;

pub fn vdevs<VALUE: Into<Vec<CreateVdevRequest>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

Devices used to store data

pub fn caches<VALUE: Into<Vec<PathBuf>>>(&mut self, value: VALUE) -> &mut Self[src]

Adding a cache vdev to a pool will add the storage of the cache to the L2ARC. Cache devices cannot be mirrored. Since a cache device only stores additional copies of existing data, there is no risk of data loss.

pub fn logs<VALUE: Into<Vec<CreateVdevRequest>>>(
    &mut self,
    value: VALUE
) -> &mut Self
[src]

ZFS Log Devices, also known as ZFS Intent Log (ZIL) move the intent log from the regular pool devices to a dedicated device, typically an SSD. Having a dedicated log device can significantly improve the performance of applications with a high volume of synchronous writes, especially databases. Log devices can be mirrored, but RAID-Z is not supported. If multiple log devices are used, writes will be load balanced across them

pub fn spares<VALUE: Into<Vec<PathBuf>>>(&mut self, value: VALUE) -> &mut Self[src]

The hot spares feature enables you to identify disks that could be used to replace a failed or faulted device in one or more storage pools. Designating a device as a hot spare means that the device is not an active device in the pool, but if an active device in the pool fails, the hot spare automatically replaces the failed device.

pub fn build(&self) -> Result<CreateZpoolRequest, String>[src]

Builds a new CreateZpoolRequest.

Errors

If a required field has not been initialized.

impl CreateZpoolRequestBuilder[src]

pub fn vdev(
    &mut self,
    vdev: CreateVdevRequest
) -> &mut CreateZpoolRequestBuilder
[src]

Add vdev to request.

pub fn cache(&mut self, disk: PathBuf) -> &mut CreateZpoolRequestBuilder[src]

Add cache device to request.

  • disk - path to file or name of block device in /dev/. Some ZFS implementations forbid using files as cache.

pub fn zil(&mut self, log: CreateVdevRequest) -> &mut CreateZpoolRequestBuilder[src]

Add Vdev that will be used as ZFS Intent Log to request.

pub fn spare(&mut self, disk: PathBuf) -> &mut CreateZpoolRequestBuilder[src]

Add spare disk that will be used to replace failed device in zpool.

  • disk - path to file or name of block device in /dev/.

Trait Implementations

impl Clone for CreateZpoolRequestBuilder[src]

impl Default for CreateZpoolRequestBuilder[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.