ungleich-tools/ceph/ceph-mon-stop-delete
2023-04-20 13:52:24 +02:00

20 lines
334 B
Bash
Executable file

#!/bin/sh
if [ $# -ne 1 ]; then
echo "$0 <monitor>"
echo "f.i. $0 serverX"
exit 1
fi
mon=mon.$1
# 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)"
rm -rf /var/lib/ceph/mon/ceph-$(hostname)/