If a Ceph Monitor has an outdated or corrupted Ceph Monitor map
(monmap), it cannot join a quorum because it is trying to reach the other Ceph
Monitors on incorrect IP addresses. The safest way to fix this problem is to obtain and inject the
actual Ceph Monitor map from other Ceph Monitors.
Before you begin
Before you begin, make sure that you have the following prerequisites in place:
- Access to the Ceph Monitor Map.
- Root-level access to the Ceph Monitor node.
About this task
Note: This action overwrites the existing Ceph Monitor map that is kept by the Ceph Monitor.
Use this procedure to inject the Ceph Monitor map when the other Ceph Monitors are able to form a
quorum, or when at least one Ceph Monitor has a correct Ceph Monitor map. If all Ceph Monitors have
corrupted stores, and therefore also a corrupted Ceph Monitor map, see Recovering Ceph Monitor store when using BlueStore.
For more information, see Ceph Monitor is out of quorum.
Procedure
- If the remaining Ceph Monitors are able to form a quorum, get the Ceph Monitor map by
using the ceph mon getmap command.
If the remaining Ceph Monitors are
not able to form the quorum, go to step
2.
For
example,
[ceph: root@host01 /]# ceph mon getmap -o /tmp/monmap
- If the remaining Ceph Monitors are not able to form the quorum and you
have at least one Ceph Monitor with a correct Ceph Monitor map, copy it from that Ceph
Monitor.
- Stop the Ceph Monitor which you want to copy the Ceph Monitor map from.
systemctl stop ceph-mon@HOST_NAME
For example, to stop the Ceph Monitor running on a host with the
host01 short hostname, run the following
command:
[root@mon ~]# systemctl stop ceph-mon@host01
- Copy the Ceph Monitor
map.
ceph-mon -i ID --extract-monmap /tmp/monmap
Replace
ID with the ID of the Ceph Monitor which you want to copy the Ceph Monitor map
from.
For
example,
[ceph: root@host01 /]# ceph-mon -i mon.a --extract-monmap /tmp/monmap
- Stop the Ceph Monitor which you want to copy the Ceph Monitor map from.
systemctl stop ceph-mon@HOST_NAME
For example, to stop the Ceph Monitor running on a host with the
host01 short hostname, run the following
command:
[root@mon ~]# systemctl stop ceph-mon@host01
- Inject the Ceph Monitor
map.
ceph-mon -i ID --inject-monmap /tmp/monmap
Replace
ID with the ID of the Ceph Monitor with the corrupted or outdated Ceph Monitor
map.
For
example,
[root@mon ~]# ceph-mon -i mon.host01 --inject-monmap /tmp/monmap
- Start the Ceph Monitor.
For
example,
[root@mon ~]# systemctl start ceph-mon@host01
Note: If you copied the Ceph Monitor map from another Ceph Monitor, also start that Ceph
Monitor.