From ce8e6f6aa61c267df7892e7e8748963db8c83bc3 Mon Sep 17 00:00:00 2001 From: John Griffith Date: Tue, 12 May 2015 17:28:59 -0600 Subject: [PATCH] Add ability to specify cinder lvm_type option Cinder has had an lvm_type option for quite a while that allows the LVM driver to be configured to use thin provisioning. This required an additional PPA in Precise, but is available in the default Trusty packages. This patch adds the lvm_type option, and we'll use it to do gate testing against the lvm_thin configuration. Change-Id: I99c7fea131f3d79747ec75052adf8b24f41ba483 --- lib/cinder | 4 ++++ lib/cinder_backends/lvm | 1 + 2 files changed, 5 insertions(+) diff --git a/lib/cinder b/lib/cinder index eb0e1d7600..93285bf99c 100644 --- a/lib/cinder +++ b/lib/cinder @@ -65,6 +65,10 @@ CINDER_SERVICE_PORT=${CINDER_SERVICE_PORT:-8776} CINDER_SERVICE_PORT_INT=${CINDER_SERVICE_PORT_INT:-18776} CINDER_SERVICE_PROTOCOL=${CINDER_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL} +# What type of LVM device should Cinder use for LVM backend +# Defaults to default, which is thick, the other valid choice +# is thin, which as the name implies utilizes lvm thin provisioning. +CINDER_LVM_TYPE=${CINDER_LVM_TYPE:-default} # Default backends # The backend format is type:name where type is one of the supported backend diff --git a/lib/cinder_backends/lvm b/lib/cinder_backends/lvm index 35ad209db7..411b82c190 100644 --- a/lib/cinder_backends/lvm +++ b/lib/cinder_backends/lvm @@ -51,6 +51,7 @@ function configure_cinder_backend_lvm { iniset $CINDER_CONF $be_name volume_driver "cinder.volume.drivers.lvm.LVMVolumeDriver" iniset $CINDER_CONF $be_name volume_group $VOLUME_GROUP_NAME-$be_name iniset $CINDER_CONF $be_name iscsi_helper "$CINDER_ISCSI_HELPER" + iniset $CINDER_CONF $be_name lvm_type "$CINDER_LVM_TYPE" if [[ "$CINDER_SECURE_DELETE" == "False" ]]; then iniset $CINDER_CONF $be_name volume_clear none