Ceph: Journal partition automation

- Use whole disk /dev/sdc format.
- Don't specify partition and let ceph-osd util create
and manage partition.
- On an OSD disk failure, during manintanance window,
Journal partition for failed OSD should be deleted.
This will allow ceph-osd util to reuse space for new partition.
- Disk partition count num will continue to
increase as more OSD fails.

Change-Id: I87522db8cabebe8cb103481cdb65fc52f2ce2b07
This commit is contained in:
Renis Makadia 2018-10-30 11:52:31 -07:00 committed by chinasubbareddy mallavarapu
parent 6589af54db
commit 17df1c5df5
3 changed files with 6 additions and 2 deletions

View File

@ -200,7 +200,6 @@ if [ "${OSD_BLUESTORE:-0}" -ne 1 ]; then
chown ceph. "${JOURNAL_PART}" "${DATA_PART}"
OSD_JOURNAL="${JOURNAL_PART}"
fi
CEPH_OSD_OPTIONS="${CEPH_OSD_OPTIONS} --osd-journal ${OSD_JOURNAL}"
fi
if [ "x${JOURNAL_TYPE}" == "xdirectory" ]; then

View File

@ -22,6 +22,8 @@ set -ex
: "${OSD_JOURNAL_UUID:=$(uuidgen)}"
: "${OSD_FORCE_ZAP:=1}"
: "${CEPH_CONF:="/etc/ceph/${CLUSTER}.conf"}"
# We do not want to zap journal disk. Tracking this option seperatly.
: "${JOURNAL_FORCE_ZAP:=0}"
if [[ ! -e ${CEPH_CONF}.template ]]; then
echo "ERROR- ${CEPH_CONF}.template must exist; get it from your existing mon"
@ -203,7 +205,7 @@ function osd_disk_prepare {
CLI_OPTS="${CLI_OPTS} --bluestore"
fi
if [ -b "${OSD_JOURNAL}" -a "${OSD_FORCE_ZAP:-0}" -eq 1 ]; then
if [ -b "${OSD_JOURNAL}" -a "${JOURNAL_FORCE_ZAP:-0}" -eq 1 ]; then
# if we got here and zap is set, it's ok to wipe the journal.
echo "OSD_FORCE_ZAP is set, so we will erase the journal device ${OSD_JOURNAL}"
if [ -z "${OSD_JOURNAL_PARTITION}" ]; then

View File

@ -134,6 +134,8 @@ conf:
# NOTE(portdirect): for homogeneous clusters the `osd` key can be used to
# define OSD pods that will be deployed across the cluster.
# when specifing whole disk (/dev/sdf) for journals, ceph-osd chart will create
# needed partitions for each OSDs.
osd:
- data:
type: directory
@ -153,6 +155,7 @@ conf:
# journal:
# type: directory
# location: /var/lib/openstack-helm/ceph/osd/journal-sdg
# NOTE(portdirect): for heterogeneous clusters the overrides section can be used to define
# OSD pods that will be deployed upon specifc nodes.
# overrides: