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:
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.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
- 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
- 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 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 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_dataset_dedup | off | off, on, sha256, verify, sha256,verify | Deduplication algorithm used to verify volume data integrity. |
nexenta_sparsed_volumes | True | Boolean | Volumes 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_address | String | IP address of NexentaStor management REST API endpoint, for HA environment it can have multiple comma separated values. | |
nexenta_image_cache | True | Boolean | Enables an internal cache of images to efficiently create a new volume by cloning an existing cached image. |
nexenta_blocksize | 32768 | Integer | Specifies 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_throttle | 1-2047 | Throttle migration throughput in MegaBytes per second. | |
nexenta_rest_port | 8443 | Integer | HTTP(S) port to connect to NexentaStor REST API endpoint. |
nexenta_use_https | True | Boolean | Use secure HTTP for 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 | 1 | 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 | 5 | 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_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. |
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_cache_image_template | cache-image-%s | String | Template string to generate cache image name. |
nexenta_cache_snapshot_template | cache-snapshot-%s | String | Template string to generate cache snapshot name. |
NexentaStor 5.x - list of all available options, specific for NFS
Parameter name | Default | Choices | Description |
---|---|---|---|
nexenta_vsolution | False | Boolean | Enables NexentaStor vSolution API and allows to create and extend raw Cinder volumes on a NexentaStor5 side. |
nexenta_volume_format | raw | raw, qcow, qcow2, parallels, vdi, vhdx, vmdk, vpc, qed | Volume image file format. |
nexenta_nbmand | False | Boolean | Allow or disallow non-blocking mandatory locking semantics for a volume. |
nexenta_smart_compression | False | Boolean | Allow or disallow dynamically tracks per-volume compression ratios to determine if a volume data is compressible or not. |
nexenta_mount_point_base | $state_path/mnt | String | Base directory that contains NFS share mount points. |
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 5.x - list of all available options, specific for iSCSI
Parameter name | Default | Choices | Description |
---|---|---|---|
nexenta_host | String | IP address of NexentaStor Appliance. | |
nexenta_volume | cinder | String | NexentaStor pool name that holds all volumes. |
nexenta_volume_group | iscsi | String | A volumegroup where cinder created datasets will reside. |
nexenta_iscsi_target_portal_port | 3260 | Integer | NexentaStor iSCSI target portal port. |
nexenta_iscsi_target_portals | List | Comma separated list of portals for NexentaStor5, in format of IP1:port1,IP2:port2. Port is optional, default port is 3260. | |
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. |