<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">Hi Sean,<br><br>Currently:<br><div dir="ltr">Ceph RBD pool name = ssdvolumes.</div><div dir="ltr">Volume Type name = ssd</div><div dir="ltr">Volume Type metadata pointing to backend name ssd</div><div dir="ltr">Backend name in Cinder conf = ssd</div><div dir="ltr"><br></div><div dir="ltr">New situation:</div><div dir="ltr">Backend name in Cinder conf will be ssdvolumes, and not ssd anymore.</div><div dir="ltr"><br></div><div dir="ltr">Since it seems it is not possible to modify a Volume Type when in use by volumes, I do not see other options.</div><div dir="ltr"><br></div><div dir="ltr">Sinan</div><div dir="ltr"><br>Op 7 nov. 2019 om 23:48 heeft Sean McGinnis <<a href="mailto:sean.mcginnis@gmx.com">sean.mcginnis@gmx.com</a>> het volgende geschreven:<br><br></div><blockquote type="cite"><div dir="ltr"><div style="font-family: Verdana;font-size: 12.0px;"><div>
<div>Hi Sinan,</div>

<div> </div>

<div>Changing a backend name is generally not recommended. It is only an internal detail seen by administrators anyway, so I'm not sure it would be worth the effort to try to change it just to add "volumes" to the end.</div>

<div> </div>

<div>Sean</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="margin:0 0 10px 0;"><b>Sent:</b> Thursday, November 07, 2019 at 2:58 PM<br>
<b>From:</b> "Sinan Polat" <<a href="mailto:sinan@turka.nl">sinan@turka.nl</a>><br>
<b>To:</b> "Goutham Pacha Ravi" <<a href="mailto:gouthampravi@gmail.com">gouthampravi@gmail.com</a>><br>
<b>Cc:</b> "OpenStack Discuss" <<a href="mailto:openstack-discuss@lists.openstack.org">openstack-discuss@lists.openstack.org</a>><br>
<b>Subject:</b> Re: Change Volume Type, but in use</div>

<div name="quoted-content">
<p>Hi Goutham,<br>
<br>
Thanks for your response.<br>
<br>
It is correct that I have volumes that are using the volume type I want to modify. If I understand correctly, modifying volumes types is not possible as long as there are volumes using the volume type.<br>
<br>
Renaming the volume type and creating a new volume type won't work I guess. Since the backend name in the cinder configuration will be changed, the volumes that are using the renamed volume type won't able to find the backend and will fail, not?<br>
<br>
I would have the backend named "ssdvolumes" in the cinder configuration. The new volume type would have the correct backend name (ssdvolumes) but the renamed volume type would still have "ssd" as its backend name.<br>
<br>
Kind regards,<br>
Sinan</p>

<blockquote>Op 7 november 2019 om 20:47 schreef Goutham Pacha Ravi <<a href="mailto:gouthampravi@gmail.com">gouthampravi@gmail.com</a>>:<br>
 
<div>
<div>
<div>
<div>
<div>Hey Sinat,
<div> </div>

<div>The error message suggests that you have volumes that use the volume type you're modifying. If yes, with cinder API, since the Rocky release [1], you cannot modify volume types that are currently in use. The original design for cinder volume types was that they were always mutable - and changes to existing volume types didn't affect pre-existing volumes. However, this behavior was modified in the Ocata release [2], and finally removed in the Rocky release.</div>

<div> </div>

<div>One of your options is to also rename the existing volume type and create a new one if you'd like, with the original name. </div>

<div> </div>

<div>[1] <a href="https://docs.openstack.org/releasenotes/cinder/rocky.html#relnotes-13-0-0-stable-rocky-upgrade-notes" target="_blank">https://docs.openstack.org/releasenotes/cinder/rocky.html#relnotes-13-0-0-stable-rocky-upgrade-notes</a></div>

<div>[2] <a href="https://review.opendev.org/#/c/440680/" target="_blank">https://review.opendev.org/#/c/440680/</a></div>

<div> </div>
</div>
</div>
</div>
</div>
 

<div class="ox-217a51edf3-gmail_quote">
<div class="ox-217a51edf3-gmail_attr">On Thu, Nov 7, 2019 at 12:33 AM Sinan Polat <<a href="mailto:sinan@turka.nl" target="_blank">sinan@turka.nl</a>> wrote:</div>

<blockquote>
<div>
<p>Hi,<br>
<br>
I am using Ceph as the backend for Cinder. Within Ceph we have defined 2 RBD pools (ssdvolumes, sasvolumes).<br>
In OpenStack I created 2 Volume Types (ssd, sas). Each Volume Type has property "volume_backend_name='tripleo_ceph_<ssd|sas>'".<br>
<br>
In the Cinder configuration I have the following backends configured:</p>

<p>[tripleo_ceph_ssd]<br>
backend_host=hostgroup<br>
volume_backend_name=tripleo_ceph_ssd<br>
volume_driver=cinder.volume.drivers.rbd.RBDDriver<br>
rbd_ceph_conf=/etc/ceph/ceph.conf<br>
rbd_user=openstack<br>
rbd_pool=ssdvolumes</p>

<p>[tripleo_ceph_sas]<br>
backend_host=hostgroup<br>
volume_backend_name=tripleo_ceph_sas<br>
volume_driver=cinder.volume.drivers.rbd.RBDDriver<br>
rbd_ceph_conf=/etc/ceph/ceph.conf<br>
rbd_user=openstack<br>
rbd_pool=sasvolumes<br>
<br>
As you might have noticed, the backend name (tripleo_ceph_ssd) and the RBD pool name (ssdvolumes, not ssd) does not match. So far, we do not have any problems. But I want to correct the names and I do not want to have the mismatch anymore.<br>
<br>
So I want to change the value of key volume_backend_name for both Volume Types (tripleo_ceph_ssd => tripleo_ceph_ssdvolumes).<br>
<br>
I tried the following:<br>
$ openstack volume type show 80cb25ff-376a-4483-b4f7-d8c75839e0ce<br>
+--------------------+----------------------------------------+<br>
| Field | Value |<br>
+--------------------+----------------------------------------+<br>
| access_project_ids | None |<br>
| description | |<br>
| id | 80cb25ff-376a-4483-b4f7-d8c75839e0ce |<br>
| is_public | True |<br>
| name | ssd |<br>
| properties | volume_backend_name='tripleo_ceph_ssd' |<br>
| qos_specs_id | None |<br>
+--------------------+----------------------------------------+<br>
$<br>
<br>
<br>
$ openstack volume type set --property volume_backend_name='tripleo_ceph_ssdvolumes' 80cb25ff-376a-4483-b4f7-d8c75839e0ce<br>
Failed to set volume type property: Volume Type is currently in use. (HTTP 400) (Request-ID: req-5efaa5b7-910f-4802-8494-3115cfc4ab93)<br>
Command Failed: One or more of the operations failed<br>
$<br>
<br>
How to solve my problem?<br>
<br>
Thanks!<br>
<br>
Sinan</p>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div></div>
</div></blockquote></body></html>