summaryrefslogtreecommitdiffstats
path: root/src/ckill.sh
blob: 593aad471d4711e4930498d59b1a8b4c147d40c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash -e

if [ -e CMakeCache.txt ]; then
    [ -z "$CEPH_BIN" ] && CEPH_BIN=bin
fi

if [ -z "$CEPHADM" ]; then
    CEPHADM="${CEPH_BIN}/cephadm"
fi

# fsid
if [ -e fsid ] ; then
    fsid=`cat fsid`
else
    echo 'no fsid file, so no cluster?'
    exit 0
fi
echo "fsid $fsid"

sudo $CEPHADM rm-cluster --force --fsid $fsid