Storage options
Definitions
- Volume Type: A group of volume policies.
- Extra Specs: The definition of a volume type. This is a group of policies. For example, provision type, compression and volume type that will be used to define a volume at creation time.
- Capabilities: What the current deployed back end in Cinder is able to do. These correspond to extra specs.
Cinder volume types
OpenStack block storage enables administrators to configure volume type and extra specs without specific knowledge of the storage backend. And volume type extra specs are used for advanced configuration of Cinder volume types. NexentaStor Cinder driver exposes additional capabilities through volume type extra specs.
NexentaStor5 storage backend capabilies
Extra spec | Capability | Type | Values | Default | Description |
---|---|---|---|---|---|
blocksize | Block size | integer | [512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576] | 32768 | Specifies the maximum size of a logical block for a volume |
checksum | Data integrity mode | string | [on, off, fletcher2, fletcher4, sha256] | on | Controls the checksum algorithm used to verify volume data integrity |
compression | Data compression mode | string | [off, on, lz4, lzjb, zle, gzip, gzip-1, gzip-2, gzip-3, gzip-4, gzip-5, gzip-6, gzip-7, gzip-8, gzip-9] | lz4 | Controls the compression algorithm used to compress volume data |
copies | Number of data copies | integer | [1, 2, 3] | 1 | Controls the number of copies of volume data |
dedup | Data deduplication mode | string | [off, on, verify, sha256, sha256,verify] | off | Controls the deduplication algorithm used to verify volume data integrity |
format | Volume format | string | [raw, qcow, qcow2, parallels, vdi, vhdx, vmdk, vpc, qed] | raw | Controls volume format |
logbias | Log bias mode | string | [latency, throughput] | latency | Provides a hint about handling of synchronous requests for a volume |
nbmand | Non-blocking mandatory locking | boolean | [True, False] | False | Allow or disallow non-blocking mandatory locking semantics for a volume |
primarycache | Primary cache mode | string | [all, none, metadata] | all | Controls what is cached in the primary cache (ARC) |
rate_limit | Transfer rate limit | integer | 0 - 2^64 | 0 | Controls a transfer rate limit (bytes per second) for a volume (set 0 to disabled) |
readonly | Read-only mode | boolean | [True, False] | False | Controls whether a volume can be modified |
redundant_metadata | Metadata redundancy mode | string | [all, most] | all | Controls what types of metadata are stored redundantly |
secondarycache | Secondary cache | string | all, none, metadata | all | Controls what is cached in the secondary cache (L2ARC) |
smart_compression | Smart compression | boolean | [True, False] | False | Allow or disallow dynamically tracks volume compression ratios to determine if a volume data is compressible or not |
snapdir | .zfs directory visibility | boolean | [True, False] | False | Controls whether the .zfs directory is hidden or visible in the root of the volume file system |
sync | Sync mode | string | [standard, always, disabled] | standard | Controls the behavior of synchronous requests to a volume |
thin_provisioning | Thin provisioning | boolean | [True, False] | True | Controls if a volume is created sparse (with no space reservation) |
vsolution | vSolution API | boolean | [True, False] | False | Enables NexentaStor vSolution API |
Also you can query the block storage host directly to determine which extra specs are supported by configured storage backens:
$ cinder service-list --binary cinder-volume
+---------------+---------------------------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+---------------+---------------------------------+------+---------+-------+----------------------------+-----------------+
| cinder-volume | openstack-pike-ns5-nfs@ns5_nfs1 | nova | enabled | up | 2021-08-05T19:26:41.000000 | - |
| cinder-volume | openstack-pike-ns5-nfs@ns5_nfs2 | nova | enabled | up | 2021-08-05T19:26:41.000000 | - |
+---------------+---------------------------------+------+---------+-------+----------------------------+-----------------+
$ cinder get-capabilities openstack-pike-ns5-nfs@ns5_nfs1
+---------------------+------------------------------------------------------------+
| Volume stats | Value |
+---------------------+------------------------------------------------------------+
| description | NexentaStor5 172.27.10.105:test/nfs |
| display_name | Capabilities of NexentaStor5 NFS driver |
| driver_version | 1.9.6 |
| namespace | OS::Storage::Capabilities::openstack-pike-ns5-nfs@ns5_nfs1 |
| pool_name | test |
| replication_targets | [] |
| storage_protocol | NFS |
| vendor_name | Nexenta |
| visibility | None |
| volume_backend_name | ns5_nfs1 |
+---------------------+------------------------------------------------------------+
+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Backend properties | Value |
+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| nexenta:volume_blocksize | {'default': 32768, 'enum': [512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576], 'type': 'integer', 'description': 'Specifies the maximum size of a logical block for a volume.', 'title': 'Block size'} |
| nexenta:volume_checksum | {'default': 'on', 'enum': ['on', 'off', 'fletcher2', 'fletcher4', 'sha256'], 'type': 'string', 'description': 'Controls the checksum algorithm used to verify volume data integrity.', 'title': 'Data integrity mode'} |
| nexenta:volume_compression | {'default': 'lz4', 'enum': ['off', 'on', 'lz4', 'lzjb', 'zle', 'gzip', 'gzip-1', 'gzip-2', 'gzip-3', 'gzip-4', 'gzip-5', 'gzip-6', 'gzip-7', 'gzip-8', 'gzip-9'], 'type': 'string', 'description': 'Controls the compression algorithm used to compress volume data.', 'title': 'Data compression mode'} |
| nexenta:volume_copies | {'default': 1, 'enum': [1, 2, 3], 'type': 'integer', 'description': 'Controls the number of copies of volume data.', 'title': 'Number of data copies'} |
| nexenta:volume_dedup | {'default': 'off', 'enum': ['off', 'on', 'verify', 'sha256', 'sha256,verify'], 'type': 'string', 'description': 'Controls the deduplication algorithm used to verify volume data integrity.', 'title': 'Data deduplication mode'} |
| nexenta:volume_format | {'default': 'raw', 'enum': ['raw', 'qcow', 'qcow2', 'parallels', 'vdi', 'vhdx', 'vmdk', 'vpc', 'qed'], 'type': 'string', 'description': 'Controls volume format.', 'title': 'Volume format'} |
| nexenta:volume_logbias | {'default': 'latency', 'enum': ['latency', 'throughput'], 'type': 'string', 'description': 'Provides a hint about handling of synchronous requests for a volume.', 'title': 'Log bias mode'} |
| nexenta:volume_nbmand | {'default': False, 'type': 'boolean', 'description': 'Allow or disallow non-blocking mandatory locking semantics for a volume.', 'title': 'Non-blocking mandatory locking'} |
| nexenta:volume_primarycache | {'default': 'all', 'enum': ['all', 'none', 'metadata'], 'type': 'string', 'description': 'Controls what is cached in the primary cache (ARC).', 'title': 'Primary cache mode'} |
| nexenta:volume_rate_limit | {'default': 0, 'type': 'integer', 'description': 'Controls a transfer rate limit (bytes per second) for a volume.', 'title': 'Transfer rate limit'} |
| nexenta:volume_readonly | {'default': False, 'type': 'boolean', 'description': 'Controls whether a volume can be modified.', 'title': 'Read-only mode'} |
| nexenta:volume_redundant_metadata | {'default': 'all', 'enum': ['all', 'most'], 'type': 'string', 'description': 'Controls what types of metadata are stored redundantly.', 'title': 'Metadata redundancy mode'} |
| nexenta:volume_secondarycache | {'default': 'all', 'enum': ['all', 'none', 'metadata'], 'type': 'string', 'description': 'Controls what is cached in the secondary cache (L2ARC).', 'title': 'Secondary cache'} |
| nexenta:volume_smart_compression | {'default': False, 'type': 'boolean', 'description': 'Allow or disallow dynamically tracks volume compression ratios to determine if a volume data is compressible or not.', 'title': 'Smart compression'} |
| nexenta:volume_snapdir | {'default': False, 'type': 'boolean', 'description': 'Controls whether the .zfs directory is hidden or visible in the root of the volume file system.', 'title': '.zfs directory visibility'} |
| nexenta:volume_sync | {'default': 'standard', 'enum': ['standard', 'always', 'disabled'], 'type': 'string', 'description': 'Controls the behavior of synchronous requests to a volume.', 'title': 'Sync mode'} |
| nexenta:volume_thin_provisioning | {'default': True, 'type': 'boolean', 'description': 'Controls if a volume is created sparse (with no space reservation).', 'title': 'Thin provisioning'} |
| nexenta:volume_vsolution | {'default': False, 'type': 'boolean', 'description': 'Enables NexentaStor vSolution API.', 'title': 'vSolution API'} |
+------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Create a Cinder volume type with custom extra specs
Create a new volume type with name custom:
$ cinder type-create custom
Set NexentaStor5 backend name:
$ cinder type-key custom set volume_backend_name=ns5_nfs1
Set rate limit in 16MB/s:
$ cinder type-key custom set nexenta:volume_rate_limit=16777216
Set gzip compression:
$ cinder type-key custom set nexenta:volume_compression=gzip
Disable thin provisioning:
$ cinder type-key custom set nexenta:volume_thin_provisioning=False
Display all enabled extra specs for the custom volume type:
$ cinder type-show custom
+---------------------------------+------------------------------------------+
| Property | Value |
+---------------------------------+------------------------------------------+
| description | None |
| extra_specs | nexenta:volume_compression : gzip |
| | nexenta:volume_rate_limit : 16777216 |
| | nexenta:volume_thin_provisioning : False |
| | volume_backend_name : ns5_nfs1 |
| id | 77c38d3b-d075-4c12-9b9f-481681dfd914 |
| name | custom |
+---------------------------------+------------------------------------------+
Create a Cinder volume using custom volume type
$ cinder create --volume-type custom 32
$ cinder list
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
| 0c475166-4687-48f1-8b68-201eb54b1d42 | available | - | 32 | custom | false | |
+--------------------------------------+-----------+------+------+-------------+----------+-------------+
Check Cinder volume properties
To check the actual volume properties on the NexentaStor5 appliance:
CLI@nexenta> filesystem get all test/nfs/volume-0c475166-4687-48f1-8b68-201eb54b1d42
PATH PROPERTY VALUE SOURCE
test/nfs/volume-0c475166-4687-48f1-8b68-201eb54b1d42 used 32.25G -
test/nfs/volume-0c475166-4687-48f1-8b68-201eb54b1d42 compression gzip local
test/nfs/volume-0c475166-4687-48f1-8b68-201eb54b1d42 limit 16M local
CLI@nexenta>