4.6. Associating a QoS specification with a volume type
You must associate a Quality of Service (QoS) specification with a volume type to apply the QoS limits to volumes.
If a volume is already attached to an instance, then the QoS limits are only applied to this volume when the volume is detached and then reattached to this instance.
Prerequisites
- The required volume type is created. For more information, see Creating and configuring a volume type.
- The required QoS specification is created. For more information, see Creating and configuring a QoS specification.
Procedure
Access the remote shell for the
openstackclientpod from your workstation:n:$ oc rsh -n openstack openstackclientAssociate the required QoS specification with the required volume type:
$ openstack volume qos associate <qos_spec_name> <volume_type>-
Replace
<qos_spec_name>with the name or ID of the QoS specification. You can run theopenstack volume qos listcommand to list the name and ID of all the QoS specifications. -
Replace
<volume_type>with the name or ID of the volume type. You can run theopenstack volume type listcommand to list the name and ID of all the volume types.
-
Replace
Verify that the QoS specification has been associated:
$ openstack volume qos listThe
Associationscolumn of the output table provides the names of the volume types that are associated with each QoS specification.For example:
+--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+
| ID | Name | Consumer | Associations | Properties |
+--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+
| 9fc9a481-28e9-49b8-84eb-f0a476cc89a5 | myqoslimits | both | MyVolType | read_iops_sec='6500', size_iops_sec='4096', write_iops_sec='7500' |
+--------------------------------------+--------------+-----------+--------------+-------------------------------------------------------------------+
Exit the
openstackclientpod:$ exit