Force nova/cinder to create iscsi LVM volume on same host as the instance

asked 2020-05-22 20:00:07 -0500

Alex1806 gravatar image

I have a multi node OpenStack Train setup. The instance images are created with a non-shared storage.

I would like to have the instance volume on the same host as the instace itself because if one host goes down then my iscsi volume for the vm will stop working. So is it possible to force cinder to create the volume on the same host as the vm?

edit retag flag offensive close merge delete

Comments

If you use ephemeral storage instead of volumes, it will be on the compute node by default.

Bernd Bausch gravatar imageBernd Bausch ( 2020-05-22 21:26:20 -0500 )edit

If you need your instances to use Cinder volumes as disks, install cinder-volume on the compute host and configure the InstanceLocalityFilter in the Cinder scheduler.

Bernd Bausch gravatar imageBernd Bausch ( 2020-05-22 21:27:05 -0500 )edit

The InstanceLocalityFilter did not work for me. In horizon there is an option to disable the creation of a cinder volume but is there a way to disable the creation of a cinder volume by default in the nova configuration?

Alex1806 gravatar imageAlex1806 ( 2020-05-22 22:03:19 -0500 )edit

Not in Nova, but in Horizon.

Bernd Bausch gravatar imageBernd Bausch ( 2020-05-23 04:21:34 -0500 )edit

That is a great solution. Thank you Bernd.

Alex1806 gravatar imageAlex1806 ( 2020-05-23 06:44:37 -0500 )edit