NexentaStor 4.x

Cinder Driver Prerequisites

  • Storage appliance must be configured and licensed
  • Volume must be created, for example:
    nmc@host:/$ create volume tank c0t0d0 c0t1d0
    
  • For iSCSI backend - folder must be created, for example:
    nmc@host:/$ create folder tank/san
    
  • For NFS backend - file system must be created and shared over NFS, for example:
    nmc@host:/$ create folder -o nbmand=off tank/nas
    nmc@host:/$ share folder tank/nas nfs
    
    Note: nbmand 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.nfs.NexentaNfsDriver
nas_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 4.x NFS minimal recommended cinder.conf

[ns4_nfs]
volume_driver = cinder.volume.drivers.nexenta.nfs.NexentaNfsDriver
volume_backend_name = ns4_nfs
nexenta_user = admin
nexenta_password = nexenta
nas_host = 10.0.0.1
nas_share_path = tank/nas
nas_mount_options = vers=3,minorversion=0,timeo=100,nolock

Note: For NexentaStor 4.x NFS driver prior to version 1.4 a shares config file must be present. This file should consist of 1 or multiple lines with 2 columns separated by a space. The first column represents the NFS filesystem path for the mount command, and the second is url for Rest API calls. For example, /etc/cinder/shares.cfg:

10.0.0.1:/volumes/tank1/nfs_share http://admin:nexenta@10.0.0.1:8457
10.0.0.100:/volumes/tank2/cinder-volumes http://admin:secret@10.0.0.100:8457

And the appropriate cinder configuration file:

[ns4_nfs]
volume_driver = cinder.volume.drivers.nexenta.nfs.NexentaNfsDriver
volume_backend_name = ns4_nfs
nexenta_shares_config = /etc/cinder/shares.cfg

NexentaStor 4.x iSCSI minimal recommended cinder.conf

[ns4_iscsi]
volume_driver = cinder.volume.drivers.nexenta.iscsi.NexentaISCSIDriver
volume_backend_name = ns4_iscsi
nexenta_user = admin
nexenta_password = nexenta
nexenta_host = 10.0.0.1
nexenta_volume = tank
nexenta_folder = san

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

Parameter nameDefaultChoicesDescription
nexenta_dataset_compressionlz4[off, on, gzip, gzip-1, gzip-2, gzip-3, gzip-4, gzip-5, gzip-6, gzip-7, gzip-8, gzip-9, lzjb, zle, lz4]Controls the compression algorithm to compress Cinder volumes data.
nexenta_rest_addressStringIP address of NexentaStor management REST API endpoint.
nexenta_rest_port8457IntegerHTTP(S) port to connect to NexentaStor REST API endpoint.
nexenta_rest_protocolauto[http, https, auto]Use http or https for NexentaStor management 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_factor0.5FloatSpecifies 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_count3IntegerSpecifies 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_migration_throttle[1-2047]Throttle for storage assistant migration throughput in MegaBytes per second.
nexenta_migration_service_prefixcinder-migrationStringPrefix for migration service name.
nexenta_migration_snapshot_prefixmigration-snapshotStringPrefix for migration snapshot name.
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.
driver_ssl_cert_verifyFalseBooleanIf set to True the Cinder http client will validate the SSL certificate of the NexentaStor REST API endpoint.
driver_ssl_cert_pathStringCan be used to specify a non default path to a CA_BUNDLE file or directory with certificates of trusted CAs, which will be used to validate the NexentaStor REST API backend.

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

Parameter nameDefaultChoicesDescription
nas_hostStringIP address or hostname of NexentaStor Appliance.
nas_share_pathStringNexentaStor filesystem path that holds all volumes.
nexenta_shares_config/etc/cinder/nfs_sharesStringFile with the list of available nfs shares (only for NexentaStor 4.x NFS driver prior to version 1.4).
nexenta_mount_point_base$state_path/mntStringBase directory that contains NFS share mount points.
nexenta_sparsed_volumesTrueBooleanEnables or disables the creation of volumes as sparsed files that take no space. If disabled (False), volume is created as a regular file, which takes a long time.
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 4.x - list of all available options, specific for iSCSI

Parameter nameDefaultChoicesDescription
nexenta_hostStringIP address or hostname of NexentaStor Appliance.
nexenta_blocksize32768BytesBlock size for Cinder volumes.
nexenta_sparseFalseBooleanEnables or disables the creation of sparse volumes.
nexenta_volumecinderStringNexentaStor pool name that holds all volumes.
nexenta_folderStringA folder where cinder created datasets will reside.
nexenta_iscsi_target_portal_groupsListList of comma-separated NexentaStor4 iSCSI target portal groups.
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.