Integrating OpenStack Cinder 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
Copy

You can verify the volume group creation by using the vgscommand that lists your existing volume groups.

Integration LVM With Platform9 via Cinder Block Storage Integration

Once the required volume group is created, follow the Supported Storage Integrations 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.

1. Create a file named cinder_override.conf under the directory /opt/pf9/etc/pf9-cindervolume-base/conf.d/.

Bash
Copy

Note: Valid values for target_helper are ‘lioadm’ (CentOS hosts) and ‘tgtadm’ (Debian hosts).

2. Under the backend-specific section, setlvm_type = thin and target_helper = lioadm.

cinder_override.conf
Copy

3. Restart the pf9-cindervolume service.

Bash
Copy

Newly created LVM volumes would now utilize the thin provisioning storage allocation policy.

Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard