From 26cefb3e9a3682fff1d4574935724c807178ae65 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 7 Dec 2022 10:46:44 +0100 Subject: [PATCH] [ceph] add script for only removing the osd without disk --- ceph/ceph-osd-remove-from-cluster-only.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 ceph/ceph-osd-remove-from-cluster-only.sh diff --git a/ceph/ceph-osd-remove-from-cluster-only.sh b/ceph/ceph-osd-remove-from-cluster-only.sh new file mode 100755 index 0000000..3bb7bc0 --- /dev/null +++ b/ceph/ceph-osd-remove-from-cluster-only.sh @@ -0,0 +1,19 @@ +#!/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