This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.1 docs or all OpenStack docs too.

The nova.volume.san Module

Drivers for san-stored volumes.

The unique thing about a SAN is that we don’t expect that we can run the volume controller on the SAN hardware. We expect to access it over SSH or some API.

class nova.volume.san.HpSanISCSIDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.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)
Getvolumeinfo :(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 nova 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.

create_export(context, volume)
create_volume(volume)

Creates a volume.

delete_volume(volume)

Deletes a volume.

ensure_export(context, volume)

Synchronously recreates an export for a logical volume.

local_path(volume)
remove_export(context, volume)

Removes an export for a logical volume.

class nova.volume.san.SanISCSIDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.driver.ISCSIDriver

Base class for SAN-style storage volumes

A SAN-style storage value is ‘different’ because the volume controller probably won’t run on it, so we need to access is over SSH or another remote protocol.

check_for_setup_error()

Returns an error if prerequisites aren’t met

create_export(context, volume)

Exports the volume.

ensure_export(context, volume)

Synchronously recreates an export for a logical volume.

remove_export(context, volume)

Removes an export for a logical volume.

class nova.volume.san.SolarisISCSIDriver(execute=<function execute at 0x869ffb4>, sync_exec=<function execute at 0x869ffb4>, *args, **kwargs)

Bases: nova.volume.san.SanISCSIDriver

Executes commands relating to Solaris-hosted ISCSI volumes.

Basic setup for a Solaris iSCSI server:

pkg install storage-server SUNWiscsit

svcadm enable stmf

svcadm enable -r svc:/network/iscsi/target:default

pfexec itadm create-tpg e1000g0 ${MYIP}

pfexec itadm create-target -t e1000g0

Then grant the user that will be logging on lots of permissions. I’m not sure exactly which though:

zfs allow justinsb create,mount,destroy rpool

usermod -P’File System Management’ justinsb

usermod -P’Primary Administrator’ justinsb

Also make sure you can login using san_login & san_password/san_privatekey

create_export(context, volume)
create_volume(volume)

Creates a volume.

delete_volume(volume)

Deletes a volume.

ensure_export(context, volume)

Synchronously recreates an export for a logical volume.

local_path(volume)
remove_export(context, volume)

Removes an export for a logical volume.