[nova] Change Volume Type Properties
Hi, I'm looking for a way to add the property volume_backend_name to an existing Volume Type which is in use. If I try to change this, I got the following error: root@control01rt:~# openstack volume type show test-type +--------------------+--------------------------------------+ | Field | Value | +--------------------+--------------------------------------+ | access_project_ids | None | | description | None | | id | 68febdad-e7b1-4d41-ba11-72d0e1a1cce0 | | is_public | True | | name | test-type | | properties | | | qos_specs_id | None | +--------------------+--------------------------------------+ root@control01rt:~# openstack volume type set --property volume_backend_name=ceph test-type Failed to set volume type property: Volume Type is currently in use. (HTTP 400) (Request-ID: req-2b8f3829-5c16-42c3-ac57-01199688bd58) Command Failed: One or more of the operations failed root@control01rt:~# Problem what I see is, that there are instances/volumes which use this volume type. Have anybody an idea, how I can add the volume_backend_name property to the existing Volume Type? thanks in advance! Regards Marc
(updated subject with correct project name) On 8/5/20 9:33 AM, Marc Vorwerk wrote:
Hi,
I'm looking fora way to add the property /volume_backend_name/ to an existing Volume Type which is in use.
If I try to change this, I got the following error:
root@control01rt:~# openstack volume type show test-type
+--------------------+--------------------------------------+
| Field | Value |
+--------------------+--------------------------------------+
| access_project_ids | None |
| description | None |
| id | 68febdad-e7b1-4d41-ba11-72d0e1a1cce0 |
| is_public | True |
| name | test-type |
| properties | |
| qos_specs_id | None |
+--------------------+--------------------------------------+
root@control01rt:~# openstack volume type set --property volume_backend_name=ceph test-type
Failed to set volume type property: Volume Type is currently in use. (HTTP 400) (Request-ID: req-2b8f3829-5c16-42c3-ac57-01199688bd58)
Command Failed: One or more of the operations failed
root@control01rt:~#
Problem what I see is, that there are instances/volumes which use this volume type.
Have anybody an idea, how I can add the /volume_backend_name/ property to the existing Volume Type?
This is not allowed since the scheduler may have already scheduled these volumes to a different backend than the one you are now specifying in the extra specs. That would lead to a mismatch between the volumes and their volume type that isn't obvious. To get around this, you will need to create a new volume type with the volume_backend_name you want specified first. You can then retype your existing volumes to this new volume type. Assuming most or all of these volumes are already on that backend, the retype operation should just be a quick database update. If needed, you can then delete the original volume type that is no longer being used, then rename the new volume type to get back to using the same type name. This part isn't necessary, but you may need that if you've configured the old name as the default volume type in your cinder.conf file. Hope that helps. Sean
participants (2)
-
Marc Vorwerk
-
Sean McGinnis