Guide for managing netLD servers installed in an Active-Active redundant configuration.
This document will explain the steps required to convert a slave into a master instance.
- radmin command
- Viewing Status
- Convert Slave to Master
- Convert Master to Slave
The radmin command (found at /usr/share/netld/radmin) can be used to manage and check the status of a redundant server.
|radmin master||Converts the current instance into the master server|
|radmin slave||Converts the current instance into the slave server|
|radmin standalone||Converts the current instance into a standalone server (disables redundancy)|
|radmin status||Checks the current status of redundancy|
The radmin status command can be used to check the current status of redundancy.
To view the current status run the following commands:
[root@server ~]# cd /usr/share/netld [root@server netld]# ./radmin status
|Role||Shows the current redundancy role of the server ("master", "slave", or "standalone")|
|Replication||Shows whether or not redundancy is configured|
|PostgreSQL||Shows the current status of the PostgreSQL configuration.|
When the master and slave are connected this also shows the most recent PostgreSQL WAL ID
|Slave Host||For a master instance this is the IP address of the currently configured slave|
Master status, streaming to slave
[root@master netld]# ./radmin status Role: master Replication: configured PostgreSQL: configured (streaming: 0/300D800) Slave Host: 10.0.0.210 [root@master netld]#
In this output you can see a Slave Host is set and PostgreSQL is configured for replication. You can also see the current WAL ID in the PostgreSQL database.
Slave status, streaming from master
[root@slave netld]# ./radmin status Role: slave Replication: configured PostgreSQL: configured (streaming: 0/300D800) Master Host: 10.0.0.209 [root@slave netld]#
This output shows the Master Host is set as well as the most recent WAL id. You can see that the WAL ID for the slave database (0/300D800) matches identically to the master server's status above. This indicates that the databases are in sync and all data is replicated. For a busy server this ID can change rapidly so they might not always be identical.
Master status, slave not running
[root@server ~]# cd /usr/share/netld [root@server netld]# ./radmin status Role: master Replication: configured PostgreSQL: configured (not streaming) Slave Host: 10.0.0.210
This output indicates that the database replication is not active ("not streaming"). This could either mean that the slave's postgresql server is not running, or that there is a communication problem between the two databases.
No redundancy configured
[root@server netld]# ./radmin status Role: standalone Replication: not configured PostgreSQL: not configured
In this output you can see that the netLD is configured as a standalone server and PostgreSQL is not in use.
Convert Slave to Master
If the original master server is down, a slave server can easily be converted into the new master server by using the radmin master command
The following commands can be used to convert the slave server to a master server:
[root@slave ~]# cd/ usr/share/netld [root@slave netld]# ./radmin master Enter slave server IP address: ***.***.***.*** [root@slave netld]# reboot
Convert Master to Slave
A existing master server can be converted to a slave server using the radmin slave command.
The following commands can be used to convert a master server into a slave server:
[root@server ~]# cd /usr/share/netld/ [root@server netld]# ./radmin slave Enter master server IP address: ***.***.***.*** This operation is destructive. Any existing database will be removed and replaced with the contents of the specified backup file. Are you sure you want to continue? [y/n] y Enter password for Net LineDancer user 'admin' at 10.0.0.210: <password> [root@server netld]# reboot