ceph co-location journal and permission fixes
Support co-located journals with Ceph helm chart Ensure proper ownership set on OSD/Journal disks Change-Id: Ic954d75c8bd7532991dc9b3184ad6d74b97855d1
This commit is contained in:
parent
8d6cfd72d0
commit
f8ac6c3f21
@ -143,6 +143,9 @@ if [ "${OSD_BLUESTORE:-0}" -ne 1 ]; then
|
|||||||
JDEV="$(echo "${OSD_JOURNAL}" | sed 's/\(.*[^0-9]\)[0-9]*$/\1/')"
|
JDEV="$(echo "${OSD_JOURNAL}" | sed 's/\(.*[^0-9]\)[0-9]*$/\1/')"
|
||||||
if [ -d "/sys/block/$(basename "${JDEV}")/$(basename "${OSD_JOURNAL}")" ]; then
|
if [ -d "/sys/block/$(basename "${JDEV}")/$(basename "${OSD_JOURNAL}")" ]; then
|
||||||
OSD_JOURNAL="$(dev_part "${JDEV}" "$(echo "${OSD_JOURNAL}" | sed 's/.*[^0-9]\([0-9]*\)$/\1/')")"
|
OSD_JOURNAL="$(dev_part "${JDEV}" "$(echo "${OSD_JOURNAL}" | sed 's/.*[^0-9]\([0-9]*\)$/\1/')")"
|
||||||
|
elif [ "${OSD_DEVICE}" == "${OSD_JOURNAL}" ]; then
|
||||||
|
# journal and osd disk are on the same device.
|
||||||
|
OSD_JOURNAL="$(dev_part "${OSD_JOURNAL}" 2)"
|
||||||
else
|
else
|
||||||
# they likely supplied a bare device and prepare created partition 1.
|
# they likely supplied a bare device and prepare created partition 1.
|
||||||
OSD_JOURNAL="$(dev_part "${OSD_JOURNAL}" 1)"
|
OSD_JOURNAL="$(dev_part "${OSD_JOURNAL}" 1)"
|
||||||
@ -159,12 +162,12 @@ if [ "${OSD_BLUESTORE:-0}" -ne 1 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
wait_for_file "${OSD_JOURNAL}"
|
wait_for_file "${OSD_JOURNAL}"
|
||||||
chown ceph. "${OSD_JOURNAL}"
|
chown ceph. "${OSD_JOURNAL}" "${DATA_PART}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
wait_for_file "${JOURNAL_PART}"
|
wait_for_file "${JOURNAL_PART}"
|
||||||
chown ceph. "${JOURNAL_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}"
|
CEPH_OSD_OPTIONS="${CEPH_OSD_OPTIONS} --osd-journal ${OSD_JOURNAL}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user