diff options
author | Sage Weil <sage@inktank.com> | 2013-06-14 13:39:03 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-06-17 09:49:54 -0700 |
commit | 13680976ef6899cb33109f6f841e99d4d37bb168 (patch) | |
tree | a85c92db5160c347c5c7f6862dd444acda53706b | |
parent | 5c7a23687a1a21bec5cca7b302ac4ba47c78e041 (diff) | |
download | ceph-13680976ef6899cb33109f6f841e99d4d37bb168.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>
-rw-r--r-- | src/init-ceph.in | 7 | ||||
-rw-r--r-- | src/upstart/ceph-osd-all-starter.conf | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/init-ceph.in b/src/init-ceph.in index a7e026d23d0..a2dde79f5e8 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 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 |