Merge pull request #28515 from hvhaugwitz/mondb-recovery-script

doc: update mondb recovery script

Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2019-06-13 08:36:16 +08:00 committed by GitHub
commit 494d624997
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -419,16 +419,16 @@ information stored in OSDs.::
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