Files
memory/systems/galera-maxscale.md
T
2026-11-01 22:00:25 +00:00

5.6 KiB

title, category, tags, created, modified
title category tags created modified
MariaDB Galera + MaxScale systems
mariadb
galera
maxscale
database
ha
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.cnf auf VM300 (via qm guest exec)
  • 1Password mariadb-root Item: 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:mariadb auf :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+deb13u1 schreibt auf MaxScale-01 ein LEERES 50-cloud-init.yaml (netplan-Status disabled-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 (match macaddress, set-name: eth0, dhcp4: false, statische Addr/GW/DNS, mode 600) + cloud-init-Netzwerkkonfig deaktivieren. Vor jedem OS-Upgrade ls /etc/netplan/ + dhcp4: true prüfen. (b) Repo-Dateien je Node unterschiedlich: mariadb.sources (deb822, .71/.81/.82) vs. mariadb.list (.72/.73); zusätzlich fluent-bit.list auf .72/.73 (bookworm→trixie mitswitchen, sonst apt-Fehler). (c) galeramon (nicht mariadbmon) kennt KEINEN manuellen Switchover — Master-Wechsel nur über maxctrl set server <master> maintenance (Monitor promotet automatisch), danach clear server <node> maintenance. (d) Nach Kernel-Reboot Rejoin ~2 min (activating → Joining → Synced), MaxScale zeigt dabei Joining im Statusfeld.
  • Rolling-Upgrade-Fallen (2026-11-01): maxctrl set server <master> drain → 400 („server is master"); Master nur per maintenance ausleitbar, Monitor promotet automatisch. maxctrl clear server <name> braucht den State: clear server db2 drain. Repo-Dateiname je Node verschieden (mariadb.sources deb822 auf .71, mariadb.list auf .72/.73). apt auf HDD-Ceph ~10 min/Node → als nohup-Skript im Node laufen lassen.
  • Repo-Suiten: mariadb-server/11.8 = 11.8.9 identisch für bookworm und trixie; 11.4 hat keine trixie-Suite (404) → OS-Wechsel erst nach 11.8, dann nur Suite-Tausch.
  • 2026-10-04 (GROSSER VORFALL): Ext4-Volume-Label MARIADB_DATA auf allen 3 Galera-Datadisks verlor sich (Ursache ungeklärt, Symptome ab 04.10. ~07:58 MESZ). fstab montiert per LABEL=MARIADB_DATA mit nofail → Boot ging durch, aber /var/lib/mysql blieb LEER → mariadb crashte im Loop (Permission denied auf leeres Dir). Reparatur: e2label <dev> MARIADB_DATA je Disk (VM300 im Gast, VM301/302 offline via rbd map + mount auf Hypervisor) → Reboot. Pattern: bei leerem /var/lib/mysql trotz intakter fstab IMMER tune2fs -l → "volume name" prüfen. Galera-Recovery: Bootstrap-Kandidat per gvwmstate/grastate-Mtimes bestimmt (VM301, letzte View 38={301,300}), safe_to_bootstrap: 1 offline 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 -S bleibt nach Migration im Prozess-String — KEIN Beweis für "paused". Immer qm monitor <vmid> <<< 'info status' prüfen.
  • HA-Guard: ha-manager disable existiert nicht. Bei Resource-State request_stop geht qm stop trotzdem durch.
  • mariadb-galera-cluster-administration (devops)