Bases: object
Context manager to simplify error handling for connecting to ceph.
Bases: object
List of command line parameters to be passed to ceph commands to reflect RBDDriver configuration such as RBD user name and location of ceph.conf.
Create a snapshot of an RBD volume.
Volume: | Name of RBD object |
---|---|
Name: | Name of snapshot |
Pool: | Name of pool |
Protect: | Set the snapshot to “protected” |
A one-shot version of cleanup_volumes()
“Flattens” a snapshotted image with the parents’ data, effectively detaching it from the parent.
Volume: | Name of RBD object |
---|---|
Pool: | Name of pool |
Import RBD volume from image file.
Uses the command line import instead of librbd since rbd import command detects zeroes to preserve sparseness in the image.
Base: | Path to image file |
---|---|
Name: | Name of RBD volume |
Returns the pool, image and snapshot name for the parent of an RBD volume.
Volume: | Name of RBD object |
---|---|
Pool: | Name of pool |
Remove RBD volume
Name: | Name of RBD volume |
---|
Removes a snapshot from an RBD volume.
Volume: | Name of RBD object |
---|---|
Name: | Name of snapshot |
Ignore_errors: | whether or not to log warnings on failures |
Pool: | Name of pool |
Force: | Remove snapshot even if it is protected |
Resize RBD volume.
Name: | Name of RBD object |
---|---|
Size: | New size in bytes |
Revert an RBD volume to its contents at a snapshot.
Volume: | Name of RBD object |
---|---|
Name: | Name of snapshot |
Bases: object
Context manager for dealing with an existing rbd volume.
This handles connecting to rados and opening an ioctx automatically, and otherwise acts like a librbd Image object.
The underlying librados client and ioctx can be accessed as the attributes ‘client’ and ‘ioctx’.
Bases: object
A wrapper around rbd.RBD class instance to avoid blocking of process.
Offloads all calls to rbd.RBD class methods to native OS threads, so that we do not block the whole process while executing the librbd code.