summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSage Weil <sage@inktank.com>2013-06-14 13:39:03 -0700
committerSage Weil <sage@inktank.com>2013-06-17 15:47:21 -0700
commitdfe421e44cfa13178950258509a0cf71e308daa1 (patch)
treee7c6f10cacca3e9a0a0ab1ec2a610e1841735db0
parentef47cf9c9dd7f4a1f549c14f984cd052fc95bb64 (diff)
downloadceph-dfe421e44cfa13178950258509a0cf71e308daa1.tar.gz
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 <sage@inktank.com> (cherry picked from commit 13680976ef6899cb33109f6f841e99d4d37bb168)
-rw-r--r--src/init-ceph.in7
-rw-r--r--src/upstart/ceph-osd-all-starter.conf4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/init-ceph.in b/src/init-ceph.in
index 88fe6eb7d36..590fbd63f89 100644
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -431,4 +431,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 0311716cdb4..eeb64bca567 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