From ab10fde533712909f34374decc4257757895d327 Mon Sep 17 00:00:00 2001 From: Chinasubbareddy Mallavarapu Date: Mon, 10 Aug 2020 16:44:50 -0500 Subject: [PATCH] [CEPH] update ceph installation script to skip loopback device creation This is to update installation script to enable option to skip the loopback device creation as this gives flexibility to use exisitng block devices for ceph. Change-Id: I2e05cfa627dad5d32e882af3ba82bcde21e2ad70 --- doc/source/install/developer/deploy-with-ceph.rst | 8 +++++++- tools/deployment/component/ceph/ceph.sh | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/source/install/developer/deploy-with-ceph.rst b/doc/source/install/developer/deploy-with-ceph.rst index 8a30e0b717..148332fafb 100644 --- a/doc/source/install/developer/deploy-with-ceph.rst +++ b/doc/source/install/developer/deploy-with-ceph.rst @@ -11,7 +11,9 @@ Deploy Ceph We are going to install Ceph OSDs backed by loopback devices as this will help us not to attach extra disks, in case if you have enough disks -on the node then feel free to adjust below script part of Ceph overrides. +on the node then feel free to skip creating loopback devices by exporting +CREATE_LOOPBACK_DEVICES_FOR_CEPH to false and export the block devices names +as environment variables(CEPH_OSD_DATA_DEVICE and CEPH_OSD_DB_WAL_DEVICE). We are also going to seperate Ceph metadata and data onto a different devices to replicate the ideal scenario of fast disks for metadata and slow disks to store data. @@ -23,6 +25,10 @@ and other disk for block DB and block WAL. If default devices (loop0 and loop1) your case, feel free to change them by exporting environment variables(CEPH_OSD_DATA_DEVICE and CEPH_OSD_DB_WAL_DEVICE). +.. note:: + if you are rerunning the below script then make sure to skip the loopback device creation + by exporting CREATE_LOOPBACK_DEVICES_FOR_CEPH to false. + .. literalinclude:: ../../../../tools/deployment/developer/ceph/040-ceph.sh :language: shell :lines: 1,17- diff --git a/tools/deployment/component/ceph/ceph.sh b/tools/deployment/component/ceph/ceph.sh index 1c8f53a0ce..82bbcf6d7c 100755 --- a/tools/deployment/component/ceph/ceph.sh +++ b/tools/deployment/component/ceph/ceph.sh @@ -16,8 +16,10 @@ set -xe export CEPH_ENABLED=true -./tools/deployment/common/setup-ceph-loopback-device.sh --ceph-osd-data ${CEPH_OSD_DATA_DEVICE:=/dev/loop0} \ ---ceph-osd-dbwal ${CEPH_OSD_DB_WAL_DEVICE:=/dev/loop1} +if [ "${CREATE_LOOPBACK_DEVICES_FOR_CEPH:=true}" == "true" ]; then + ./tools/deployment/common/setup-ceph-loopback-device.sh --ceph-osd-data ${CEPH_OSD_DATA_DEVICE:=/dev/loop0} \ + --ceph-osd-dbwal ${CEPH_OSD_DB_WAL_DEVICE:=/dev/loop1} +fi #NOTE: Lint and package chart export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${OSH_INFRA_PATH:="../openstack-helm-infra"}"}"