2018-05-30 11:57:04 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2023-04-17 11:32:30 +00:00
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
echo "$0 <monitor>"
|
|
|
|
echo "f.i. $0 serverX"
|
2018-05-30 11:57:04 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-04-17 11:32:30 +00:00
|
|
|
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
|
|
|
|
|
2018-05-30 12:06:51 +00:00
|
|
|
ceph mon remove "$(hostname)"
|
2018-05-30 11:57:55 +00:00
|
|
|
|
|
|
|
rm -rf /var/lib/ceph/mon/ceph-$(hostname)/
|