5.6 KiB
title, category, tags, created, modified
| title | category | tags | created | modified | |||||
|---|---|---|---|---|---|---|---|---|---|
| MariaDB Galera + MaxScale | systems |
|
2026-07-24 | 2026-11-01 |
MariaDB Galera + MaxScale
Galera Cluster (3/3 Synced)
Version (2026-11-01, nach Welle 4): MariaDB 11.8.9 (-deb13), galera-4 26.4.27-deb13,
OS Debian 13 trixie, Kernel 6.12.113+deb13-amd64 auf allen 3 Nodes. Rolling: 11.4.12/13 → 11.8.9
(Runbook docs/solutions/migrations/2026-11-01-galera-11.4-to-11.8.9-rolling.md), danach OS-Suite
bookworm → trixie (docs/solutions/migrations/2026-11-01-welle4-bookworm-trixie-maxscale-galera.md).
Nebeneffekt: Kernel 6.12.113 schließt CVE-2026-98432 für diese Tier.
| Node | VM | Aktuell auf (10.10.) | Erlaubte Nodes (HA-Rule) | IP |
|---|---|---|---|---|
| db1 | VM300 | proxmox4 | n5pro, proxmox3, proxmox4 | 10.0.30.71 |
| db2 | VM301 | proxmox7 | proxmox5, proxmox6, proxmox7 | 10.0.30.72 |
| db3 | VM302 | ms-a2-2 | ms-a2-1, ms-a2-2 | 10.0.30.73 |
Rollen (Master/Slave) dynamisch — 10.10. war db2 Master. Anti-Collocation-Rules: 300⊥301, 300⊥302, 301⊥302.
- Root Credentials:
/root/.my.cnfauf VM300 (viaqm guest exec) - 1Password
mariadb-rootItem: PASSWORT IST FALSCH — stimmt nicht mit/root/.my.cnfüberein
MaxScale Proxy (HA)
Stand 2026-11-01 (Welle 4): beide Nodes Debian 13 trixie, Kernel 6.12.113, MaxScale 24.02.9~trixie-1 — Upgrade .82 zuerst, dann .81; VIP blieb durchgehend erreichbar.
| Node | VM | Aktuell auf (10.10.) | Erlaubte Nodes (HA-Rule) | IP |
|---|---|---|---|---|
| MaxScale-01 | VM310 | proxmox7 | proxmox4, proxmox5, proxmox7 | 10.0.30.81 (:8989 Admin) |
| MaxScale-02 | VM311 | ms-a2-1 | ms-a2-1, ms-a2-2 | 10.0.30.82 |
| VIP | — | — | — | 10.0.30.70 :3306 (keepalived) |
Anti-Collocation: 310⊥311. 2026-10-10: Beide Failover-VMs (301, 310) live auf p7 zurückmigriert (ha-manager migrate), verifiziert via MaxCtrl: db2 Master/Synced/Running, 3/3 Synced, VIP .70:3306 offen, maxscale+keepalived active.
- Admin:
admin:mariadbauf :8989
VM Konfiguration
- VM300:
balloon: 0(disabled) — verhindert InnoDB Buffer Pool Swapping - Standard Practice für DB VMs
Fluent Bit
- VM300/301/302 (Galera): Fluent Bit aktiv
- VM310/311 (MaxScale): Fluent Bit aktiv
Bekannte Issues
- Welle-4-Fallen (2026-11-01, bookworm→trixie): (a)
cloud-init 25.1.4-1+deb13u1schreibt auf MaxScale-01 ein LEERES50-cloud-init.yaml(netplan-Statusdisabled-by-generator,KeyError: 'recoverable_errors') → systemd-networkd fällt auf DHCP zurück, Host verliert seine statische IP (10.0.30.81 bekam .108). Fix: eigenes/etc/netplan/99-static-eth0.yaml(matchmacaddress,set-name: eth0,dhcp4: false, statische Addr/GW/DNS, mode 600) + cloud-init-Netzwerkkonfig deaktivieren. Vor jedem OS-Upgradels /etc/netplan/+dhcp4: trueprüfen. (b) Repo-Dateien je Node unterschiedlich:mariadb.sources(deb822, .71/.81/.82) vs.mariadb.list(.72/.73); zusätzlichfluent-bit.listauf .72/.73 (bookworm→trixie mitswitchen, sonst apt-Fehler). (c)galeramon(nichtmariadbmon) kennt KEINEN manuellen Switchover — Master-Wechsel nur übermaxctrl set server <master> maintenance(Monitor promotet automatisch), danachclear server <node> maintenance. (d) Nach Kernel-Reboot Rejoin ~2 min (activating→Joining→Synced), MaxScale zeigt dabeiJoiningim Statusfeld. - Rolling-Upgrade-Fallen (2026-11-01):
maxctrl set server <master> drain→ 400 („server is master"); Master nur permaintenanceausleitbar, Monitor promotet automatisch.maxctrl clear server <name>braucht den State:clear server db2 drain. Repo-Dateiname je Node verschieden (mariadb.sourcesdeb822 auf .71,mariadb.listauf .72/.73). apt auf HDD-Ceph ~10 min/Node → alsnohup-Skript im Node laufen lassen. - Repo-Suiten:
mariadb-server/11.8= 11.8.9 identisch für bookworm und trixie;11.4hat keine trixie-Suite (404) → OS-Wechsel erst nach 11.8, dann nur Suite-Tausch. - 2026-10-04 (GROSSER VORFALL): Ext4-Volume-Label
MARIADB_DATAauf allen 3 Galera-Datadisks verlor sich (Ursache ungeklärt, Symptome ab 04.10. ~07:58 MESZ). fstab montiert perLABEL=MARIADB_DATAmitnofail→ Boot ging durch, aber/var/lib/mysqlblieb LEER → mariadb crashte im Loop (Permission denied auf leeres Dir). Reparatur:e2label <dev> MARIADB_DATAje Disk (VM300 im Gast, VM301/302 offline viarbd map+ mount auf Hypervisor) → Reboot. Pattern: bei leerem /var/lib/mysql trotz intakter fstab IMMERtune2fs -l→ "volume name" prüfen. Galera-Recovery: Bootstrap-Kandidat per gvwmstate/grastate-Mtimes bestimmt (VM301, letzte View 38={301,300}),safe_to_bootstrap: 1offline in grastate geschrieben → 301 startete als PC, 300 jointe sofort, 302 folgte (IST 570871→570923, Delta nur 52 Tx). Ende: 3/3 Synced, MaxScale beide aktiv, VIP offen. - 2026-09-29: VM302 Zombie-State nach Migration (QEMU running, Services tot, QGA down). Behoben via Stop+Start; SST-Rejoin ~2-3min. Siehe
docs/solutions/bug-fixes/2026-09-29-vm302-zombie-postmigration-galera-rejoin.md - QEMU-Cmdline-Falle:
-incoming unix:/run/qemu-server/NNN.migrate -Sbleibt nach Migration im Prozess-String — KEIN Beweis für "paused". Immerqm monitor <vmid> <<< 'info status'prüfen. - HA-Guard:
ha-manager disableexistiert nicht. Bei Resource-Staterequest_stopgehtqm stoptrotzdem durch.
Related Skills
mariadb-galera-cluster-administration(devops)