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:
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.nmc@host:/$ create folder -o nbmand=off tank/nas nmc@host:/$ share folder tank/nas nfs
- 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
- 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
- for Python2 based distribution
- 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
- 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
- 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
- Configure cinder.conf
- Restart Cinder Service
- Systemd based system:
$ sudo systemctl restart openstack-cinder-volume.service
- Upstart/SysV based system:
$ sudo service cinder-volume restart
- Systemd based system:
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 name | Default | Choices | Description |
---|---|---|---|
nexenta_dataset_compression | lz4 | [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_address | String | IP address of NexentaStor management REST API endpoint. | |
nexenta_rest_port | 8457 | Integer | HTTP(S) port to connect to NexentaStor REST API endpoint. |
nexenta_rest_protocol | auto | [http, https, auto] | Use http or https for NexentaStor management REST API connection. |
nexenta_rest_connect_timeout | 30 | Float | Specifies the time limit (in seconds), within which the connection to NexentaStor management REST API server must be established. |
nexenta_rest_read_timeout | 300 | Float | Specifies the time limit (in seconds), within which NexentaStor management REST API server must send a response. |
nexenta_rest_backoff_factor | 0.5 | Float | Specifies 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_count | 3 | Integer | Specifies the number of times to repeat NexentaStor management REST API call in case of connection errors and NexentaStor appliance EBUSY or ENOENT errors. |
nexenta_user | admin | String | User name to connect to NexentaStor management REST API. |
nexenta_password | nexenta | String | Password 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_prefix | cinder-migration | String | Prefix for migration service name. |
nexenta_migration_snapshot_prefix | migration-snapshot | String | Prefix for migration snapshot name. |
nexenta_origin_snapshot_template | origin-snapshot-%s | String | Template string to generate origin name of clone. |
nexenta_group_snapshot_template | group-snapshot-%s | String | Template string to generate group snapshot name. |
driver_ssl_cert_verify | False | Boolean | If set to True the Cinder http client will validate the SSL certificate of the NexentaStor REST API endpoint. |
driver_ssl_cert_path | String | Can 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 name | Default | Choices | Description |
---|---|---|---|
nas_host | String | IP address or hostname of NexentaStor Appliance. | |
nas_share_path | String | NexentaStor filesystem path that holds all volumes. | |
nexenta_shares_config | /etc/cinder/nfs_shares | String | File 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/mnt | String | Base directory that contains NFS share mount points. |
nexenta_sparsed_volumes | True | Boolean | Enables 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_attempts | 3 | Integer | The number of attempts to mount or unmount NFS share before raising an error. |
nfs_mount_options or nas_mount_options | None | String | Mount options passed to the NFS client. |
NexentaStor 4.x - list of all available options, specific for iSCSI
Parameter name | Default | Choices | Description |
---|---|---|---|
nexenta_host | String | IP address or hostname of NexentaStor Appliance. | |
nexenta_blocksize | 32768 | Bytes | Block size for Cinder volumes. |
nexenta_sparse | False | Boolean | Enables or disables the creation of sparse volumes. |
nexenta_volume | cinder | String | NexentaStor pool name that holds all volumes. |
nexenta_folder | String | A folder where cinder created datasets will reside. | |
nexenta_iscsi_target_portal_groups | List | List of comma-separated NexentaStor4 iSCSI target portal groups. | |
nexenta_target_prefix | iqn.2005-07.com.nexenta:01:cinder | String | iqn prefix for NexentaStor iSCSI targets. |
nexenta_target_group_prefix | cinder | String | Prefix for iSCSI target groups on NexentaStor. |
nexenta_host_group_prefix | cinder | String | Prefix for iSCSI host groups on NexentaStor. |
nexenta_luns_per_target | 100 | Integer | Limit of LUNs per iSCSI target. |