Todo
rework after iSCSI merge (see ‘Old Docs’) (todd or vish)
Volume manager manages creating, attaching, detaching, and persistent storage.
Persistent storage volumes keep their state independent of instances. You can attach to an instance, terminate the instance, spawn a new instance (even one from a different image) and re-attach the volume with the same data intact.
Related Flags
volume_topic: | What rpc topic to listen to (default: cinder-volume). |
---|---|
volume_manager: | The module name of a class derived from manager.Manager (default: cinder.volume.manager.Manager). |
volume_driver: | Used by Manager. Defaults to cinder.volume.driver.ISCSIDriver. |
volume_group: | Name of the group that will contain exported volumes (default: cinder-volumes) |
num_shell_tries: | |
Number of times to attempt to run commands (default: 3) |
Bases: cinder.manager.SchedulerDependentManager
Manages attachable block storage devices.
Updates db to show volume is attached
Make sure whether volume is exported.
Uploads the specified volume to Glance.
Creates and exports the snapshot.
Creates and exports the volume.
Deletes and unexports snapshot.
Deletes and unexports volume.
Updates db to show volume is detached
Do any initialization that needs to be run if this is a standalone service.
Prepare volume for connection from host represented by connector.
This method calls the driver initialize_connection and returns it to the caller. The connector parameter is a dictionary with information about the host that will connect to the volume in the following format:
{
'ip': ip,
'initiator': initiator,
}
ip: the ip address of the connecting machine
initiator: the iscsi initiator name of the connecting machine. This can be None if the connecting machine does not support iscsi connections.
driver is responsible for doing any necessary security setup and returning a connection_info dictionary in the following format:
{
'driver_volume_type': driver_volume_type,
'data': data,
}
Cleanup connection from host represented by connector.
The format of connector is the same as for initialize_connection.
Drivers for volumes.
Bases: cinder.volume.driver.ISCSIDriver
Logs calls instead of executing.
No setup necessary in fake mode.
Execute that simply logs the command.
Bases: cinder.volume.driver.VolumeDriver
Executes commands relating to ISCSI volumes.
We make use of model provider properties as follows:
Make sure volume is exported.
Fetch the image from image_service and write it to the volume.
Copy the volume to the specified image.
Creates an export for a logical volume.
Synchronously recreates an export for a logical volume.
Initializes the connection and returns connection info.
The iscsi driver returns a driver_volume_type of ‘iscsi’. The format of the driver data is defined in _get_iscsi_properties. Example return value:
{
'driver_volume_type': 'iscsi'
'data': {
'target_discovered': True,
'target_iqn': 'iqn.2010-10.org.openstack:volume-00000001',
'target_portal': '127.0.0.0.1:3260',
'volume_id': 1,
}
}
Removes an export for a logical volume.
Bases: cinder.volume.driver.VolumeDriver
Logs and records calls, for unit tests.
Logs the command.
Bases: cinder.volume.driver.VolumeDriver
Implements RADOS block device (RBD) volume commands
Make sure volume is exported.
Returns an error if prerequisites aren’t met
Exports the volume
Creates an rbd snapshot
Creates a logical volume.
Creates a volume from a snapshot.
Deletes an rbd snapshot
Deletes a logical volume.
Synchronously recreates an export for a logical volume.
Returns the path of the rbd volume.
Removes an export for a logical volume
Bases: cinder.volume.driver.VolumeDriver
Executes commands relating to Sheepdog Volumes
Make sure volume is exported.
Returns an error if prerequisites aren’t met
Exports the volume
Creates a sheepdog snapshot
Creates a sheepdog volume
Creates a sheepdog volume from a snapshot.
Deletes a sheepdog snapshot
Deletes a logical volume
Safely and synchronously recreates an export for a logical volume
Removes an export for a logical volume
Bases: object
Executes commands relating to Volumes.
Callback for volume attached to instance.
Make sure volume is exported.
Returns an error if prerequisites aren’t met
Create a volume efficiently from an existing image.
image_location is a string whose format depends on the image service backend in use. The driver should use it to determine whether cloning is possible.
Returns a boolean indicating whether cloning occurred
Fetch the image from image_service and write it to the volume.
Copy the volume to the specified image.
Exports the volume. Can optionally return a Dictionary of changes to the volume object to be persisted.
Creates a snapshot.
Creates a logical volume. Can optionally return a Dictionary of changes to the volume object to be persisted.
Creates a volume from a snapshot.
Deletes a snapshot.
Deletes a logical volume.
Callback for volume detached.
Any initialization the volume driver does while starting
Synchronously recreates an export for a logical volume.
Return the current state of the volume service. If ‘refresh’ is True, run the update first.
Allow connection to connector and return connection info.
Removes an export for a logical volume.
Disallow connection from connector
Cinder uses iSCSI to export storage volumes from multiple storage nodes. These iSCSI exports are attached (using libvirt) directly to running instances.
Cinder volumes are exported over the primary system VLAN (usually VLAN 1), and not over individual VLANs.
The underlying volumes by default are LVM logical volumes, created on demand within a single large volume group.