How to force cinder to locate a volume on a particular physical drive?

asked 2019-10-01 23:24:53 -0500

anonymous user


Hello all,

We have several physical drives installed on a compute node which has cinder. The compute node is a part of availability zone in the horizon and it's possible to locate a volume on it. Currently, cinder automatically decides what physical drive is appropriate to settle the volume, nevertheless, we want to control this process. Is there any method to force cinder to locate a volume on a specific address like /dev/sda1 from a machine?

Thank yo so much for your attention..

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2019-10-02 00:10:25 -0500

updated 2019-10-02 00:10:54 -0500

Assuming you use the LVM volume driver, it's not Cinder that determines the drive. A Cinder volume is implemented as a logical volume in a certain LVM volume group as defined in cinder.conf. It's LVM that decides which drive should be used. When creating a logical volume directly from the command line (lvcreate command), you can select the physical volume (i.e., drive), but the Cinder LVM driver doesn't expose this option.

You could create a separate LVM volume group for each drive and create a Cinder volume type for each volume group. As a consequence, you will have to select the volume type, and therefore the drive, each time you create a volume. It's probably not a very realistic approach, but I don't know your use case and might be wrong.

Alternatively, you could alter the LVM driver and add so-called extra specs that would allow you to select the drive. For an example of extra specs, have a look at the HPE 3par driver. I don't think it would be too hard to extend the LVM driver if you know a little Python.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2019-10-01 23:24:22 -0500

Seen: 27 times

Last updated: Oct 02 '19