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:
parent
6589af54db
commit
17df1c5df5
@ -200,7 +200,6 @@ if [ "${OSD_BLUESTORE:-0}" -ne 1 ]; then
|
|||||||
chown ceph. "${JOURNAL_PART}" "${DATA_PART}"
|
chown ceph. "${JOURNAL_PART}" "${DATA_PART}"
|
||||||
OSD_JOURNAL="${JOURNAL_PART}"
|
OSD_JOURNAL="${JOURNAL_PART}"
|
||||||
fi
|
fi
|
||||||
CEPH_OSD_OPTIONS="${CEPH_OSD_OPTIONS} --osd-journal ${OSD_JOURNAL}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x${JOURNAL_TYPE}" == "xdirectory" ]; then
|
if [ "x${JOURNAL_TYPE}" == "xdirectory" ]; then
|
||||||
|
@ -22,6 +22,8 @@ set -ex
|
|||||||
: "${OSD_JOURNAL_UUID:=$(uuidgen)}"
|
: "${OSD_JOURNAL_UUID:=$(uuidgen)}"
|
||||||
: "${OSD_FORCE_ZAP:=1}"
|
: "${OSD_FORCE_ZAP:=1}"
|
||||||
: "${CEPH_CONF:="/etc/ceph/${CLUSTER}.conf"}"
|
: "${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
|
if [[ ! -e ${CEPH_CONF}.template ]]; then
|
||||||
echo "ERROR- ${CEPH_CONF}.template must exist; get it from your existing mon"
|
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"
|
CLI_OPTS="${CLI_OPTS} --bluestore"
|
||||||
fi
|
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.
|
# 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}"
|
echo "OSD_FORCE_ZAP is set, so we will erase the journal device ${OSD_JOURNAL}"
|
||||||
if [ -z "${OSD_JOURNAL_PARTITION}" ]; then
|
if [ -z "${OSD_JOURNAL_PARTITION}" ]; then
|
||||||
|
@ -134,6 +134,8 @@ conf:
|
|||||||
|
|
||||||
# NOTE(portdirect): for homogeneous clusters the `osd` key can be used to
|
# NOTE(portdirect): for homogeneous clusters the `osd` key can be used to
|
||||||
# define OSD pods that will be deployed across the cluster.
|
# 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:
|
osd:
|
||||||
- data:
|
- data:
|
||||||
type: directory
|
type: directory
|
||||||
@ -153,6 +155,7 @@ conf:
|
|||||||
# journal:
|
# journal:
|
||||||
# type: directory
|
# type: directory
|
||||||
# location: /var/lib/openstack-helm/ceph/osd/journal-sdg
|
# location: /var/lib/openstack-helm/ceph/osd/journal-sdg
|
||||||
|
|
||||||
# NOTE(portdirect): for heterogeneous clusters the overrides section can be used to define
|
# NOTE(portdirect): for heterogeneous clusters the overrides section can be used to define
|
||||||
# OSD pods that will be deployed upon specifc nodes.
|
# OSD pods that will be deployed upon specifc nodes.
|
||||||
# overrides:
|
# overrides:
|
||||||
|
Loading…
Reference in New Issue
Block a user