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
22 # Shared variables by many actions
23 dir_mon="/var/lib/ceph/mon/"
24 dir_osd="/var/lib/ceph/osd/"
25 if test -d ${dir_mon} ; then
26 lmon=`ls ${dir_mon} | grep ${cluster}`
28 if test -d ${dir_osd} ; then
29 losd=`ls ${dir_osd} | grep ${cluster}`
33 if test -n "$config" ; then
34 systemctl "${action}" "ceph-mon@${config}.service"
37 start | stop | status | enable | disable | restart | is-active | is-failed | show | kill | reset-failed )
39 if test -n ${lmon} ; then
40 for s in ${lmon#=${prefix}} ; do
41 systemctl "${action}" ceph-mon@${s#$prefix}.service
46 if test -n ${lmon} ; then
47 for s in ${losd#=${prefix}} ; do
48 systemctl "${action}" ceph-osd@${s#$prefix}.service
53 if test $n -gt 0 ; then
60 echo "Invalid paramter : $action"
61 echo "Valid paramters : start | stop | status | enable | disable | restart | is-active | is-failed | show | kill | reset-failed"