4.9 Running Multiple Agents on a Single Node

Table of Contents Previous Next


4 Using Failover Manager : 4.9 Running Multiple Agents on a Single Node

The examples that follow uses two database clusters (acctg and sales) running on the same node:
Data for acctg resides in /opt/pgdata1; its server is monitoring port 5444.
Data for sales resides in /opt/pgdata2; its server is monitoring port 5445.
To run a Failover Manager agent for both of these database clusters, use the efm.properties.in template to create two properties files. Each cluster properties file must have a unique name. For this example, we create acctg.properties and sales.properties to match the acctg and sales database clusters.
admin.port
bind.address
db.port
db.recovery.conf.dir
script.fence
(if used)
virtualIp (if used)
virtualIp.interface
(if used)
Within each cluster properties file, the db.port parameter should specify a unique value for each cluster, while the db.user and db.database parameter may have the same value or a unique value. For example, the acctg.properties file may specify:
While the sales.properties file may specify:
When creating the cluster properties file for each cluster, the db.recovery.conf.dir parameters must also specify values that are unique for each respective database cluster.
If you are using a fencing script, use the script.fence parameter to identify a fencing script that is unique for each cluster. In the event of a failover, Failover Manager does not pass any information to the fencing script that could identify which master has failed.
virtualIp.interface
You must specify a unique interface name for each cluster. For example, acctg.properties might include a value of eth0:0, while sales.properties might specify eth0:1.
virtualIp.netmask
After creating the acctg.properties and sales.properties files, create a service script for each cluster that points to the respective property files; this step is platform specific. If you are using RHEL 6.x or CentOS 6.x, see Section 4.9.1; if you are using RHEL 7.x or CentOS 7.x, see Section 4.9.2.
If you are using RHEL 6.x or CentOS 6.x, you should copy the efm-2.0 service script to new file with a name that is unique for each cluster. For example:
Then edit the CLUSTER variable, modifying the cluster name from efm to acctg or sales.
If you are using RHEL 7.x or CentOS 7.x, you should copy the efm-2.0 service script to new file with a name that is unique for each cluster. For example:
Then edit the CLUSTER variable, modifying the cluster name from efm to acctg or sales.

4 Using Failover Manager : 4.9 Running Multiple Agents on a Single Node

Table of Contents Previous Next