From 13b448b8ce959f31d07cd1827614c445c410aa62 Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Fri, 5 Oct 2012 09:22:34 -0700 Subject: [PATCH] upstart: OSD journal can be a symlink; if it's dangling, don't start. This lets a $osd_data/journal symlink point to /dev/disk/by-partuuid/UUID and the osd will not attempt to start until that disk is available. Signed-off-by: Tommi Virtanen --- src/upstart/ceph-osd.conf | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf index 119ad000fc49b..0e22e6699deaf 100644 --- a/src/upstart/ceph-osd.conf +++ b/src/upstart/ceph-osd.conf @@ -28,6 +28,13 @@ pre-start script host="$(hostname -s)" \ $location \ || : + + journal="/var/lib/ceph/osd/${cluster:-ceph}-$id/journal" + if [ -L "$journal" -a ! -e "$journal" ]; then + echo "ceph-osd($UPSTART_INSTANCE): journal not present, not starting yet." 1>&2 + stop + exit 0 + fi end script instance ${cluster:-ceph}/$id -- 2.39.5