update readme manuell monitor map copyieng and altering

This commit is contained in:
duffyduck 2026-03-05 00:30:52 +01:00
parent 7674656bf2
commit f39be1898e
1 changed files with 33 additions and 11 deletions

View File

@ -289,42 +289,64 @@ systemctl restart corosync
Falls nach der Migration `ceph-mon` und `ceph-mgr` nicht starten (z.B. weil eine ältere Version des Tools die MON-Map nicht aktualisiert hat), muss die Ceph MON-Map manuell korrigiert werden. Die MON-Map ist eine interne Datenbank in der die MON-Adressen gespeichert sind — ein reines Update der `ceph.conf` reicht nicht.
**Auf jedem Node ausführen:**
**Wichtig:** Die MON-Map muss auf allen Nodes identisch sein (gleiche Epoch), sonst crasht Ceph mit `notify_rank_removed`. Deshalb: auf **einem** Node erstellen und auf die anderen kopieren.
**Schritt 1: MON auf allen Nodes stoppen**
```bash
# 1. MON stoppen
# Auf JEDEM Node:
systemctl stop ceph-mon@$(hostname)
```
# 2. Aktuelle MON-Map extrahieren und prüfen
**Schritt 2: MON-Map auf dem ersten Node erstellen**
```bash
# Auf pve1 (oder einem beliebigen Node):
ceph-mon -i $(hostname) --extract-monmap /tmp/monmap
monmaptool --print /tmp/monmap
# 3. Alte Einträge entfernen (für jeden MON-Node)
# Alte Einträge entfernen (für jeden MON-Node)
monmaptool --rm pve1 /tmp/monmap
monmaptool --rm pve2 /tmp/monmap
monmaptool --rm pve3 /tmp/monmap
# 4. Neue Einträge mit neuen IPs hinzufügen
# Neue Einträge mit neuen IPs hinzufügen
monmaptool --addv pve1 [v2:172.0.2.101:3300/0,v1:172.0.2.101:6789/0] /tmp/monmap
monmaptool --addv pve2 [v2:172.0.2.102:3300/0,v1:172.0.2.102:6789/0] /tmp/monmap
monmaptool --addv pve3 [v2:172.0.2.103:3300/0,v1:172.0.2.103:6789/0] /tmp/monmap
# 5. Ergebnis prüfen
# Ergebnis prüfen
monmaptool --print /tmp/monmap
# 6. Aktualisierte MON-Map zurückschreiben
# Injizieren und MON starten
ceph-mon -i $(hostname) --inject-monmap /tmp/monmap
systemctl start ceph-mon@$(hostname)
```
# 7. Services starten
**Schritt 3: Autoritative Map holen und auf die anderen Nodes kopieren**
```bash
# Auf pve1 (wo der MON jetzt läuft):
ceph mon getmap -o /tmp/monmap_auth
# Auf die anderen Nodes kopieren:
scp /tmp/monmap_auth root@172.0.2.102:/tmp/monmap
scp /tmp/monmap_auth root@172.0.2.103:/tmp/monmap
```
**Schritt 4: Auf jedem weiteren Node injizieren und starten**
```bash
# Auf pve2, pve3, etc.:
ceph-mon -i $(hostname) --inject-monmap /tmp/monmap
systemctl start ceph-mon@$(hostname)
systemctl restart ceph-mgr@$(hostname)
systemctl restart ceph-osd.target
# 8. Aufräumen
systemctl restart ceph-mds@$(hostname) # nur wenn CephFS vorhanden
rm -f /tmp/monmap
```
> **Hinweis:** Node-Namen und IPs an das eigene Setup anpassen. Schritte 3+4 müssen alle MON-Nodes des Clusters enthalten, nicht nur den lokalen. Aktuelle Versionen des Tools aktualisieren die MON-Map automatisch.
> **Hinweis:** Node-Namen und IPs an das eigene Setup anpassen. Aktuelle Versionen des Tools aktualisieren die MON-Map automatisch.
## Hinweise