From 13680976ef6899cb33109f6f841e99d4d37bb168 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 14 Jun 2013 13:39:03 -0700 Subject: [PATCH] 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 --- src/init-ceph.in | 7 +++++++ src/upstart/ceph-osd-all-starter.conf | 4 ++++ 2 files changed, 11 insertions(+) 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 -- 2.39.5