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-3.6/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.

efm cluster-status <cluster_name>

Invoke the efm cluster-status command to display the status of a Failover Manager cluster. For more information about the cluster status report, see Monitoring a Failover Manager Cluster.

efm cluster-status-json <cluster_name>

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.

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": "Master",
            "agent": "UP",
            "db": "UP",
            "vip": "",
            "vip_active": false,
            "xlog": "2\/77000220",
            "xloginfo": ""
        },
        "172.16.144.180": {
            "type": "Standby",
            "agent": "UP",
            "db": "UP",
            "vip": "",
            "vip_active": false,
            "xlog": "2\/77000220",
            "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 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 Encrypting Your Database Password.

efm promote cluster_name [-switchover [-sourcenode <address>][-quiet][-noscripts]

The efm promote command instructs Failover Manager to perform a manual failover of standby to master.

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 Master. If there is no up-to-date Standby, Failover Manager will prompt you before continuing.

Include the –switchover clause to promote a standby node, and reconfigure a master node as a standby node. Include the -sourcenode keyword, and specify a node address to indicate the node whose recovery.conf file will be copied to the old master node (making it a standby). Include the -quiet keyword to suppress notifications during the switchover process. Include the -noscripts keyword to instruct Failover Manager to not invoke fencing or post-promotion scripts.

This command must be invoked by efm, a member of the efm group, or root.

Please note that this command instructs the service to ignore the value specified in the auto.failover parameter in the cluster properties file.

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 value 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.

This command must be invoked by efm, a member of the efm group, or root.

efm upgrade-conf <cluster_name> [-source <directory>]

Invoke the efm upgrade-conf command 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 -source flag and specify the name of the directory in which the configuration files reside when invoking upgrade-conf.

efm --help

Invoke the efm --help command to display online help for the Failover Manager utility commands.