Volume types in Cinder are a label or identifier that is selected during volume creation. Typically, volume types correspond with some attribute of the volumes, for example, SSD
, High IOPS
, and Encrypted
. We will use this with the next recipe to define further features of our Cinder service.
To create a volume type, you will need the following:
openrc
file with appropriate credentials for the environment (you must be an administrator)openstack
command-line client"High IOPS"
volume type as a contrived example type that would refer to a block storage device dedicated to High IOPS.We will use the openstack volume type
command to operate on Cinder volume types. To create a volume type, use the following steps:
openstack volume type list
This will bring back an output like the following. Here we have the default set when we installed our LVM service:
openstack volume type create --description "The High IOPS volume type is QOS applied to 500 IOPS" "High IOPS"
This will bring back an output like the following:
openstack volume type list
This will now bring back our additional volume type:
--type
flag as follows:openstack volume create --size 10 --type "High IOPS" --description "High IOPS Volume" highiops.volume
The openstack volume type create
command has only one mandatory parameter, name
. The name
parameter allows users to define different volume types or identifiers. While typically based on some attribute of the storage, such as department, storage backend, or QOS level, as these are labels, as long as they're well understood, the name can be arbitrary.
Additionally, the --description
flag can be used to provide more detail on the volume type. The --private
flag allows you to restrict visibility from the public. The --project
flag allows the selective sharing of a private volume type with other named projects.
We will then take advantage of these types (with further configuration of Cinder to specify that a type of storage, which is associated with a particular volume type) by issuing the --type
flag to the volume create
command:
openstack volume create --size size_GiB --description "meaningful description" --type "Type" volume_name
18.191.5.166