- be specific about stopped OSDs
- add missing '--no-mon-config' option
- fix indent of here script delimiting identifier
- use $host variable in for loop
Signed-off-by: Hannes von Haugwitz <hannes@vonhaugwitz.com>
ms=/root/mon-store
mkdir $ms
- # collect the cluster map from OSDs
+ # collect the cluster map from stopped OSDs
for host in $hosts; do
- rsync -avz $ms/. user@host:$ms.remote
+ rsync -avz $ms/. user@$host:$ms.remote
rm -rf $ms
- ssh user@host <<EOF
+ ssh user@$host <<EOF
for osd in /var/lib/ceph/osd/ceph-*; do
- ceph-objectstore-tool --data-path \$osd --op update-mon-db --mon-store-path $ms.remote
+ ceph-objectstore-tool --data-path \$osd --no-mon-config --op update-mon-db --mon-store-path $ms.remote
done
- EOF
- rsync -avz user@host:$ms.remote/. $ms
+ EOF
+ rsync -avz user@$host:$ms.remote/. $ms
done
# rebuild the monitor store from the collected map, if the cluster does not