NexentaStor 5.x
Supported operations are (currently only NFS is supported)
- Create share
- Delete share
- Extend share
- Shrink share
- Allow share access (Only IP access type is supported - RW/RO)
- Deny share access
- Create snapshot
- Revert to snapshot
- Delete snapshot
- Create share from snapshot
- Share creation options - Thin/thick provisioning, compression
- Manage share
- Unmanage share
Installation
Pre-requisites
- NexentaStor 5.x Appliance pre-provisioned and licensed
- Pool and parent filesystem configured (this filesystem will contain all manila shares)
- Manila service provisioned
Download Driver
It’s recommended to get the latest driver from Nexenta’s repository: https://github.com/Nexenta/manila
The branches in the repository correspond with Openstack releases.
To following command can be used to download the exact version w/o having to switch branches
git clone -b stable/pike
- this will download the exact version, no need to switch
Nexenta Drivers are located under the following path: https://github.com/Nexenta/manila/tree/stable/pike/manila/share/drivers/nexenta
The path includes drivers for NexentaStor 4.x and NexentaStor 5.x Make sure to copy the whole folder.
Installation Steps
- Determine manila driver location path used in your environment
- Clone or download the correct version of the drivers, unzip if downloaded and copy to the cinder location. For example drivers for Pike release:
$ git clone -b stable/pike https://github.com/Nexenta/manila nexenta-manila $ cp -rf nexenta-manila/manila/share/drivers/nexenta /usr/lib/python2.7/dist-packages/manila/share/drivers
- Configure manila.conf
- Restart Manila Service
- Systemd based system:
$ sudo systemctl restart openstack-manila-share.service
- Upstart/SysV based system:
$ sudo service manila-share restart
- Systemd based system:
manila.conf driver section examples:
NStor5:
[DEFAULT]
enabled_share_backends = ns5_nfs
enabled_share_protocols = NFS
[ns5_nfs]
share_backend_name = <backend name to be used in share_types>
driver_handles_share_servers = False
nexenta_folder = manila
share_driver = manila.share.drivers.nexenta.ns5.nexenta_nas.NexentaNasDriver
nexenta_rest_address = 10.3.1.1,10.3.1.2 # Comma separated management IPs for host
nexenta_nas_host = 10.3.1.10 # pool VIP
nexenta_rest_port = 8443
nexenta_pool = pool1
nexenta_nfs = True
nexenta_user = admin
nexenta_password = secret_password
nexenta_thin_provisioning = True
List of all available options:
Parameter name | Default | Choices or Type | Description |
---|---|---|---|
nexenta_rest_address | ip address or hostname | Management address for NexentaStor Rest operations. | |
nexenta_nas_host | ip address or hostname | VIP of NexentaStor pool. | |
nexenta_rest_port | 8457 | integer | Port to connect to Nexenta REST API server. |
nexenta_retry_count | 6 | integer | Number of retries for unsuccessful API calls. |
nexenta_use_https | True | boolean | Use HTTP secure protocol for NexentaStor management REST API connections. |
nexenta_user | admin | string | User name to connect to Nexenta SA. |
nexenta_password | string | Password to connect to Nexenta SA. | |
nexenta_volume | volume1 | string | Volume name on NexentaStor4 |
nexenta_pool | pool1 | string | Pool name on NexentaStor5. |
nexenta_folder | folder | string | Parent folder on NexentaStor. |
nexenta_nfs | True | boolean | Defines whether share over NFS is enabled. |
nexenta_ssl_cert_verify | False | boolean | Defines whether the driver should check ssl certificate. |
nexenta_rest_connect_timeout | 30 | integer | Specifies the time limit (in seconds), within which the connection to NexentaStor management REST API server must be established |
nexenta_rest_read_timeout | 300 | integer | Specifies the time limit (in seconds), within which NexentaStor management REST API server must send a response |
nexenta_rest_backoff_factor | 1 | integer | Specifies the backoff factor to apply between connection attempts to NexentaStor management REST API server |
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_share_name_template | share- | string | Share name template that will be followed with share_id. It will be seen on NexentaStor side as share-51daca66-a713-41a8-91cd-7270429a166a. |
nexenta_dataset_compression | on | [on, off, gzip, gzip-1, gzip-2, gzip-3, gzip-4, gzip-5, gzip-6, gzip-7, gzip-8,gzip-9, lzjb, zle, lz4] | Compression value for new ZFS folders. |
nexenta_thin_provisioning | True | boolean | If True shares will not be space guaranteed and overprovisioning will be enabled.’ |
nexenta_dataset_record_size | 131072 | integer | Specifies a suggested block size in for files in a file system. (bytes) |
nexenta_anon | string | Effective user name for unknown users, -1 disables anonymous access to the share, root allows full access. |
Using Manila Driver
Create share type
manila type-create my_type1 false
Configure share type
manila type-key my_type1 set share_backend_name=ns_nfs dataset_compression=on thin_provisioning=true snapshot_support=true create_share_from_snapshot_support=true
we have configured our share type to use ns_nfs backend with compression, thin provisioning and full snapshot support.
Create share (thick/thin/compression)
manila create --share_type my_type1 --name my_share1 nfs 10
we have created a share of share type “my_type1” named my_share1 shared via NFS with 10 GB size.
Setup permissions
manila access-allow --access-level ro my_share1 ip 10.0.1.1
note that default access level is rw.
Create snapshot
manila snapshot-create my_share1
Create share from snapshot
manila create --share_type my_type1 --snapshot dc9437db-83ae-4443-aecd-6840845482e7 --name my_share_from_snapshot-1 nfs 20