20 lines
532 B
Bash
Executable File
20 lines
532 B
Bash
Executable File
#!/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
|