another one bit the dust

This commit is contained in:
2020-03-26 18:17:40 +01:00
parent 206537ff2e
commit 822c306da5
9 changed files with 27 additions and 7 deletions

View File

@@ -0,0 +1,19 @@
#!/bin/bash
#from: https://docs.ceph.com/docs/nautilus/rados/troubleshooting/troubleshooting-mon/?highlight=trouble%20monitor#recovery-using-osds
ms=/tmp/mon-store
mkdir $ms
hosts="ebin02 ebin01"
# collect the cluster map from OSDs
for host in $hosts; do
rsync -avz $ms/. $host:$ms.remote
rm -rf $ms
ssh $host <<EOF
for osd in /var/lib/ceph/osd/ceph-*; do
ceph-objectstore-tool --data-path \$osd --op update-mon-db --no-mon-config --mon-store-path $ms.remote
done
EOF
rsync -avz $host:$ms.remote/. $ms
done