How to change connection for the Cinder volumes

asked 2018-03-11 03:27:21 -0600

Alexey Elokhov gravatar image

updated 2018-03-11 03:29:34 -0600

Hello! Currently we are running 3 HVs and 1 Storage server (connected with iSCSI to each HV). Cinder-volume services are also running on each HV. The problem is that when I create the volume, it uses random cinder-volume service (on HV1, HV2 or HV3) and usually it is not on the same host as instance.

Is it possible to rearrange and change "connections" of these volumes so each volume with the instance will be on the same host?

I understand how to change it for the newly created volumes (by using different backend names), but I need to change it for already existing volumes.

edit retag flag offensive close merge delete

Comments

Do you want to migrate volumes to another backend? If so: https://docs.openstack.org/cinder/lat.... Note that not all backends support this, and according to the referenced document, it only works if the instances run under a libvirt hypervisor.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-11 19:15:33 -0600 )edit

Thanks for the link! I think you can be right, but here are some more details in volume example:

os-vol-host-attr:host          | compute1@central-storage2#central_storage2
Alexey Elokhov gravatar imageAlexey Elokhov ( 2018-03-12 01:25:02 -0600 )edit

Compute1 is a hostname of HV with cinder-volume on it. So I want to change "compute1" part. It is not a backend as i see

Alexey Elokhov gravatar imageAlexey Elokhov ( 2018-03-12 01:25:09 -0600 )edit

In this case I guess you have to define it as a backend. But I do believe that the syntax compute1@central-storage2 defines a backend.

What is HV, by the way?

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-12 02:42:46 -0600 )edit

From the referenced web page:

os-vol-host-attr:host - the volume’s current back end.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-12 02:46:09 -0600 )edit