summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
Diffstat (limited to 'deploy')
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh2
-rw-r--r--deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh b/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh
index b69db0ed..2e734188 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh
+++ b/deploy/adapters/ansible/roles/cinder-volume/files/create_img.sh
@@ -1,3 +1,3 @@
if [[ ! -f /var/cinder.img ]]; then
- dd if=/dev/zero of=/var/cinder.img bs=1 count=1 seek=$1
+ dd if=/dev/zero of=/var/cinder.img bs=1 count=0 seek=$1
fi
diff --git a/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh b/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh
index 9670da12..55041c6e 100644
--- a/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh
+++ b/deploy/adapters/ansible/roles/cinder-volume/files/get_var_size.sh
@@ -2,5 +2,5 @@ size=`df /var | awk '$3 ~ /[0-9]+/ { print $4 }'`;
if [[ $size -gt 2000000000 ]]; then
echo -n 2000000000000;
else
- echo -n $((size * 1000));
+ echo -n $((size * 1000 / 512 * 512));
fi