another one bit the dust
This commit is contained in:
19
emergency/restore_mons_from_osds.sh
Executable file
19
emergency/restore_mons_from_osds.sh
Executable 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
|
||||
Reference in New Issue
Block a user