Using the efm Utility¶
Failover Manager provides the efm utility to assist with cluster
management. The RPM installer adds the utility to the
/usr/edb/efm-4.0/bin directory when you install Failover Manager.
efm allow-node <cluster_name>
Invoke the
efm allow-nodecommand 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 theefmgroup, or root.
efm disallow-node <cluster_name> <ip_address>
Invoke the
efm disallow-nodecommand 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 theefm disallow-nodecommand. This command must be invoked byefm, a member of theefmgroup, or root.
efm cluster-status <cluster_name>
Invoke the
efm cluster-statuscommand to display the status of a Failover Manager cluster. For more information about the status report, see Monitoring a Failover Manager Cluster.
efm cluster-status-json <cluster_name>
Invoke the
efm cluster-status-jsoncommand 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.The following example is generated by querying the status of a healthy cluster with two nodes:
{
"nodes": {
"172.16.144.176": {
"type": "Witness",
"agent": "UP",
"db": "N\/A",
"vip": "",
"vip_active": false
},
"172.16.144.177": {
"type": "Primary",
"agent": "UP",
"db": "UP",
"vip": "",
"vip_active : false"
"xlogReceive : 0/14001478"
"xlog : 0/14001478"
"xloginfo :"
},
"172.16.144.180": {
"type": "Standby",
"agent": "UP",
"db": "UP",
"vip": "",
"vip_active : false"
"xlogReceive : 0/14001478"
"xlog : 0/14001478"
"xloginfo :"
}
},
"allowednodes": [
"172.16.144.177",
"172.16.144.160",
"172.16.144.180",
"172.16.144.176"
],
"membershipcoordinator": "172.16.144.177",
"failoverpriority": [
"172.16.144.180"
],
"minimumstandbys": 0,
"missingnodes": [],
"messages": []
}
efm encrypt <cluster_name> [--from-env]
Invoke the
efm encryptcommand to encrypt the database password before include the password in the cluster properties file. Include the--from-envoption to instruct Failover Manager to use the value specified in theEFMPASSenvironment variable, and execute without user input. For more information, see Encrypting Your Database Password.
efm promote cluster_name [-switchover [-sourcenode <address>][-quiet][-noscripts]
The
efm promotecommand instructs Failover Manager to perform a manual failover of standby to primary.Manual promotion should only be attempted if the status command reports that the cluster includes a Standby node that is up-to-date with the Primary. If there is no up-to-date Standby, Failover Manager will prompt you before continuing.
Include the
–switchoverclause to promote a standby node, and reconfigure a primary node as a standby node. Include the-sourcenodekeyword, and specify a node address to indicate the node whose recovery.conf file will be copied to the old primary node (making it a standby). Include the-quietkeyword to suppress notifications during the switchover process. Include the-noscriptskeyword to instruct Failover Manager to not invoke fencing or post-promotion scripts.This command must be invoked by
efm, a member of theefmgroup, or root.Please note: This command instructs the service to ignore the value specified in the
auto.failoverparameter in the cluster properties file.
efm resume <cluster_name>
Invoke the
efm resumecommand 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-prioritycommand 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 byefm, a member of theefmgroup, 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 value of 0 instructs Failover Manager to not promote the standby.
efm stop-cluster <cluster_name>
Invoke the
efm stop-clustercommand 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-clustercommand, all authorized node information is removed from the Allowed node host list.This command must be invoked by
efm, a member of theefmgroup, or root.
efm upgrade-conf <cluster_name> [-source <directory>]
Invoke the
efm upgrade-confcommand to copy the configuration files from an existing Failover Manager installation, and add parameters required by a Failover Manager installation. Provide the name of the previous cluster when invoking the utility. This command must be invoked with root privileges.If you are upgrading from a Failover Manager configuration that does not use sudo, include the
-sourceflag and specify the name of the directory in which the configuration files reside when invoking upgrade-conf.
efm node-status-json <cluster_name>
Invoke the
efm node-status-jsoncommand to display the status of a local node in json format. A successful execution of this command returns0as its exit code. In case of a database failure or an agent status becoming IDLE, the command returns1as exit code.The following is an example output of the
efm node-status-jsoncommand:{ "type":"Standby", "address":"172.16.144.130", "agent":"UP", "db":"UP", "vip":"", "vip_active":"false" }
efm --help
Invoke the
efm --helpcommand to display online help for the Failover Manager utility commands.