ungleich-tools/ceph/ceph-osd-remove-from-cluster-only.sh

19 lines
264 B
Bash
Executable file

#!/bin/sh
# 2022-12-07, 10:46
# Nico Schottelius
set -x
set -e
if [ $# -ne 1 ]; then
echo "$0 osd.id"
echo "i.e. $0 17"
exit 1
fi
osd_id=$1; shift
osd_name=osd.${osd_id}
ceph osd crush remove $osd_name
ceph osd rm $osd_name
ceph auth del $osd_name