Adding Additional Public Addresses to CTDB Clusters
This article will cover adding additional VIP(virtual IP) public addresses to a CTDB cluster. This process should only be used when new gateways are added to a pre-standing cluster or CTDB was configured with a singular public address.
- A standing Ceph cluster
- CTDB installed and configured
- Additional IP address(es)
- Additional gateway nodes
To get started, verify that CTDB is running and is in an healthy state using ctdb status.
Afterwards, take a look at the public addresses file using cat /etc/ctdb/public_addresses. Take note of the number of IPs that are listed.
To verify that these IPs are being properly assigned to your gateway nodes, you can run an ip a command to list off the IP addresses on each node. Below, we can see the virtual IP was assigned to the second gateway address. In this environment, there are three gateway nodes, but a singular public address, so we’ll be adding an additional address.
From here, on a gateway node, open the public_addresses file with your choice of text editor:
Now we can add the additional VIP address. Simply add it on another line in the following format– IP.ADD.RE.SS/Subnet <Interface Name>
After editing this file, scp the file to the other CTDB nodes.
For example: scp /etc/ctdb/public_addresses sgw02:/etc/ctdb.
Now we can run a systemctl restart ctdb. We’ll be doing rolling restarts across each CTDB node.
Wait for the node to be brought back to a healthy state, then restart CTDB on the next node.
The IP addresses should be properly assigned across the nodes now: