The cinder.volume.drivers.san.hp_lefthand Module

HP Lefthand SAN ISCSI Driver.

The driver communicates to the backend aka Cliq via SSH to perform all the operations on the SAN.

class HpSanISCSIDriver(*args, **kwargs)

Bases: cinder.volume.drivers.san.san.SanISCSIDriver

Executes commands relating to HP/Lefthand SAN ISCSI volumes.

We use the CLIQ interface, over SSH.

Rough overview of CLIQ commands used:

Createvolume :(creates the volume)
Deletevolume :(deletes the volume)
Modifyvolume :(extends the volume)
Createsnapshot :
 (creates the snapshot)
Deletesnapshot :
 (deletes the snapshot)
Clonesnapshot :(creates the volume from a snapshot)
Getvolumeinfo :(to discover the IQN etc)
Getsnapshotinfo :
 (to discover the IQN etc)
Getclusterinfo :
 (to discover the iSCSI target IP address)
Assignvolumechap :
 (exports it with CHAP security)

The ‘trick’ here is that the HP SAN enforces security by default, so normally a volume mount would need both to configure the SAN in the volume layer and do the mount on the compute layer. Multi-layer operations are not catered for at the moment in the cinder architecture, so instead we share the volume using CHAP at volume creation time. Then the mount need only use those CHAP credentials, so can take place exclusively in the compute layer.

Version history:

1.0.0 - Initial driver 1.1.0 - Added create/delete snapshot, extend volume, create volume

from snapshot support.
VERSION = '1.1.0'
create_snapshot(snapshot)

Creates a snapshot.

create_volume(volume)

Creates a volume.

create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot.

delete_snapshot(snapshot)

Deletes a snapshot.

delete_volume(volume)

Deletes a volume.

device_stats = {}
extend_volume(volume, new_size)

Extend the size of an existing volume.

get_volume_stats(refresh)
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. HP VSA requires a volume to be assigned to a server.

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

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

}

}

local_path(volume)
terminate_connection(volume, connector, **kwargs)

Unassign the volume from the host.

Previous topic

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

Next topic

The cinder.volume.drivers.san.san Module

This Page