Page tree

Welcome to FreeSoftwareServers Confluence Wiki

Skip to end of metadata
Go to start of metadata

Garbd or Galera Arbitrator Daemon is installed by default with MariaDB Galera Cluster.

First lets start it manually via the CLI and confirm it's working, then configure the config file and check it works at boot.

Note: For CentOS 7 you can NOT specifiy a log file in the config, this took me a while to figure out, as you can specifify a log file via the CLI. Don't ask me why.

  • Also note, the wsrep_cluster_size will be 0 on garbd, this is normal, if you want to check, use other nodes in cluster

https://www.percona.com/doc/percona-xtradb-cluster/LATEST/howtos/garbd_howto.html

Example start from CLI:

garbd -a gcomm://10.1.1.255:4567 -g sql_cluster -l /var/log/garbd.log -d &&  tail -f /var/log/garbd.log

On another node, check for cluster size, should increase by 1:

mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"

Configure auto start @ boot:

cat << 'EOL' >/etc/sysconfig/garb
# Copyright (C) 2012 Codership Oy
# This config file is to be sourced by garb service script.

# A comma-separated list of node addresses (address[:port]) in the cluster
GALERA_NODES="10.1.1.255:4567,10.1.1.256:4567"

# Galera cluster name, should be the same as on the rest of the nodes.
GALERA_GROUP="sql_cluster"

# Optional Galera internal options string (e.g. SSL settings)
# see http://galeracluster.com/documentation-webpages/galeraparameters.html
# GALERA_OPTIONS=""

# Log file for garbd. Optional, by default logs to syslog
# Deprecated for CentOS7, use journalctl to query the log for garbd
# LOG_FILE="/var/log/garbd.log"
EOL
systemctl restart garb
systemctl enable garb.service
systemctl status garb
mysql -u root -p -e "SHOW STATUS LIKE 'wsrep_cluster_size'"

Now Reboot and check cluster size again, confirming it joined the cluster on boot.

  • No labels

1 Comment