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 specCapabilityTypeValuesDefaultDescription
blocksizeBlock sizeinteger[512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576]32768Specifies the maximum size of a logical block for a volume
checksumData integrity modestring[on, off, fletcher2, fletcher4, sha256]onControls the checksum algorithm used to verify volume data integrity
compressionData compression modestring[off, on, lz4, lzjb, zle, gzip, gzip-1, gzip-2, gzip-3, gzip-4, gzip-5, gzip-6, gzip-7, gzip-8, gzip-9]lz4Controls the compression algorithm used to compress volume data
copiesNumber of data copiesinteger[1, 2, 3]1Controls the number of copies of volume data
dedupData deduplication modestring[off, on, verify, sha256, sha256,verify]offControls the deduplication algorithm used to verify volume data integrity
formatVolume formatstring[raw, qcow, qcow2, parallels, vdi, vhdx, vmdk, vpc, qed]rawControls volume format
logbiasLog bias modestring[latency, throughput]latencyProvides a hint about handling of synchronous requests for a volume
nbmandNon-blocking mandatory lockingboolean[True, False]FalseAllow or disallow non-blocking mandatory locking semantics for a volume
primarycachePrimary cache modestring[all, none, metadata]allControls what is cached in the primary cache (ARC)
rate_limitTransfer rate limitinteger0 - 2^640Controls a transfer rate limit (bytes per second) for a volume (set 0 to disabled)
readonlyRead-only modeboolean[True, False]FalseControls whether a volume can be modified
redundant_metadataMetadata redundancy modestring[all, most]allControls what types of metadata are stored redundantly
secondarycacheSecondary cachestringall, none, metadataallControls what is cached in the secondary cache (L2ARC)
smart_compressionSmart compressionboolean[True, False]FalseAllow or disallow dynamically tracks volume compression ratios to determine if a volume data is compressible or not
snapdir.zfs directory visibilityboolean[True, False]FalseControls whether the .zfs directory is hidden or visible in the root of the volume file system
syncSync modestring[standard, always, disabled]standardControls the behavior of synchronous requests to a volume
thin_provisioningThin provisioningboolean[True, False]TrueControls if a volume is created sparse (with no space reservation)
vsolutionvSolution APIboolean[True, False]FalseEnables 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>