How can I create a cinder volume in a specific host?

asked 2013-06-21 18:02:05 -0600

guimaluf gravatar image

As I can launch a virtual machine in a specific nova-compute node, I would like to create a cinder volume in the same host of my vm. Is it possible?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-06-25 08:34:36 -0600

ugo184 gravatar image


I have been trying to achieve the same thing. After few research, I believe the way is to set up different availability zone per host; I don't know if that's the best practice though.

Add this line to your cinder.conf file on every cinder-node:

storage_availability_zone=YOUR_HOSTNAME # Or whatever you want

Restart the cinder-volume and check that the zone has changed for your cinder-node:

# cinder-manage host list

Then whenever you want to create a volume do (with the other options you want):

# nova volume-create --display-name NAME --availability-zone ZONE SIZE

I have tried to create and attach volume on/from 2 different hosts and it works well so far.

I'm aware this isn't a complete answer; but as I'm still looking for answers myself, I can't give more at the moment, but as it gives you a point to start your research I think this reply is worth it.

The "bad thing" about it is that you then have to specify the availability-zone you want to use for every creation. Maybe there are ways to specify a default zone/host on the controller node and/or it might also depends of your configuration as the filters configuration for cinder can change the decision making on which host volume are created.

Hope it help


edit flag offensive delete link more


It works, but only with my cinder-node. I've created a storage_availability on my controller and I can't references this AZ to create the disk. But this is a nice solution! Thanks!

guimaluf gravatar imageguimaluf ( 2013-07-05 14:41:04 -0600 )edit

Is the tgt/cinder-volume services running on your controller as well? If yes, I'm not sure why you can't create volume on it. Logs will probably help you sort this out. If not, then you might want to install them and retry.

Glad I help ;)

ugo184 gravatar imageugo184 ( 2013-07-15 01:52:17 -0600 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2013-06-21 18:02:05 -0600

Seen: 4,728 times

Last updated: Jun 25 '13