--- title: MariaDB Galera + MaxScale category: systems tags: [mariadb, galera, maxscale, database, ha] created: "2026-07-24" modified: "2026-10-04" --- # MariaDB Galera + MaxScale ## Galera Cluster (3/3 Synced) | 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) | 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 - **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 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 <<< 'info status'` prüfen. - **HA-Guard:** `ha-manager disable` existiert nicht. Bei Resource-State `request_stop` geht `qm stop` trotzdem durch. ## Related Skills - `mariadb-galera-cluster-administration` (devops) ## Related - [[systems/proxmox-cluster]] - [[reference/ip-map]]