Table of Contents Previous Next


5 Controlling the Failover Manager Service : 5.3 Using the efm Utility

Failover Manager provides the efm utility to assist with cluster management. The RPM installer adds the utility to the /usr/efm-2.1/bin directory when you install Failover Manager.
efm allow-node cluster_name
Invoke the efm allow-node command to allow the specified node to join the cluster. When invoking the command, provide the name of the cluster and the IP address of the joining node.
This command must be invoked by efm, a member of the efm group, or root.
Invoke the efm cluster-status command to display the status of a Failover Manager cluster. For more information about the cluster status report, see Section 4.2.1.
Invoke the efm cluster-status-json command to display the status of a Failover Manager cluster in json format. While the format of the displayed information is different than the display generated by the efm cluster-status command, the information source is the same.
{
"nodes": {
"172.16.144.161": {
"type": "Idle",
"agent": "UP",
"db": "UNKNOWN",
"info": " ",
"xlog": "UNKNOWN",
"xloginfo": "Connection to 172.16.144.161:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP\/IP connections."
},
"172.16.144.160": {
"type": "Standby",
"agent": "UP",
"db": "UP",
"info": " ",
"xlog": "3\/80001A18",
"xloginfo": ""
},
"172.16.144.159": {
"type": "Master",
"agent": "UP",
"db": "UP",
"info": " ",
"xlog": "3\/80001A18",
"xloginfo": ""
},
"172.16.144.172": {
"type": "Standby",
"agent": "UP",
"db": "UP",
"info": " ",
"xlog": "3\/80001A18",
"xloginfo": ""
}
},
"allowednodes": [
"172.16.144.160",
"172.16.144.159",
"172.16.144.161",
"172.16.144.172"
],
"membershipcoordinator": "172.16.144.160",
"failoverpriority": [
"172.16.144.160",
"172.16.144.172"
],
"VIP": "",
"minimumstandbys": 0,
"messages": []
}
efm disallow-node cluster_name ip_address
Invoke the efm disallow-node command to remove the specified node from the allowed hosts list, and prevent the node from joining a cluster. Provide the name of the cluster and the IP address of the node when calling the efm disallow -node command. This command must be invoked by efm, a member of the efm group, or root.
efm encrypt cluster_name [--from-env]
Invoke the efm encrypt command to encrypt the database password before include the password in the cluster properties file. Include the --from-env option to instruct Failover Manager to use the value specified in the EFMPASS environment variable, and execute without user input. For more information, see Section 3.2.1.2.
efm promote cluster_name [-switchover]
The promote command instructs Failover Manager to perform a manual failover of standby to master. Include the –switchover option to promote a standby node, and reconfigure a master node as a standby node.
This command must be invoked by efm, a member of the efm group, or root.
efm prop-check cluster_name
The efm prop-check command invokes a utility that may help to identify configuration problems caused by mismatched property files.
When invoked on the Witness node with a cluster named employees, the prop-check command might display:
# efm prop-check employees
Agents: 172.24.38.107:7800

Binding address: 172.24.38.107
I am witness node: true
Cluster name: employees
User email: [user.name@example.com]
Notification script: null

VIP: 172.24.38.239
Automatic failover set to: true

Network adapters: eth0
fe80:0:0:0:10a8:bff:fe7c:70cf%2
172.24.38.185

lo
0:0:0:0:0:0:0:1%1
127.0.0.1
efm resume cluster_name
Invoke the efm resume command to resume monitoring a previously stopped database. This command must be invoked by efm, a member of the efm group, or root.
efm set-priority cluster_name ip_address priority
Invoke the efm set-priority command to assign a failover priority to a standby node. The value specifies the order in which the new node will be used in the event of a failover. This command must be invoked by efm, a member of the efm group, or root.
priority is an integer value of 1 to n, where n is the number of standby nodes in the list. Specify a value of 1 to indicate that the new node is the primary standby, and will be the first node promoted in the event of a failover. A priority of 0 instructs Failover Manager to not promote the standby.
efm stop-cluster cluster_name
Invoke the efm stop-cluster command to stop Failover Manager on all nodes. This command instructs Failover Manager to connect to each node on the cluster and instruct the existing members to shut down. The command has no effect on running databases, but when the command completes, there is no failover protection in place.
Please note: when you invoke the efm stop-cluster command, all authorized node information is removed from the Allowed node host list. For detailed information about restarting a Failover Manager cluster, please see Section 4.1.7.
This command must be invoked by efm, a member of the efm group, or root.
efm upgrade-conf cluster_name
Invoke the efm upgrade-conf command to copy the configuration files from a Failover Manager 2.0 installation, and add parameters required by a Failover Manager 2.1 installation. Provide the name of the 2.0 cluster when invoking the utility. This command must be invoked with root privileges.
Invoke the efm --help command to display online help for the Failover Manager utility commands.

5 Controlling the Failover Manager Service : 5.3 Using the efm Utility

Table of Contents Previous Next