Your Galera Cluster Production Questions, Answered

One of the unpublished benefits of our training courses is that we hold an office hours session, usually one to two weeks after the training is complete, so that you can ask questions and receive answers. As always, we receive interesting questions, and this time we’ve decided to publish a selection of answers. You can join our next training sessions, both in EMEA and North America friendly timezones, happening 27 February – 2 March 2023.

Question: I have a client wanting to run xtrabackup on one node of a 3 node cluster. What is the best way to handle this?

Answer: To make backups, we recommend reading the Percona XtraBackup documentation on The backup cycle – full backups. To be clear, this is for MySQL 8.0. While not directly related to the question, it is also worth reading the Kubernetes related documentation for Percona Operator for MySQL based on Percona XtraDB Cluster, providing backups.

Question: I have a client that will be upgrading as recommended. They have one replica off one node of a 3 node cluster and plan on moving to a new set of nodes from the replica. Do they just add one node as a replica, let all the data replicate across and then break replication? Do you have steps?

Answer: To properly understand this question, we presume that there is already an existing 3-node Galera Cluster, there is now one asynchronous replica from the 3-node Galera Cluster, and at some stage, the asynchronous replica will serve as a primary to expand another 2 nodes, to have a new 3-node Galera Cluster with likely a new version of MySQL.

We have step-by-step guides for this, Migrating to Galera Cluster.

Question: Why are gcache.page.nnn files created?

Answer: Maybe you have noticed in your logs, files such as gcache.page.000001 are being created. An example is as such:

2022-10-18 13:09:28 0 [Note] WSREP: Preallocating 134217728/134217728 bytes in '/var/db/mysql/gcache.page.000001'...
2022-10-18 13:09:29 0 [Note] WSREP: Created page /var/db/mysql/gcache.page.000001 of size 134217728 bytes
2022-10-18 13:29:00 0 [Note] WSREP: Preallocating 134217728/134217728 bytes in '/var/db/mysql/gcache.page.000002'...
2022-10-18 13:29:00 0 [Note] WSREP: Created page /var/db/mysql/gcache.page.000002 of size 134217728 bytes

And later on, one may notice that it also gets deleted:

2022-10-18 13:30:07 0 [Note] WSREP: Deleted page /var/db/mysql/gcache.page.000001
2022-10-18 13:30:20 0 [Note] WSREP: Deleted page /var/db/mysql/gcache.page.000002

These files are created only for 2 reasons:

  1. Encryption is enabled.
  2. Galera Cluster has run out of space in the main ring buffer.

In most cases, if encryption is disabled, it is probably space constraints within the ring buffer. There is currently no utilisation metric.

Gentle reminder, to join our next training sessions, both in EMEA and North America friendly timezones, happening 27 February – 2 March 2023.