How do I mount cinder volume to specfic LVM?

asked 2015-03-26 08:58:37 -0600

whollandsworth gravatar image

We are trying to mount cinder volumes on our VMs in Openstack. I can create a cinder volume no problem however, it always grabs the space from sda1(our mirrored OS). We would like to mount attach each drive as a cinder volume to a specific VM. For instance,

/dev/mapper/vg2-data1 to Haddop01VM

/dev/mapper/vg3-data1 to Haddop02VM

/dev/mapper/vg4-data1 to Haddop03VM

Our server setup:

/dev/sda1 ext2 236M 41M 183M 19% /boot

/dev/mapper/vg1-data xfs 7.0T 4.3T 2.8T 61% /data

/dev/mapper/vg2-data1 xfs 920G 33M 920G 1% /hadoop1

/dev/mapper/vg3-data1 xfs 920G 33M 920G 1% /hadoop2

/dev/mapper/vg4-data1 xfs 920G 33M 920G 1% /hadoop3

Let me know if I can provide any more info.


edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-26 15:18:35 -0600

jdexter gravatar image

If you are using the lvm driver for Cinder, to accomplish this you will need to create multiple lvm backends, each pointing to a different VG on the cinder volumes host.

Within each backend configuration you can assign the particular VG you want to use.

# Options defined in cinder.volume.drivers.lvm

# Name for the VG that will contain exported volumes (string
# value)

By default cinder will use the vg cinder-volumes as its source for volumes. once you have configured each VG then you will have to create a different volume in from each cinder backend and assign that to your different VMs.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-03-26 08:58:37 -0600

Seen: 1,086 times

Last updated: Mar 26 '15