class documentation

class GlusterStorage(base.BlockDev):

View In Hierarchy

File device using the Gluster backend.

This class represents a file storage backend device stored on Gluster. Ganeti mounts and unmounts the Gluster devices automatically.

The unique_id for the file device is a (file_driver, file_path) tuple.

Class Method Create Create a new file.
Method __init__ Initalizes a file device backend.
Method Assemble Assemble the device.
Method Attach Attach to an existing file.
Method Close Notifies that the device will no longer be used for I/O.
Method GetActualSize Return the actual disk size.
Method GetUserspaceAccessUri Generate KVM userspace URIs to be used as `-drive file` settings.
Method Grow Grow the file
Method Open Make the device ready for I/O.
Method Remove Remove the file backing the block device.
Method Rename Renames the file.
Method Shutdown Shutdown the device.
Instance Variable attached Undocumented
Instance Variable dev_path Undocumented
Instance Variable driver Undocumented
Instance Variable file Undocumented
Instance Variable full_path Undocumented
Instance Variable path Undocumented
Instance Variable volume 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 GetActualSpindles Return the actual number of spindles used.
Method GetSyncStatus Returns the sync status of the device.
Method Import Builds the shell command for importing data to device.
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 major Undocumented
Instance Variable minor 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 file.

Parameters
unique_idUndocumented
childrenUndocumented
sizethe size of file in MiB
spindlesUndocumented
paramsUndocumented
excl_storUndocumented
dyn_paramsUndocumented
**kwargsUndocumented
Returns
bdev.FileStoragean instance of FileStorage
def __init__(self, unique_id, children, size, params, dyn_params, **kwargs):

Initalizes a file device backend.

def Assemble(self):

Assemble the device.

Checks whether the file device exists, raises BlockDeviceError otherwise.

def Attach(self, **kwargs):

Attach to an existing file.

Check if this file already exists.

Returns
booleanTrue if file exists
def Close(self):

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

This is a no-op for the file type.

def GetActualSize(self):

Return the actual disk size.

Note
the device needs to be active when this is called
def GetUserspaceAccessUri(self, hypervisor):

Generate KVM userspace URIs to be used as `-drive file` settings.

See Also
BlockDev.GetUserspaceAccessUri
https://github.com/qemu/qemu/commit/8d6d89cb63c57569864ecdeb84d3a1c2eb
def Grow(self, amount, dryrun, backingstore, excl_stor):

Grow the file

Parameters
amountthe amount (in mebibytes) to grow with
dryrunUndocumented
backingstoreUndocumented
excl_storUndocumented
def Open(self, force=False, exclusive=True):

Make the device ready for I/O.

This is a no-op for the file type.

def Remove(self):

Remove the file backing the block device.

Returns
booleanTrue if the removal was successful
def Rename(self, new_id):

Renames the file.

def Shutdown(self):

Shutdown the device.

attached =

Undocumented

dev_path =

Undocumented

driver =

Undocumented

file =

Undocumented

full_path =

Undocumented

path =

Undocumented

volume =

Undocumented