summaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-cinder/lvm_iscsi_setup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-cinder/lvm_iscsi_setup.sh')
-rw-r--r--meta-openstack/recipes-devtools/python/python-cinder/lvm_iscsi_setup.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/lvm_iscsi_setup.sh b/meta-openstack/recipes-devtools/python/python-cinder/lvm_iscsi_setup.sh
new file mode 100644
index 0000000..6cd7011
--- /dev/null
+++ b/meta-openstack/recipes-devtools/python/python-cinder/lvm_iscsi_setup.sh
@@ -0,0 +1,13 @@
1#Load volume group
2
3[[ -f /etc/cinder/volumes-backing ]] || truncate -s %CINDER_LVM_VOLUME_BACKING_FILE_SIZE% /etc/cinder/volumes-backing
4
5DEV=`losetup -j /etc/cinder/volumes-backing | cut -d ":" -f 1 | head -1`
6if [ -z $DEV ]; then
7 DEV=`losetup -f --show /etc/cinder/volumes-backing`
8fi
9if ! vgs cinder-volumes &> /dev/null ; then
10 vgcreate cinder-volumes $DEV
11fi
12
13vgchange -ay cinder-volumes