The cinder.volume.drivers.nexenta.iscsi Module

class NexentaISCSIDriver(*args, **kwargs)

Bases: cinder.volume.driver.ISCSIDriver

Executes volume driver commands on Nexenta Appliance.

Version history:

1.0.0 - Initial driver version.
1.0.1 - Fixed bug #1236626: catch "does not exist" exception of
        lu_exists.
1.1.0 - Changed class name to NexentaISCSIDriver.
1.1.1 - Ignore "does not exist" exception of nms.snapshot.destroy.
1.1.2 - Optimized create_cloned_volume, replaced zfs send recv with zfs
        clone.
1.1.3 - Extended volume stats provided by _update_volume_stats method.
1.2.0 - Added volume migration with storage assist method.
1.2.1 - Fixed bug #1263258: now migrate_volume update provider_location
        of migrated volume; after migrating volume migrate_volume
        destroy snapshot on migration destination.
1.3.0 - Added retype method.
1.3.0.1 - Target creation refactor.
1.3.1 - Added ZFS cleanup.
CI_WIKI_NAME = 'Nexenta_CI'
VERSION = '1.3.1'
backend_name
check_for_setup_error()

Verify that the volume for our zvols exists.

Raise:LookupError
create_cloned_volume(volume, src_vref)

Creates a clone of the specified volume.

Parameters:
  • volume – new volume reference
  • src_vref – source volume reference
create_export(_ctx, volume, connector)

Create new export for zvol.

Parameters:volume – reference of volume to be exported
Returns:iscsiadm-formatted provider location string
create_snapshot(snapshot)

Create snapshot of existing zvol on appliance.

Parameters:snapshot – snapshot reference
create_volume(volume)

Create a zvol on appliance.

Parameters:volume – volume reference
Returns:model update dict for volume reference
create_volume_from_snapshot(volume, snapshot)

Create new volume from other’s snapshot on appliance.

Parameters:
  • volume – reference of volume to be created
  • snapshot – reference of source snapshot
delete_snapshot(snapshot)

Delete volume’s snapshot on appliance.

Parameters:snapshot – snapshot reference
delete_volume(volume)

Destroy a zvol on appliance.

Parameters:volume – volume reference
do_setup(context)
ensure_export(_ctx, volume)
extend_volume(volume, new_size)

Extend an existing volume.

Parameters:
  • volume – volume reference
  • new_size – volume new size in GB
static get_nms_for_url(url)

Returns initialized nms object for url.

get_volume_stats(refresh=False)

Get volume stats.

If ‘refresh’ is True, run update the stats first.

local_path(volume)

Return local path to existing local volume.

We never have local volumes, so it raises NotImplementedError.

Raise:NotImplementedError
migrate_volume(ctxt, volume, host)

Migrate if volume and host are managed by Nexenta appliance.

Parameters:
  • ctxt – context
  • volume – a dictionary describing the volume to migrate
  • host – a dictionary describing the host to migrate to
remove_export(_ctx, volume)

Destroy all resources created to export zvol.

Parameters:volume – reference of volume to be unexported
retype(context, volume, new_type, diff, host)

Convert the volume to be of the new type.

Parameters:
  • ctxt – Context
  • volume – A dictionary describing the volume to migrate
  • new_type – A dictionary describing the volume type to convert to
  • diff – A dictionary with the difference between the two types
  • 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.