Struct devicemapper::ThinDev
[−]
[src]
pub struct ThinDev { /* fields omitted */ }
DM construct for a thin block device
Methods
impl ThinDev
[src]
support use of DM for thin provisioned devices over pools
fn new(
name: &str,
dm: &DM,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId,
length: Sectors
) -> DmResult<ThinDev>
name: &str,
dm: &DM,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId,
length: Sectors
) -> DmResult<ThinDev>
Use the given ThinPoolDev as backing space for a newly constructed thin provisioned ThinDev returned by new().
fn setup(
name: &str,
dm: &DM,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId,
length: Sectors
) -> DmResult<ThinDev>
name: &str,
dm: &DM,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId,
length: Sectors
) -> DmResult<ThinDev>
Set up an existing thindev. By "existing" is here meant that metadata for this thin device exists on the metadata device for its thin pool. TODO: If the device is already known to the kernel, verify that kernel model matches arguments.
fn name(&self) -> &str
name of the thin device
fn dstr(&self) -> String
Get the "x:y" device string for this LinearDev
fn size(&self) -> Sectors
return the total size of the linear device
fn id(&self) -> ThinDevId
return the thin id of the linear device
fn devnode(&self) -> DmResult<PathBuf>
path of the device node
fn status(&self, dm: &DM) -> DmResult<ThinStatus>
Get the current status of the thin device.
fn extend(&mut self, dm: &DM, sectors: Sectors) -> DmResult<()>
Extend the thin device's (virtual) size by the number of sectors given.
fn destroy(self, dm: &DM, thin_pool: &ThinPoolDev) -> DmResult<()>
Tear down the DM device, and also delete resources associated with its thin id from the thinpool.
fn teardown(self, dm: &DM) -> DmResult<()>
Tear down the DM device.