aboutsummaryrefslogtreecommitdiffstats
path: root/meta-openstack/recipes-devtools/python/python-cinder/lvm_iscsi_setup.sh
blob: 6cd701120ff13f996c4089c41c5d81ea5325fde7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#Load volume group

[[ -f /etc/cinder/volumes-backing ]] || truncate -s %CINDER_LVM_VOLUME_BACKING_FILE_SIZE% /etc/cinder/volumes-backing

DEV=`losetup -j /etc/cinder/volumes-backing | cut -d ":" -f 1 | head -1`
if [ -z $DEV ]; then
    DEV=`losetup -f --show /etc/cinder/volumes-backing`
fi
if ! vgs cinder-volumes &> /dev/null ; then
	    vgcreate cinder-volumes $DEV
fi

vgchange -ay cinder-volumes