Struct libzetta::zpool::topology::CreateZpoolRequestBuilder
source · pub struct CreateZpoolRequestBuilder { /* private fields */ }
Expand description
Builder for CreateZpoolRequest
.
Implementations§
source§impl CreateZpoolRequestBuilder
impl CreateZpoolRequestBuilder
sourcepub fn props<VALUE: Into<Option<ZpoolPropertiesWrite>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn props<VALUE: Into<Option<ZpoolPropertiesWrite>>>( &mut self, value: VALUE ) -> &mut Self
Properties if new zpool
sourcepub fn altroot<VALUE: Into<Option<PathBuf>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn altroot<VALUE: Into<Option<PathBuf>>>( &mut self, value: VALUE ) -> &mut Self
Altroot for zpool
sourcepub fn mount<VALUE: Into<Option<PathBuf>>>(&mut self, value: VALUE) -> &mut Self
pub fn mount<VALUE: Into<Option<PathBuf>>>(&mut self, value: VALUE) -> &mut Self
Mount mount point for zpool
sourcepub fn create_mode<VALUE: Into<CreateMode>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn create_mode<VALUE: Into<CreateMode>>( &mut self, value: VALUE ) -> &mut Self
Use -f
or not;
sourcepub fn vdevs<VALUE: Into<Vec<CreateVdevRequest>>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn vdevs<VALUE: Into<Vec<CreateVdevRequest>>>( &mut self, value: VALUE ) -> &mut Self
Devices used to store data
sourcepub fn caches<VALUE: Into<Vec<PathBuf>>>(&mut self, value: VALUE) -> &mut Self
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.
sourcepub fn logs<VALUE: Into<Vec<CreateVdevRequest>>>(
&mut self,
value: VALUE
) -> &mut Self
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
sourcepub fn spares<VALUE: Into<Vec<PathBuf>>>(&mut self, value: VALUE) -> &mut Self
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.
sourcepub fn build(
&self
) -> Result<CreateZpoolRequest, CreateZpoolRequestBuilderError>
pub fn build( &self ) -> Result<CreateZpoolRequest, CreateZpoolRequestBuilderError>
source§impl CreateZpoolRequestBuilder
impl CreateZpoolRequestBuilder
sourcepub fn vdev(
&mut self,
vdev: CreateVdevRequest
) -> &mut CreateZpoolRequestBuilder
pub fn vdev( &mut self, vdev: CreateVdevRequest ) -> &mut CreateZpoolRequestBuilder
Add vdev to request.
vdev
- CreateVdevRequest for vdev.
sourcepub fn cache(&mut self, disk: PathBuf) -> &mut CreateZpoolRequestBuilder
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.
sourcepub fn zil(&mut self, log: CreateVdevRequest) -> &mut CreateZpoolRequestBuilder
pub fn zil(&mut self, log: CreateVdevRequest) -> &mut CreateZpoolRequestBuilder
Add Vdev that will be used as ZFS Intent Log to request.
vdev
- CreateVdevRequest for ZIL device.
sourcepub fn spare(&mut self, disk: PathBuf) -> &mut CreateZpoolRequestBuilder
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
impl Clone for CreateZpoolRequestBuilder
source§fn clone(&self) -> CreateZpoolRequestBuilder
fn clone(&self) -> CreateZpoolRequestBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more