aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters
diff options
context:
space:
mode:
authorgrakiss <grakiss.wanglei@huawei.com>2015-10-13 14:31:22 +0800
committergrakiss <grakiss.wanglei@huawei.com>2015-10-13 14:31:22 +0800
commit679858461f1f25ad5f03704b60ac76f44eabd344 (patch)
tree87eae068c929b31615eafd71d56a2c25b51f546b /deploy/adapters
parent2cbacbc060805b446769def612253798f3b7fb03 (diff)
make full use of disk space for ceph deployment
JIRA: COMPASS-89 - use the whole disk space Change-Id: Ib94ac4e52681a7e400ea6d0ef9dae72018b504c9 Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
Diffstat (limited to 'deploy/adapters')
-rw-r--r--deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh b/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
index b5c9da3b..3b4e687d 100644
--- a/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
+++ b/deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh
@@ -13,7 +13,7 @@ rm /ceph/images/ceph-volumes.img
if [ ! -f "/ceph/images/ceph-volumes.img" ]; then
echo "create ceph-volumes.img"
-dd if=/dev/zero of=/ceph/images/ceph-volumes.img bs=1M seek=12288 count=0 oflag=direct
+dd if=/dev/zero of=/ceph/images/ceph-volumes.img bs=1K seek=$(df / | awk '$3 ~ /[0-9]+/ { print $4 }') count=0 oflag=direct
sgdisk -g --clear /ceph/images/ceph-volumes.img
fi
@@ -36,7 +36,7 @@ losetup -d /dev/loop0
echo "vgcreate"
vgcreate -y ceph-volumes $(sudo losetup --show -f /ceph/images/ceph-volumes.img)
echo "lvcreate"
-sudo lvcreate -L9G -nceph0 ceph-volumes
+sudo lvcreate -l 100%FREE -nceph0 ceph-volumes
echo "mkfs"
mkfs.xfs -f /dev/ceph-volumes/ceph0