[Cinder][Ceph] Migrating backend host

Mohammed Naser mnaser at vexxhost.com
Wed May 15 22:36:07 UTC 2019


On Thu, May 16, 2019 at 2:14 AM Gary Molenkamp <molenkam at uwo.ca> wrote:
>
> I am moving my cinder-volume service from one controller to another, and
> I'm trying to determine the correct means to update all existing
> volume's back-end host reference.  I now have two cinder volume services
> running in front of the same ceph cluster, and I would like to retire
> the old cinder-volume service.
>
> For example, on my test cloud, "openstack volume service list":
>
> +------------------+----------------------------------+------+---------+-------+----------------------------+
> | Binary           | Host                             | Zone | Status  |
> State | Updated At                 |
> +------------------+----------------------------------+------+---------+-------+----------------------------+
> | cinder-scheduler | osdev-ctrl1     | nova | enabled | up    |
> 2019-05-15T17:44:05.000000 |
> | cinder-volume    | osdev-ctrl2 at rbd | nova | disabled | up    |
> 2019-05-15T17:44:04.000000 |
> | cinder-volume    | osdev-ctrl1 at rbd | nova | enabled | up    |
> 2019-05-15T17:44:00.000000 |
> +------------------+----------------------------------+------+---------+-------+----------------------------+
>
> Now, an existing volume has a reference to the disabled cinder-volume:
>      "os-vol-host-attr:host          | osdev-ctrl2 at rbd#rbd"
>
> but this needs to be changed to:
>      "os-vol-host-attr:host          | osdev-ctrl1 at rbd#rbd"
>
> As both controllers are members of the same ceph cluster, an "openstack
> volume migrate" is not appropriate.  If it is appropriate, my testing
> has shown that it errors out and deletes the source volume from ceph.
>
> I can alter this field manually in the cinder database,  but in
> following the "don't mess with the data model" mantra, is there a means
> to do this from the cli?

https://docs.openstack.org/cinder/stein/cli/cinder-manage.html#cinder-volume

cinder-manage volume update_host --currenthost <current host>
--newhost <new host>

That should do it :)

> Thanks,
> Gary.
>
> Openstack release: Queens.
> Distro: Redhat (Centos) 7.6
>
> --
> Gary Molenkamp                  Computer Science/Science Technology Services
> Systems Administrator           University of Western Ontario
> molenkam at uwo.ca                 http://www.csd.uwo.ca
> (519) 661-2111 x86882           (519) 661-3566
>


-- 
Mohammed Naser — vexxhost
-----------------------------------------------------
D. 514-316-8872
D. 800-910-1726 ext. 200
E. mnaser at vexxhost.com
W. http://vexxhost.com



More information about the openstack-discuss mailing list