Start via monit, if present

This commit is contained in:
Nico Schottelius 2018-02-23 08:52:18 +01:00
parent 9e233dde20
commit f8bc8d978b
2 changed files with 12 additions and 2 deletions

View file

@ -10,4 +10,9 @@ fname=$1
ceph-mon --mkfs -i $(hostname) --keyring "$fname" --setuser ceph --setgroup ceph ceph-mon --mkfs -i $(hostname) --keyring "$fname" --setuser ceph --setgroup ceph
touch /var/lib/ceph/mon/ceph-$(hostname)/sysvinit touch /var/lib/ceph/mon/ceph-$(hostname)/sysvinit
# Starting with monit, if available
if [ -e /etc/monit ]; then
/opt/ungleich-tools/monit-ceph-create-start mon.$(hostname)
else
/etc/init.d/ceph start mon.$(hostname) /etc/init.d/ceph start mon.$(hostname)
fi

View file

@ -95,4 +95,9 @@ ceph osd crush add osd.${osd_id} ${WEIGHT} host=$(hostname)
echo "$metadata_dev /var/lib/ceph/osd/ceph-${osd_id} xfs noatime 0 0" >> /etc/fstab echo "$metadata_dev /var/lib/ceph/osd/ceph-${osd_id} xfs noatime 0 0" >> /etc/fstab
# Starting with monit, if available
if [ -e /etc/monit ]; then
/opt/ungleich-tools/monit-ceph-create-start osd.${osd_id}
else
/etc/init.d/ceph start osd.${osd_id} /etc/init.d/ceph start osd.${osd_id}
fi