4 # Provides: ceph ceph-mon ceph-osd
5 # Required-Start: $network $remote_fs
6 # Required-Stop: $network $remote_fs
7 # Should-Start: network-remotefs
8 # Should-Stop: network-remotefs
10 # Default-Stop: 0 1 2 6
11 # Short-Description: Ceph is a distributed object, and block, storage platform
12 # Description: Ceph is a distributed object, block, and file storage platform
15 SYSTEMD_NO_WRAP=1 . /etc/rc.status
20 # default cluster name to "ceph"
23 # Shared variables by many actions
24 dir_mon="/var/lib/ceph/mon/"
25 dir_osd="/var/lib/ceph/osd/"
26 if test -d ${dir_mon} ; then
27 lmon=`ls ${dir_mon} | grep ${cluster}`
29 if test -d ${dir_osd} ; then
30 losd=`ls ${dir_osd} | grep ${cluster}`
34 case $action in start | stop | status | enable | disable | mask | unmask | restart | is-active | is-failed | show | kill | reset-failed )
36 if test -n "${lmon}" ; then
37 for s in ${lmon#=${prefix}} ; do
38 systemctl "${action}" ceph-mon@${s#$prefix}.service
43 if test -n "${losd}" ; then
44 for s in ${losd#=${prefix}} ; do
45 systemctl "${action}" ceph-osd@${s#$prefix}.service
50 if test $n -gt 0 ; then
55 systemctl "${action}" ceph.target
59 echo "Invalid parameter : $action"
60 echo "Valid parameters : start | stop | status | enable | disable | mask | unmask | restart | is-active | is-failed | show | kill | reset-failed"