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

Class PersistentBlockDevice

source code


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.

Instance Methods [hide private]
 
__init__(self, unique_id, children, size)
Attaches to a static block device.
source code
 
Remove(self)
Remove a device
source code
 
Rename(self, new_id)
Rename this device.
source code
 
Attach(self)
Attach to an existing block 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)
Grow the logical volume.
source code

Inherited from BlockDev: CombinedSyncStatus, GetActualSize, GetSyncStatus, PauseResumeSync, SetInfo, SetSyncSpeed, __repr__

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

Class Methods [hide private]
 
Create(cls, unique_id, children, size)
Create a new device
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

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

source code 

Attaches to a static block device.

The unique_id is a path under /dev.

Overrides: object.__init__

Create(cls, unique_id, children, size)
Class Method

source code 

Create a new device

This is a noop, we only return a PersistentBlockDevice instance

Overrides: BlockDev.Create

Remove(self)

source code 

Remove a device

This is a noop

Overrides: BlockDev.Remove

Rename(self, new_id)

source code 

Rename this device.

Overrides: BlockDev.Rename

Attach(self)

source code 

Attach to an existing block device.

Overrides: BlockDev.Attach

Assemble(self)

source code 

Assemble the device.

Overrides: BlockDev.Assemble

Shutdown(self)

source code 

Shutdown the device.

Overrides: BlockDev.Shutdown

Open(self, force=False)

source code 

Make the device ready for I/O.

Overrides: BlockDev.Open

Close(self)

source code 

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

Overrides: BlockDev.Close

Grow(self, amount, dryrun)

source code 

Grow the logical volume.

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