pub struct CreateZpoolRequestBuilder { /* private fields */ }
Expand description

Builder for CreateZpoolRequest.

Implementations§

source§

impl CreateZpoolRequestBuilder

source

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

Name to give new zpool

source

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

Properties if new zpool

source

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

Altroot for zpool

source

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

Mount mount point for zpool

source

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

Use -f or not;

source

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

Devices used to store data

source

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

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.

source

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

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

source

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

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.

source

pub fn build( &self ) -> Result<CreateZpoolRequest, CreateZpoolRequestBuilderError>

Builds a new CreateZpoolRequest.

Errors

If a required field has not been initialized.

source§

impl CreateZpoolRequestBuilder

source

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

Add vdev to request.

source

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

Add cache device to request.

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

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

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

source

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

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§

source§

impl Clone for CreateZpoolRequestBuilder

source§

fn clone(&self) -> CreateZpoolRequestBuilder

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Default for CreateZpoolRequestBuilder

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> SendSyncUnwindSafe for Twhere T: Send + Sync + UnwindSafe + ?Sized,