The cinder.volume.drivers.san.hp.hp_3par_iscsi Module

Volume driver for HP 3PAR Storage array. This driver requires 3.1.3 firmware on the 3PAR array, using the 3.x version of the hp3parclient.

You will need to install the python hp3parclient. sudo pip install –upgrade “hp3parclient>=3.1”

Set the following in the cinder.conf file to enable the 3PAR iSCSI Driver along with the required flags:

volume_driver=cinder.volume.drivers.san.hp.hp_3par_iscsi.HP3PARISCSIDriver

class HP3PARISCSIDriver(*args, **kwargs)

Bases: cinder.volume.driver.TransferVD, cinder.volume.driver.ManageableVD, cinder.volume.driver.ExtendVD, cinder.volume.driver.CloneableVD, cinder.volume.driver.SnapshotVD, cinder.volume.driver.MigrateVD, cinder.volume.driver.ConsistencyGroupVD, cinder.volume.driver.BaseVD

OpenStack iSCSI driver to enable 3PAR storage array.

Version history:

1.0 - Initial driver 1.1 - QoS, extend volume, multiple iscsi ports, remove domain,

session changes, faster clone, requires 3.1.2 MU2 firmware.
1.2.0 - Updated the use of the hp3parclient to 2.0.0 and refactored
the drivers to use the new APIs.

1.2.1 - Synchronized extend_volume method. 1.2.2 - Added try/finally around client login/logout. 1.2.3 - log exceptions before raising 1.2.4 - Fixed iSCSI active path bug #1224594 1.2.5 - Added metadata during attach/detach bug #1258033 1.2.6 - Use least-used iscsi n:s:p for iscsi volume attach bug #1269515

This update now requires 3.1.2 MU3 firmware

1.3.0 - Removed all SSH code. We rely on the hp3parclient now. 2.0.0 - Update hp3parclient API uses 3.0.x 2.0.2 - Add back-end assisted volume migrate 2.0.3 - Added support for managing/unmanaging of volumes 2.0.4 - Added support for volume retype 2.0.5 - Added CHAP support, requires 3.1.3 MU1 firmware

and hp3parclient 3.1.0.

2.0.6 - Fixing missing login/logout around attach/detach bug #1367429 2.0.7 - Add support for pools with model update 2.0.8 - Migrate without losing type settings bug #1356608 2.0.9 - Removing locks bug #1381190 2.0.10 - Add call to queryHost instead SSH based findHost #1398206 2.0.11 - Added missing host name during attach fix #1398206 2.0.12 - Removed usage of host name cache #1398914 2.0.13 - Update LOG usage to fix translations. bug #1384312 2.0.14 - Do not allow a different iSCSI IP (hp3par_iscsi_ips) to be

used during live-migration. bug #1423958

2.0.15 - Added support for updated detach_volume attachment. 2.0.16 - Added encrypted property to initialize_connection #1439917 2.0.17 - Python 3 fixes 2.0.18 - Improved VLUN creation and deletion logic. #1469816 2.0.19 - Changed initialize_connection to use getHostVLUNs. #1475064 2.0.20 - Adding changes to support 3PAR iSCSI multipath. 2.0.21 - Adds consistency group support 2.0.22 - Update driver to use ABC metaclasses 2.0.23 - Added update_migrated_volume. bug # 1492023 2.0.24 - Use same LUN ID for each VLUN path #1551994

VERSION = '2.0.24'
attach_volume(context, volume, instance_uuid, host_name, mountpoint)
check_for_setup_error()

Setup errors are already checked for in do_setup so return pass.

create_cgsnapshot(context, cgsnapshot)
create_cloned_volume(volume, src_vref)

Clone an existing volume.

create_consistencygroup(context, group)
create_consistencygroup_from_src(context, group, volumes, cgsnapshot=None, snapshots=None, source_cg=None, source_vols=None)
create_export(context, volume, connector)
create_snapshot(snapshot)
create_volume(volume)
create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot.

TODO: support using the size from the user.

delete_cgsnapshot(context, cgsnapshot)
delete_consistencygroup(context, group)
delete_snapshot(snapshot)
delete_volume(volume)
detach_volume(context, volume, attachment=None)
do_setup(context)
ensure_export(context, volume)

Ensure the volume still exists on the 3PAR.

Also retrieves CHAP credentials, if present on the volume

extend_volume(volume, new_size)
get_pool(volume)
get_volume_stats(refresh=False)
initialize_connection(volume, connector)

Assigns the volume to a server.

Assign any created volume to a compute node/host so that it can be used from that host.

This 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’: {

‘encrypted’: False, ‘target_discovered’: True, ‘target_iqn’: ‘iqn.2010-10.org.openstack:volume-00000001’, ‘target_protal’: ‘127.0.0.1:3260’, ‘volume_id’: 1,

}

}

Steps to export a volume on 3PAR
  • Get the 3PAR iSCSI iqn
  • Create a host on the 3par
  • create vlun on the 3par
initialize_iscsi_ports(common)
manage_existing(volume, existing_ref)
manage_existing_get_size(volume, existing_ref)
migrate_volume(context, volume, host)
remove_export(context, volume)
retype(context, volume, new_type, diff, host)

Convert the volume to be of the new type.

terminate_connection(volume, connector, **kwargs)

Driver entry point to unattach a volume from an instance.

unmanage(volume)
update_consistencygroup(context, group, add_volumes=None, remove_volumes=None)
update_migrated_volume(context, volume, new_volume, original_volume_status)

Update the name of the migrated volume to it’s new ID.

Previous topic

The cinder.volume.drivers.san.hp.hp_3par_fc Module

Next topic

The cinder.volume.drivers.san.hp.hp_lefthand_cliq_proxy Module

Project Source

This Page