Tutorial: OpenStack Cinder Integration with LVM
This tutorial describes OpenStack Cinder integration with your local LVM storage.
Please also refer to this article for a general tutorial on Cinder integration with Platform9 Managed OpenStack.
Prerequisites for OpenStack Cinder LVM Block Storage
The hypervisor that you choose to have Cinder role installed must have a logical volume group named “cinder-volumes”.
To create a new volume group if you do not have one, you will either need a free partition or you can use a separate hard drive/SSD for this.
Assuming /dev/sdb is the partition you want to use for Cinder LVM integration, run the following commands to create the new volume group:[bash]pvcreate /dev/sdb1
vgcreate cinder-volumes /dev/sdb1[/bash]
You can verify the volume group creation by using the “vgs” command that lists your existing volume groups.
Integration LVM With Platform9 via Cinder Block Storage Integration
Once the required volume group is created, follow the generic Cinder tutorial to assign the Cinder role to appropriate hypervisor/host and select the LVM driver as part of the block storage configuration.
That’s it! Your Cinder integration with your local LVM is done. You should now be able to start creating volumes and snapshots leveraging your local LVM.
Configuring LVM for Thin Provisioning
You can create thin-provisioned volumes in LVM. You must enable thin provisioning to be able to create thin-provisioned volumes in LVM.
Follow the steps given below to enable thin provisioning.
- Create a file named cinder_override.conf under the directory /opt/pf9/etc/pf9-cindervolume-base/conf.d/.
- Under the [DEFAULT] section or backend-specific section, set lvm_type = thin.
[ini][DEFAULT] lvm_type = thin[/ini]
- Restart pf9-cindervolume-base.
[bash]service pf9-cindervolume-base restart[/bash]
Newly created LVM volumes would now utilize the thin provisioning storage allocation policy.