Change Volume Type, but in use

Gorka Eguileor geguileo at redhat.com
Mon Nov 11 13:48:40 UTC 2019


On 07/11, Sinan Polat wrote:
> Hi,
>
> I am using Ceph as the backend for Cinder. Within Ceph we have defined 2 RBD
> pools (ssdvolumes, sasvolumes).
> In OpenStack I created 2 Volume Types (ssd, sas). Each Volume Type has property
> "volume_backend_name='tripleo_ceph_<ssd|sas>'".
>
> In the Cinder configuration I have the following backends configured:
>
> [tripleo_ceph_ssd]
> backend_host=hostgroup
> volume_backend_name=tripleo_ceph_ssd
> volume_driver=cinder.volume.drivers.rbd.RBDDriver
> rbd_ceph_conf=/etc/ceph/ceph.conf
> rbd_user=openstack
> rbd_pool=ssdvolumes
>
> [tripleo_ceph_sas]
> backend_host=hostgroup
> volume_backend_name=tripleo_ceph_sas
> volume_driver=cinder.volume.drivers.rbd.RBDDriver
> rbd_ceph_conf=/etc/ceph/ceph.conf
> rbd_user=openstack
> rbd_pool=sasvolumes
>
> 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.
>
> So I want to change the value of key volume_backend_name for both Volume Types
> (tripleo_ceph_ssd => tripleo_ceph_ssdvolumes).
>

Hi,

I agree with Sean, I wouldn't change it since this is only aesthetic.

Having said that, there's always a way to do most things, even if it's
NOT RECOMMENDED:

- Update cinder.conf
- Get the volume type id for the 2 volume types to change
- Stop cinder services
- Go into the DB and manually update the volume types changes in the
  "volume_type_extra_specs" table filtering by the volume_type_id and
  the key "volume_backend_name" and setting the new "value".
- Use the "cinder-manage volume update_host" to update existing volumes
  to the new backend (you could also do this directly in the DB).
- Start cinder services
- Remove the old service from the DB (they appear as down now) using the
  "cinder-manage service remove" command.

Cinder-manage docs:
   https://docs.openstack.org/cinder/latest/cli/cinder-manage.html

Regards,
Gorka.

> I tried the following:
> $ openstack volume type show 80cb25ff-376a-4483-b4f7-d8c75839e0ce
> +--------------------+----------------------------------------+
> | Field | Value |
> +--------------------+----------------------------------------+
> | access_project_ids | None |
> | description | |
> | id | 80cb25ff-376a-4483-b4f7-d8c75839e0ce |
> | is_public | True |
> | name | ssd |
> | properties | volume_backend_name='tripleo_ceph_ssd' |
> | qos_specs_id | None |
> +--------------------+----------------------------------------+
> $
>
>
> $ openstack volume type set --property
> volume_backend_name='tripleo_ceph_ssdvolumes'
> 80cb25ff-376a-4483-b4f7-d8c75839e0ce
> Failed to set volume type property: Volume Type is currently in use. (HTTP 400)
> (Request-ID: req-5efaa5b7-910f-4802-8494-3115cfc4ab93)
> Command Failed: One or more of the operations failed
> $
>
> How to solve my problem?
>
> Thanks!
>
> Sinan




More information about the openstack-discuss mailing list