Struct devicemapper::ThinDev [−][src]
pub struct ThinDev { /* fields omitted */ }
DM construct for a thin block device
Methods
impl ThinDev
[src]
impl ThinDev
support use of DM for thin provisioned devices over pools
pub fn new(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
length: Sectors,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId
) -> DmResult<ThinDev>
[src]
pub fn new(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
length: Sectors,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId
) -> DmResult<ThinDev>
Create a ThinDev using thin_pool as the backing store. If the specified thin_id is already in use by the thin pool an error is returned. If the device is already among the list of devices that dm is aware of, return an error.
pub fn setup(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
length: Sectors,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId
) -> DmResult<ThinDev>
[src]
pub fn setup(
dm: &DM,
name: &DmName,
uuid: Option<&DmUuid>,
length: Sectors,
thin_pool: &ThinPoolDev,
thin_id: ThinDevId
) -> DmResult<ThinDev>
Set up a thin device which already belongs to the given thin_pool. The thin device is identified by the thin_id, which is already known to the pool.
If the device is already known to kernel, just verify that specified data matches and return an error if it does not.
If the device has no thin id already registered with the thin pool an error is returned.
pub fn snapshot(
&self,
dm: &DM,
snapshot_name: &DmName,
snapshot_uuid: Option<&DmUuid>,
thin_pool: &ThinPoolDev,
snapshot_thin_id: ThinDevId
) -> DmResult<ThinDev>
[src]
pub fn snapshot(
&self,
dm: &DM,
snapshot_name: &DmName,
snapshot_uuid: Option<&DmUuid>,
thin_pool: &ThinPoolDev,
snapshot_thin_id: ThinDevId
) -> DmResult<ThinDev>
Create a snapshot of a ThinDev. Once created a snapshot is the same as any other thin provisioned device. There is no need to track any connection between the source and the snapshot.
pub fn id(&self) -> ThinDevId
[src]
pub fn id(&self) -> ThinDevId
return the thin id of the linear device
pub fn status(&self, dm: &DM) -> DmResult<ThinStatus>
[src]
pub fn status(&self, dm: &DM) -> DmResult<ThinStatus>
Get the current status of the thin device.
pub fn set_table(
&mut self,
dm: &DM,
table: TargetLine<ThinTargetParams>
) -> DmResult<()>
[src]
pub fn set_table(
&mut self,
dm: &DM,
table: TargetLine<ThinTargetParams>
) -> DmResult<()>
Set the table for the thin device's target
pub fn destroy(self, dm: &DM, thin_pool: &ThinPoolDev) -> DmResult<()>
[src]
pub 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.