class documentation
class FileStorage(base.BlockDev):
File device.
This class represents a file storage backend device.
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 | |
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 |
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 | |
Return URIs hypervisors can use to access disks in userspace mode. |
| 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 |
@classmethod
def Create(cls, unique_id, children, size, spindles, params, excl_stor, dyn_params, **kwargs): ¶
def Create(cls, unique_id, children, size, spindles, params, excl_stor, dyn_params, **kwargs): ¶
overrides
ganeti.storage.base.BlockDev.CreateCreate a new file.
| Parameters | |
| unique | Undocumented |
| children | Undocumented |
| size:int | the size of file in MiB |
| spindles | Undocumented |
| params | Undocumented |
| excl | Undocumented |
| dyn | Undocumented |
| **kwargs | Undocumented |
| Returns | |
bdev.FileStorage | an instance of FileStorage |
overrides
ganeti.storage.base.BlockDev.AssembleAssemble the device.
Checks whether the file device exists, raises BlockDeviceError otherwise.
overrides
ganeti.storage.base.BlockDev.AttachAttach to an existing file.
Check if this file already exists.
| Returns | |
| boolean | True if file exists |
overrides
ganeti.storage.base.BlockDev.CloseNotifies that the device will no longer be used for I/O.
This is a no-op for the file type.
overrides
ganeti.storage.base.BlockDev.GrowGrow the file
| Parameters | |
| amount | the amount (in mebibytes) to grow with |
| dryrun | Undocumented |
| backingstore | Undocumented |
| excl | Undocumented |
overrides
ganeti.storage.base.BlockDev.OpenMake the device ready for I/O.
This is a no-op for the file type.
overrides
ganeti.storage.base.BlockDev.RemoveRemove the file backing the block device.
| Returns | |
| boolean | True if the removal was successful |
overrides
ganeti.storage.base.BlockDev.ShutdownShutdown the device.
This is a no-op for the file type, as we don't deactivate the file on shutdown.