class GlusterStorage(base.BlockDev):
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 a new file. |
Method | __init__ |
Initalizes a file device backend. |
Method |
|
Assemble the device. |
Method |
|
Attach to an existing file. |
Method |
|
Notifies that the device will no longer be used for I/O. |
Method |
|
Return the actual disk size. |
Method |
|
Generate KVM userspace URIs to be used as `-drive file` settings. |
Method |
|
Grow the file |
Method |
|
Make the device ready for I/O. |
Method |
|
Remove the file backing the block device. |
Method |
|
Renames the file. |
Method |
|
Shutdown the device. |
Instance Variable | attached |
Undocumented |
Instance Variable | dev |
Undocumented |
Instance Variable | driver |
Undocumented |
Instance Variable | file |
Undocumented |
Instance Variable | full |
Undocumented |
Instance Variable | path |
Undocumented |
Instance Variable | volume |
Undocumented |
Inherited from BlockDev
:
Method | __eq__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method |
|
Calculate the mirror status recursively for our children. |
Method |
|
Builds the shell command for exporting data from device. |
Method |
|
Return the actual disk size and number of spindles used. |
Method |
|
Return the actual number of spindles used. |
Method |
|
Returns the sync status of the device. |
Method |
|
Builds the shell command for importing data to device. |
Method |
|
Pause/Resume the sync of the mirror. |
Method |
|
Update metadata with info text. |
Method |
|
Adjust the synchronization parameters of the mirror. |
Method |
|
Creates a snapshot of the block device. |
Instance Variable | dyn |
Undocumented |
Instance Variable | major |
Undocumented |
Instance Variable | minor |
Undocumented |
Instance Variable | params |
Undocumented |
Instance Variable | size |
Undocumented |
Instance Variable | unique |
Undocumented |
Instance Variable | _children |
Undocumented |
def Create(cls, unique_id, children, size, spindles, params, excl_stor, dyn_params, **kwargs): ¶
ganeti.storage.base.BlockDev.Create
Create a new file.
Parameters | |
unique | Undocumented |
children | Undocumented |
size | the size of file in MiB |
spindles | Undocumented |
params | Undocumented |
excl | Undocumented |
dyn | Undocumented |
**kwargs | Undocumented |
Returns | |
bdev.FileStorage | an instance of FileStorage |
ganeti.storage.base.BlockDev.Assemble
Assemble the device.
Checks whether the file device exists, raises BlockDeviceError otherwise.
ganeti.storage.base.BlockDev.Attach
Attach to an existing file.
Check if this file already exists.
Returns | |
boolean | True if file exists |
ganeti.storage.base.BlockDev.Close
Notifies that the device will no longer be used for I/O.
This is a no-op for the file type.
Generate KVM userspace URIs to be used as `-drive file` settings.
See Also | |
BlockDev.GetUserspaceAccessUri | |
https://github.com/qemu/qemu/commit/8d6d89cb63c57569864ecdeb84d3a1c2eb |
ganeti.storage.base.BlockDev.Grow
Grow the file
Parameters | |
amount | the amount (in mebibytes) to grow with |
dryrun | Undocumented |
backingstore | Undocumented |
excl | Undocumented |
ganeti.storage.base.BlockDev.Open
Make the device ready for I/O.
This is a no-op for the file type.
ganeti.storage.base.BlockDev.Remove
Remove the file backing the block device.
Returns | |
boolean | True if the removal was successful |