Struct devicemapper::ThinPoolDev
[−]
[src]
pub struct ThinPoolDev { /* fields omitted */ }
DM construct to contain thin provisioned devices
Methods
impl ThinPoolDev
[src]
Use DM to create a "thin-pool". A "thin-pool" is shared space for other thin provisioned devices to use.
See section "Setting up a fresh pool device": https://www.kernel.org/doc/Documentation/device-mapper/thin-provisioning.txt
fn new(
name: &DmName,
dm: &DM,
data_block_size: Sectors,
low_water_mark: DataBlocks,
meta: LinearDev,
data: LinearDev
) -> DmResult<ThinPoolDev>
[src]
name: &DmName,
dm: &DM,
data_block_size: Sectors,
low_water_mark: DataBlocks,
meta: LinearDev,
data: LinearDev
) -> DmResult<ThinPoolDev>
Construct a new ThinPoolDev with the given data and meta devs. TODO: If the device already exists, verify that kernel's model matches arguments.
fn meta_dev(&self) -> &LinearDev
[src]
Obtain the meta device that backs this thin pool device.
fn data_dev(&self) -> &LinearDev
[src]
Obtain the data device that backs this thin pool device.
fn data_block_size(&self) -> Sectors
[src]
Obtain the data block size for this thin pool device.
fn setup(
name: &DmName,
dm: &DM,
data_block_size: Sectors,
low_water_mark: DataBlocks,
meta: LinearDev,
data: LinearDev
) -> DmResult<ThinPoolDev>
[src]
name: &DmName,
dm: &DM,
data_block_size: Sectors,
low_water_mark: DataBlocks,
meta: LinearDev,
data: LinearDev
) -> DmResult<ThinPoolDev>
Set up an existing ThinPoolDev. By "existing" is here meant that metadata for the thinpool already exists on the thinpool's metadata device.
fn message(&self, dm: &DM, message: &str) -> DmResult<()>
[src]
send a message to DM thin pool
fn status(&self, dm: &DM) -> DmResult<ThinPoolStatus>
[src]
Get the current status of the thinpool. Returns an error if there was an error getting the status value. Panics if there is an error parsing the status value.
fn extend_meta(&mut self, dm: &DM, new_segs: Vec<Segment>) -> DmResult<()>
[src]
Extend an existing meta device with additional new segments.
fn extend_data(&mut self, dm: &DM, new_segs: Vec<Segment>) -> DmResult<()>
[src]
Extend an existing data device with additional new segments.
Trait Implementations
impl Debug for ThinPoolDev
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.
impl DmDevice for ThinPoolDev
[src]
fn devnode(&self) -> PathBuf
[src]
The device's device node.
fn dstr(&self) -> String
[src]
The device's number, formatted as a string maj:min.
fn name(&self) -> &DmName
[src]
The device's name.
fn size(&self) -> Sectors
[src]
The number of sectors available for user data.
fn teardown(self, dm: &DM) -> DmResult<()>
[src]
Erase the kernel's memory of this device.