The cinder.volume.drivers.storwize_svc Module

Volume driver for IBM Storwize family and SVC storage systems.

Notes: 1. If you specify both a password and a key file, this driver will use the

key file only.
  1. When using a key file for authentication, it is up to the user or system administrator to store the private key in a safe manner.
  2. The defaults for creating volumes are “-rsize 2% -autoexpand -grainsize 256 -warning 0”. These can be changed in the configuration file or by using volume types(recommended only for advanced users).

Limitations: 1. The driver expects CLI output in English, error messages may be in a

localized format.
  1. Clones and creating volumes from snapshots, where the source and target are of different sizes, is not supported.
class CLIResponse(raw, delim='!', with_header=True)

Bases: object

Parse SVC CLI output and generate iterable

static append_dict(dict_, key, value)
select(*keys)
class StorwizeSVCDriver(*args, **kwargs)

Bases: cinder.volume.drivers.san.san.SanDriver

IBM Storwize V7000 and SVC iSCSI/FC volume driver.

Version history: 1.0 - Initial driver 1.1 - FC support, create_cloned_volume, volume type support,

get_volume_stats, minor bug fixes
VERSION = '1.1.0'
check_for_setup_error()

Ensure that the flags are set properly.

create_cloned_volume(tgt_volume, src_volume)
create_export(ctxt, volume)
create_snapshot(snapshot)
create_volume(volume)
create_volume_from_snapshot(volume, snapshot)
delete_snapshot(snapshot)
delete_volume(volume)
do_setup(ctxt)

Check that we have all configuration details from the storage.

ensure_export(ctxt, volume)

Check that the volume exists on the storage.

The system does not “export” volumes as a Linux iSCSI target does, and therefore we just check that the volume exists on the storage.

extend_volume(volume, new_size)
get_volume_stats(refresh=False)

Get volume stats.

If we haven’t gotten stats yet or ‘refresh’ is True, run update the stats first.

initialize_connection(volume, connector)

Perform the necessary work so that an iSCSI/FC connection can be made.

To be able to create an iSCSI/FC connection from a given host to a volume, we must: 1. Translate the given iSCSI name or WWNN to a host name 2. Create new host on the storage system if it does not yet exist 3. Map the volume to the host if it is not already done 4. Return the connection information for relevant nodes (in the

proper I/O group)
migrate_volume(ctxt, volume, host)

Migrate direclty if source and dest are managed by same storage.

The method uses the migratevdisk method, which returns almost immediately, if the source and target pools have the same extent_size. Otherwise, it uses addvdiskcopy and rmvdiskcopy, which require waiting for the copy operation to complete.

Parameters:
  • ctxt – Context
  • volume – A dictionary describing the volume to migrate
  • host – A dictionary describing the host to migrate to, where host[‘host’] is its name, and host[‘capabilities’] is a dictionary of its reported capabilities.
remove_export(ctxt, volume)
terminate_connection(volume, connector, **kwargs)

Cleanup after an iSCSI connection has been terminated.

When we clean up a terminated connection between a given connector and volume, we: 1. Translate the given connector to a host name 2. Remove the volume-to-host mapping if it exists 3. Delete the host if it has no more mappings (hosts are created

automatically by this driver when mappings are created)
validate_connector(connector)

Check connector for at least one enabled protocol (iSCSI/FC).

Previous topic

The cinder.volume.drivers.solidfire Module

Next topic

The cinder.volume.drivers.vmware.api Module

This Page