class documentation

class PersistentBlockDevice(base.BlockDev):

View In Hierarchy

A block device with persistent node

May be either directly attached, or exposed through DM (e.g. dm-multipath). udev helpers are probably required to give persistent, human-friendly names.

For the time being, pathnames are required to lie under /dev.

Class Method Create Create a new device
Method __init__ Attaches to a static block device.
Method Assemble Assemble the device.
Method Attach Attach to an existing block device.
Method Close Notifies that the device will no longer be used for I/O.
Method Grow Grow the logical volume.
Method Import Builds the shell command for importing data to device.
Method Open Make the device ready for I/O.
Method Remove Remove a device
Method Rename Rename this device.
Method Shutdown Shutdown the device.
Instance Variable attached Undocumented
Instance Variable dev_path Undocumented
Instance Variable major Undocumented
Instance Variable minor Undocumented

Inherited from BlockDev:

Method __eq__ Undocumented
Method __repr__ Undocumented
Method CombinedSyncStatus Calculate the mirror status recursively for our children.
Method Export Builds the shell command for exporting data from device.
Method GetActualDimensions Return the actual disk size and number of spindles used.
Method GetActualSize Return the actual disk size.
Method GetActualSpindles Return the actual number of spindles used.
Method GetSyncStatus Returns the sync status of the device.
Method GetUserspaceAccessUri Return URIs hypervisors can use to access disks in userspace mode.
Method PauseResumeSync Pause/Resume the sync of the mirror.
Method SetInfo Update metadata with info text.
Method SetSyncParams Adjust the synchronization parameters of the mirror.
Method Snapshot Creates a snapshot of the block device.
Instance Variable dyn_params Undocumented
Instance Variable params Undocumented
Instance Variable size Undocumented
Instance Variable unique_id Undocumented
Instance Variable _children Undocumented
@classmethod
def Create(cls, unique_id, children, size, spindles, params, excl_stor, dyn_params, **kwargs):

Create a new device

This is a noop, we only return a PersistentBlockDevice instance

def __init__(self, unique_id, children, size, params, dyn_params, **kwargs):

Attaches to a static block device.

The unique_id is a path under /dev.

def Assemble(self):

Assemble the device.

def Attach(self):

Attach to an existing block device.

def Close(self):

Notifies that the device will no longer be used for I/O.

def Grow(self, amount, dryrun, backingstore, excl_stor):

Grow the logical volume.

def Import(self):

Builds the shell command for importing data to device.

See Also
BlockDev.Import for details
def Open(self, force=False, exclusive=True):

Make the device ready for I/O.

def Remove(self):

Remove a device

This is a noop

def Rename(self, new_id):

Rename this device.

def Shutdown(self):

Shutdown the device.

attached: bool =

Undocumented

dev_path =

Undocumented

major =

Undocumented

minor =

Undocumented