OCF_HEARTBEAT_GALERA(7)
π ocf_heartbeat_galera β bestie's guide to the Galera resource agent
okay so real talk: this is page OCF_HEARTBEAT_GALERA(7) from the OCF resource agents manual collection, and it's literally the whole lore on ocf_heartbeat_galera. grab a boba, we're getting into it π§β¨
πΈ NAME πΈ
ocf_heartbeat_galera β she manages a galera instance. that's the whole job. no cap. π
β¨ SYNOPSIS β¨
galera [start | stop | status | monitor | promote | demote | meta-data |
validate-all]
π¦ DESCRIPTION π¦
it's a resource script for managing your galera database. iconic behavior, honestly. π
π SUPPORTED PARAMETERS π
these are the knobs, bestie. every single one. let's go down the list π«Ά
binaryβ where your MySQL server binary lives. (optional, string, no default)client_binaryβ where your MySQL client binary lives. (optional, string, no default)configβ the config file, yeah? (optional, string, no default)datadirβ the directory that's holding all your databases. (optional, string, no default)userβ the user running the MySQL daemon. (optional, string, no default)groupβ the group running the MySQL daemon (this one handles logfile and directory permissions). (optional, string, no default)logβ the logfilemysqldshould use. (optional, string, no default)pidβ the pidfilemysqldshould use. (optional, string, no default)socketβ the socketmysqldshould use. (optional, string, no default)enable_creationβ if the MySQL database doesn't exist yet, it gets created. poof, there it is β¨ (optional, boolean, default false)additional_parametersβ extra params that get passed tomysqldon startup (like--skip-external-lockingor--skip-grant-tables). (optional, string, no default)wsrep_cluster_addressβ the galera cluster address, and it takes this form:
gcomm://node,node,node
only the nodes listed here are allowed to start a galera instance β like a VIP list, but make it database ποΈ. the galera node names in this address are expected to match valid pacemaker node names. and if the two names need to differ, you must provide a mapping in the option cluster_host_map. (required, string, no default)
cluster_host_mapβ a mapping of pacemaker node names to galera node names π
use this when pacemaker names and galera names need to differ (e.g. when the galera names map to an IP from a specific network interface). it takes this form:
pcmk1:node.1.galera;pcmk2:node.2.galera;pcmk3:node.3.galera
where the galera resource started on node pcmk1 would be named node.1.galera in the wsrep_cluster_address. (optional, string, no default)
check_userβ the cluster check user. (optional, string, no default)check_passwdβ the cluster check user's password. empty passwords get ignored unless the parameter"check_passwd_use_empty"is set to1. (optional, string, no default)check_passwd_use_emptyβ use an empty"check_passwd"password. if this is set to1, then"check_passwd"is ignored and an empty password is used when calling the"mysql"client binary. (optional, boolean, default 0)two_node_modeβ if you're running in a 2-node pacemaker cluster, this leans on pacemaker quorum so you get automatic recovery even when the other node is unreachable. β οΈ use it with caution! (and fencing, bestie, fencing) (optional, boolean, default false)
β SUPPORTED ACTIONS β
this resource agent supports these actions (operations for the uninitiated). each one comes with a suggested minimum timeout, and two of them want an interval too:
startβ starts the resource. suggested minimum timeout:120s.stopβ stops the resource. suggested minimum timeout:120s.statusβ performs a status check. suggested minimum timeout:60s.monitorβ performs a detailed status check. suggested minimum timeout:30s. suggested interval:20s.monitor (Promoted role)β performs a detailed status check, but for the promoted role. suggested minimum timeout:30s. suggested interval:10s.promoteβ promotes the resource to the Master role. π suggested minimum timeout:300s.demoteβ demotes the resource to the Slave role. suggested minimum timeout:120s.validate-allβ performs a validation of the resource configuration. suggested minimum timeout:5s.meta-dataβ retrieves resource agent metadata (internal use only, don't touch π). suggested minimum timeout:5s.
π EXAMPLE CRM SHELL π
here's what a galera resource config looks like using the crm(8) shell β copy/paste energy, iykyk:
primitive p_galera ocf:heartbeat:galera \
params \
wsrep_cluster_address=string \
op monitor depth="0" timeout="30s" interval="20s" \
op monitor role="Promoted" depth="0" timeout="30s" interval="10s"
ms ms_galera p_galera \
meta notify="true" interleave="true"
π EXAMPLE PCS π
and here's the same vibe via pcs(8):
pcs resource create p_galera ocf:heartbeat:galera \
wsrep_cluster_address=string \
op monitor OCF_CHECK_LEVEL="0" timeout="30s" interval="20s" \
op monitor role="Promoted" OCF_CHECK_LEVEL="0" timeout="30s" interval="10s" promotable
π₯ SEE ALSO π₯
http://clusterlabs.org/β go say hi, they're the moment π
π AUTHOR π
ClusterLabs contributors (see the resource agent source for information about individual authors). honestly? legends, all of them. π«Ά
okay that's the whole page, you ate that π
β¨ this was resource-agents version UNKNOWN, dated 10/01/2026, served fresh from the OCF_HEARTBEAT_GALERA(7) girlies. go forth and cluster, bestie π¦π
π¦ where this page comes from
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- opensuse-leap 16.0: resource-agents 4.18.0+git105.9ea1183-160000.1.1 Β· GPL-2.0-only AND LGPL-2.1-or-later AND GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms