Package ganeti :: Package storage :: Module bdev :: Class ExtStorageDevice
[hide private]
[frames] | no frames]

Class ExtStorageDevice

source code


A block device provided by an ExtStorage Provider.

This class implements the External Storage Interface, which means handling of the externally provided block devices.

Instance Methods [hide private]
 
__init__(self, unique_id, children, size, params)
Attaches to an extstorage block device.
source code
 
Remove(self)
Remove the extstorage device.
source code
 
Rename(self, new_id)
Rename this device.
source code
 
Attach(self)
Attach to an existing extstorage device.
source code
 
Assemble(self)
Assemble the device.
source code
 
Shutdown(self)
Shutdown the device.
source code
 
Open(self, force=False)
Make the device ready for I/O.
source code
 
Close(self)
Notifies that the device will no longer be used for I/O.
source code
 
Grow(self, amount, dryrun, backingstore, excl_stor)
Grow the Volume.
source code
 
SetInfo(self, text)
Update metadata with info text.
source code

Inherited from base.BlockDev: CombinedSyncStatus, GetActualDimensions, GetActualSize, GetActualSpindles, GetSyncStatus, PauseResumeSync, SetSyncParams, __repr__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
BlockDev
Create(cls, unique_id, children, size, spindles, params, excl_stor)
Create a new extstorage device.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, unique_id, children, size, params)
(Constructor)

source code 

Attaches to an extstorage block device.

Overrides: object.__init__

Create(cls, unique_id, children, size, spindles, params, excl_stor)
Class Method

source code 

Create a new extstorage device.

Provision a new volume using an extstorage provider, which will then be mapped to a block device.

Parameters:
  • unique_id - unique identifier; the details depend on the actual device type
  • children - for hierarchical devices, the child devices
  • size - size in MiB
  • spindles - number of physical disk to dedicate to the device
  • params - device-specific options/parameters
  • excl_stor - whether exclusive_storage is active
Returns: BlockDev
the created device, or None in case of an error
Overrides: base.BlockDev.Create

Remove(self)

source code 

Remove the extstorage device.

Overrides: base.BlockDev.Remove

Rename(self, new_id)

source code 

Rename this device.

Overrides: base.BlockDev.Rename

Attach(self)

source code 

Attach to an existing extstorage device.

This method maps the extstorage volume that matches our name with a corresponding block device and then attaches to this device.

Overrides: base.BlockDev.Attach

Assemble(self)

source code 

Assemble the device.

Overrides: base.BlockDev.Assemble

Shutdown(self)

source code 

Shutdown the device.

Overrides: base.BlockDev.Shutdown

Open(self, force=False)

source code 

Make the device ready for I/O.

Overrides: base.BlockDev.Open

Close(self)

source code 

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

Overrides: base.BlockDev.Close

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

source code 

Grow the Volume.

Parameters:
  • amount (integer) - the amount (in mebibytes) to grow with
  • dryrun (boolean) - whether to execute the operation in simulation mode only, without actually increasing the size
Overrides: base.BlockDev.Grow

SetInfo(self, text)

source code 

Update metadata with info text.

Overrides: base.BlockDev.SetInfo