]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
sysvinit, upstart: ceph-disk activate-all on start
authorSage Weil <sage@inktank.com>
Fri, 14 Jun 2013 20:39:03 +0000 (13:39 -0700)
committerSage Weil <sage@inktank.com>
Mon, 17 Jun 2013 16:49:54 +0000 (09:49 -0700)
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>
src/init-ceph.in
src/upstart/ceph-osd-all-starter.conf

index a7e026d23d0cf1807b7a2db229549af8641f824c..a2dde79f5e852d6cfc81149adae2de4ebbf72eb7 100644 (file)
@@ -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
index 0311716cdb49bc2a7fbd897b1195b7461e21c9d6..eeb64bca567f73ad30f34ac4103bae942e587b3e 100644 (file)
@@ -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