From: Sage Weil Date: Fri, 14 Jun 2013 20:39:03 +0000 (-0700) Subject: sysvinit, upstart: ceph-disk activate-all on start X-Git-Tag: v0.65~48^2~6 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=13680976ef6899cb33109f6f841e99d4d37bb168;p=ceph.git sysvinit, upstart: ceph-disk activate-all on start On 'service ceph start' or 'service ceph start osd' or start ceph-osd-all we should activate any osd GPT partitions. Signed-off-by: Sage Weil --- diff --git a/src/init-ceph.in b/src/init-ceph.in index a7e026d23d0cf..a2dde79f5e852 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -430,4 +430,11 @@ for name in $what; do esac done +# activate latent osds? +if [ "$command" = "start" ]; then + if [ "$*" = "" ] || echo $* | grep -q ^osd\$ ; then + ceph-disk activate-all + fi +fi + exit $EXIT_STATUS diff --git a/src/upstart/ceph-osd-all-starter.conf b/src/upstart/ceph-osd-all-starter.conf index 0311716cdb49b..eeb64bca567f7 100644 --- a/src/upstart/ceph-osd-all-starter.conf +++ b/src/upstart/ceph-osd-all-starter.conf @@ -6,6 +6,10 @@ task script set -e + + # first activate any partitions + ceph-disk activate-all + # TODO what's the valid charset for cluster names and osd ids? find /var/lib/ceph/osd/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[A-Za-z0-9]+-[A-Za-z0-9._-]+' -printf '%P\n' \ | while read f; do