NexentaStor 5.x

Cinder Driver Prerequisites

  • Storage appliance must be configured and licensed
  • ZFS pool must be created
  • For iSCSI backend - volume group must be created, for example:
    CLI@host> volumegroup create pool/san
    
  • For NFS backend - file system must be created and shared over NFS, for example:
    CLI@host> filesystem create -p -o nonBlockingMandatoryMode=off,smartCompression=off tank/nas  
    CLI@host> nfs share -o sec=sys,rw=@10/8,@192.168/16 tank/nas
    
    Note: nonBlockingMandatoryMode option controls if non-blocking mandatory locks are enabled or disabled. OpenStack image related operations (like converting between different image types or creation volume from an existing image) requires mandatory locks.
  • Storage Network configured between NS Appliance and OpenStack Hypervisors (Recommended 10GBE, MTU 9000)

Recommended NFS options

NFS version 3 protocol is recommended for general use. Here is a list of relevant parameters for different components of the OpenStack:

Cinder volume and cinder backup via cinder.conf:

[nexenta_backend]
volume_driver = cinder.volume.drivers.nexenta.ns5.nfs.NexentaNfsDriver
nfs_mount_options = vers=3,minorversion=0,timeo=100,nolock

Where to get drivers?

It’s recommended to get the latest drivers from Nexenta’s GitHub repositories:

The branches in the repositores correspond with OpenStack releases.

The following commands can be used to download the exact version without having to switch branches:

$ git clone -b stable/pike https://github.com/Nexenta/cinder
$ git clone -b stable/pike https://github.com/Nexenta/os-brick

Nexenta Cinder drivers are located under the following path: https://github.com/Nexenta/cinder/tree/stable/pike/cinder/volume/drivers/nexenta

The path includes driver for NexentaStor 4.x and NexentaStor 5.x. Make sure to copy the whole folder.

Installation Steps

  1. Determine Cinder and OS-Brick locations used in your environment, for example:
    • for Python2 based distribution /usr/lib/python2.7/dist-packages
    • for Python3 based distribution /usr/lib/python3.5/dist-packages
  2. Create a backup copy for the existing drivers:
    $ sudo cp -r /usr/lib/python2.7/dist-packages/cinder/volume/drivers/nexenta /usr/lib/python2.7/dist-packages/cinder/volume/drivers/nexenta.orig
    $ sudo cp -r /usr/lib/python2.7/dist-packages/os_brick /usr/lib/python2.7/dist-packages/os_brick.orig
    
  3. Clone or download the correct version of the drivers, unzip if downloaded and copy to the Cinder and OS-Brick locations. For example drivers for Pike release:
    $ git clone -b stable/pike https://github.com/Nexenta/cinder nexenta-cinder
    $ git clone -b stable/pike https://github.com/Nexenta/os-brick nexenta-os-brick
    
    $ sudo cp -rf nexenta-cinder/cinder/volume/drivers/nexenta /usr/lib/python2.7/dist-packages/cinder/volume/drivers
    $ sudo cp -f nexenta-os-brick/os_brick/initiator/connectors/remotefs.py /usr/lib/python2.7/dist-packages/os_brick/initiator/connectors/remotefs.py
    $ sudo cp -f nexenta-os-brick/os_brick/remotefs/remotefs.py /usr/lib/python2.7/dist-packages/os_brick/remotefs/remotefs.py
    
  4. Compile the updated drivers:
    $ sudo python2.7 -m compileall /usr/lib/python2.7/dist-packages/cinder/volume/drivers/nexenta
    $ sudo python2.7 -m compileall /usr/lib/python2.7/dist-packages/os_brick/initiator/connectors/remotefs.py /usr/lib/python2.7/dist-packages/os_brick/remotefs/remotefs.py
    
  5. Configure cinder.conf
  6. Restart Cinder Service
    • Systemd based system: $ sudo systemctl restart openstack-cinder-volume.service
    • Upstart/SysV based system: $ sudo service cinder-volume restart

NexentaStor 5.x NFS HA minimal recommended cinder.conf

[ns5_nfs]
volume_driver = cinder.volume.drivers.nexenta.ns5.nfs.NexentaNfsDriver
driver_ssl_cert_verify = False
volume_backend_name = ns5_nfs
nexenta_rest_address = 10.0.1.1,10.0.1.2
nexenta_rest_port = 8443
nexenta_user = admin
nexenta_password = Nexenta@1
nas_host = 10.0.0.1
nas_share_path = tank/nas
nas_mount_options = vers=3,minorversion=0,timeo=100,nolock

NexentaStor 5.x NFS standalone minimal recommended cinder.conf

[ns5_nfs]
volume_driver = cinder.volume.drivers.nexenta.ns5.nfs.NexentaNfsDriver
driver_ssl_cert_verify = False
volume_backend_name = ns5_nfs
nexenta_rest_address = 10.0.1.1
nexenta_rest_port = 8443
nexenta_user = admin
nexenta_password = Nexenta@1
nas_host = 10.0.0.1
nas_share_path = tank/nas
nas_mount_options = vers=3,minorversion=0,timeo=100,nolock

NexentaStor 5.x iSCSI HA minimal recommended cinder.conf

[ns5_iscsi]
volume_driver = cinder.volume.drivers.nexenta.ns5.iscsi.NexentaISCSIDriver
driver_ssl_cert_verify = False
volume_backend_name = ns5_iscsi
nexenta_host = 10.0.0.1
nexenta_rest_address = 10.0.1.1,10.1.1.2
nexenta_rest_port = 8443
nexenta_user = admin
nexenta_password = Nexenta@1
nexenta_volume = tank
nexenta_volume_group = san

NexentaStor 5.x iSCSI standalone minimal recommended cinder.conf

[ns5_iscsi]
volume_driver = cinder.volume.drivers.nexenta.ns5.iscsi.NexentaISCSIDriver
driver_ssl_cert_verify = False
volume_backend_name = ns5_iscsi
nexenta_host = 10.0.0.1
nexenta_rest_address = 10.0.1.1
nexenta_rest_port = 8443
nexenta_user = admin
nexenta_password = Nexenta@1
nexenta_volume = tank
nexenta_volume_group = san

NexentaStor 5.x - list of all available options, common for NFS and iSCSI

Parameter nameDefaultChoicesDescription
nexenta_dataset_compressionlz4off, on, gzip, gzip-1, gzip-2, gzip-3, gzip-4, gzip-5, gzip-6, gzip-7, gzip-8, gzip-9, lzjb, zle, lz4Controls the compression algorithm to compress Cinder volumes data.
nexenta_dataset_dedupoffoff, on, sha256, verify, sha256,verifyDeduplication algorithm used to verify volume data integrity.
nexenta_sparsed_volumesTrueBooleanVolumes space allocation behavior. Whether volume is created as sparse and grown as needed or fully allocated up front. The default and recommended value is true, which ensures volumes are initially created as sparse devices. Setting value to false will result in volumes being fully allocated at the time of creation.
nexenta_rest_addressStringIP address of NexentaStor management REST API endpoint, for HA environment it can have multiple comma separated values.
nexenta_image_cacheTrueBooleanEnables an internal cache of images to efficiently create a new volume by cloning an existing cached image.
nexenta_blocksize32768IntegerSpecifies a suggested block size for a volume. The size specified must be a power of two greater than or equal to 512 and less than or equal to 131072 bytes. For an NFS backend, the block size may be up to 1048576 bytes. For an iSCSI backend, the block size cannot be changed after the volume is created.
nexenta_migration_throttle1-2047Throttle migration throughput in MegaBytes per second.
nexenta_rest_port8443IntegerHTTP(S) port to connect to NexentaStor REST API endpoint.
nexenta_use_httpsTrueBooleanUse secure HTTP for REST API connection.
nexenta_rest_connect_timeout30FloatSpecifies the time limit (in seconds), within which the connection to NexentaStor management REST API server must be established.
nexenta_rest_read_timeout300FloatSpecifies the time limit (in seconds), within which NexentaStor management REST API server must send a response.
nexenta_rest_backoff_factor1FloatSpecifies the backoff factor to apply between connection attempts to NexentaStor management REST API server. For example, if the nexenta_rest_backoff_factor is 0.5 then Nexenta Cinder driver will sleep for [0.5, 1, 2, 4, 8, …] seconds between retries. Sleep intervals are calculated by the formula: nexenta_rest_backoff_factor * (2 ** (number_of_total_retries - 1)).
nexenta_rest_retry_count5IntegerSpecifies the number of times to repeat NexentaStor management REST API call in case of connection errors and NexentaStor appliance EBUSY or ENOENT errors.
nexenta_useradminStringUser name to connect to NexentaStor management REST API.
nexenta_passwordnexentaStringPassword to connect to NexentaStor management REST API.
nexenta_origin_snapshot_templateorigin-snapshot-%sStringTemplate string to generate origin name of clone.
nexenta_group_snapshot_templategroup-snapshot-%sStringTemplate string to generate group snapshot name.
nexenta_migration_service_prefixcinder-migrationStringPrefix for migration service name.
nexenta_migration_snapshot_prefixmigration-snapshotStringPrefix for migration snapshot name.
nexenta_cache_image_templatecache-image-%sStringTemplate string to generate cache image name.
nexenta_cache_snapshot_templatecache-snapshot-%sStringTemplate string to generate cache snapshot name.

NexentaStor 5.x - list of all available options, specific for NFS

Parameter nameDefaultChoicesDescription
nexenta_vsolutionFalseBooleanEnables NexentaStor vSolution API and allows to create and extend raw Cinder volumes on a NexentaStor5 side.
nexenta_volume_formatrawraw, qcow, qcow2, parallels, vdi, vhdx, vmdk, vpc, qedVolume image file format.
nexenta_nbmandFalseBooleanAllow or disallow non-blocking mandatory locking semantics for a volume.
nexenta_smart_compressionFalseBooleanAllow or disallow dynamically tracks per-volume compression ratios to determine if a volume data is compressible or not.
nexenta_mount_point_base$state_path/mntStringBase directory that contains NFS share mount points.
nfs_mount_attempts3IntegerThe number of attempts to mount or unmount NFS share before raising an error.
nfs_mount_options or nas_mount_optionsNoneStringMount options passed to the NFS client.

NexentaStor 5.x - list of all available options, specific for iSCSI

Parameter nameDefaultChoicesDescription
nexenta_hostStringIP address of NexentaStor Appliance.
nexenta_volumecinderStringNexentaStor pool name that holds all volumes.
nexenta_volume_groupiscsiStringA volumegroup where cinder created datasets will reside.
nexenta_iscsi_target_portal_port3260IntegerNexentaStor iSCSI target portal port.
nexenta_iscsi_target_portalsListComma separated list of portals for NexentaStor5, in format of IP1:port1,IP2:port2. Port is optional, default port is 3260.
nexenta_target_prefixiqn.2005-07.com.nexenta:01:cinderStringiqn prefix for NexentaStor iSCSI targets.
nexenta_target_group_prefixcinderStringPrefix for iSCSI target groups on NexentaStor.
nexenta_host_group_prefixcinderStringPrefix for iSCSI host groups on NexentaStor.
nexenta_luns_per_target100IntegerLimit of LUNs per iSCSI target.