Skip to main content

Module vdev

Module vdev 

Source
Expand description

Consumer friendly structure representing vdev.

Everything that goes into vdev is in this module.

§Examples

§Create a mirror with 2 disks
use libzetta::zpool::CreateVdevRequest;
use std::path::PathBuf;

// Create an `Vec` with two disks
let drives = vec![PathBuf::from("nvd0p4.eli"), PathBuf::from("nvd1p4.eli")];
let vdev = CreateVdevRequest::Mirror(drives);
§Create a single disk vdev with sparse file
use libzetta::zpool::CreateVdevRequest;
use std::path::PathBuf;
// (file needs to exist prior)
let path = PathBuf::from("/tmp/sparseFile0");
let vdev = CreateVdevRequest::SingleDisk(path);

Structs§

Disk
Basic building block of vdev.
DiskBuilder
Builder for Disk.
ErrorStatistics
Error statistics.
Vdev
Basic zpool building block.
VdevBuilder
Builder for Vdev.

Enums§

CreateVdevRequest
Consumer friendly wrapper to configure vdev to zpol.
DiskBuilderError
Error type for DiskBuilder
VdevBuilderError
Error type for VdevBuilder
VdevType
A type of Vdev.