diff options
author | Vu Tran <vu.tran@windriver.com> | 2014-02-28 09:11:08 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-03-17 14:23:14 -0400 |
commit | 26be5fa0fc5c735f6208545f1c4c19c3dd475b65 (patch) | |
tree | 146b67da526022896fb23eedf07e64056612da1e /meta-openstack/recipes-devtools/python/python-cinder | |
parent | 4e0bbe3e861129b54e8fada975d0407fdcf22c54 (diff) | |
download | meta-cloud-services-26be5fa0fc5c735f6208545f1c4c19c3dd475b65.tar.gz |
cinder-volume: to reuse loop dev
Every time cinder-volume is restarted with
"/etc/init.d/cinder-volume restart" a new loop dev
is created for lvm volume backing file instead of
reuse the existing loop dev
Signed-off-by: Vu Tran <vu.tran@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'meta-openstack/recipes-devtools/python/python-cinder')
-rw-r--r-- | meta-openstack/recipes-devtools/python/python-cinder/cinder-volume | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume b/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume index cdad401..ad1d4de 100644 --- a/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume +++ b/meta-openstack/recipes-devtools/python/python-cinder/cinder-volume | |||
@@ -30,7 +30,10 @@ start() | |||
30 | fi | 30 | fi |
31 | 31 | ||
32 | #Load volume group | 32 | #Load volume group |
33 | DEV=`losetup -f --show /etc/cinder/volumes-backing` | 33 | DEV=`losetup -j /etc/cinder/volumes-backing | cut -d ":" -f 1 | head -1` |
34 | if [ -z $DEV ]; then | ||
35 | DEV=`losetup -f --show /etc/cinder/volumes-backing` | ||
36 | fi | ||
34 | if ! vgs cinder-volumes &> /dev/null ; then | 37 | if ! vgs cinder-volumes &> /dev/null ; then |
35 | vgcreate cinder-volumes $DEV | 38 | vgcreate cinder-volumes $DEV |
36 | fi | 39 | fi |