ungleich-tools/ceph/ceph-mon-stop-delete

21 lines
334 B
Text
Raw Normal View History

2018-05-30 11:57:04 +00:00
#!/bin/sh
if [ $# -ne 1 ]; then
echo "$0 <monitor>"
echo "f.i. $0 serverX"
2018-05-30 11:57:04 +00:00
exit 1
fi
mon=mon.$1
2018-05-30 11:57:04 +00:00
# Starting with monit, if available
if [ -e /etc/monit ]; then
/opt/ungleich-tools/monit-remove "$mon"
else
/etc/init.d/ceph stop "$mon"
fi
ceph mon remove "$(hostname)"
2018-05-30 11:57:55 +00:00
rm -rf /var/lib/ceph/mon/ceph-$(hostname)/