Language and Page Formatting Options
6.8. Configuring a Failover Domain
A failover domain is a named subset of cluster nodes that are eligible to run a cluster service in the event of a node failure. A failover domain can have the following characteristics:
- Unrestricted — Allows you to specify that a subset of members are preferred, but that a cluster service assigned to this domain can run on any available member.
- Restricted — Allows you to restrict the members that can run a particular cluster service. If none of the members in a restricted failover domain are available, the cluster service cannot be started (either manually or by the cluster software).
- Unordered — When a cluster service is assigned to an unordered failover domain, the member on which the cluster service runs is chosen from the available failover domain members with no priority ordering.
- Ordered — Allows you to specify a preference order among the members of a failover domain. The member at the top of the list is the most preferred, followed by the second member in the list, and so on.
- Failback — Allows you to specify whether a service in the failover domain should fail back to the node that it was originally running on before that node failed. Configuring this characteristic is useful in circumstances where a node repeatedly fails and is part of an ordered failover domain. In that circumstance, if a node is the preferred node in a failover domain, it is possible for a service to fail over and fail back repeatedly between the preferred node and another node, causing severe impact on performance.
NoteThe failback characteristic is applicable only if ordered failover is configured.
Changing a failover domain configuration has no effect on currently running services.
Failover domains are not required for operation.
By default, failover domains are unrestricted and unordered.
In a cluster with several members, using a restricted failover domain can minimize the work to set up the cluster to run a cluster service (such as
httpd) which requires you to set up the configuration identically on all members that run the cluster service. Instead of setting up the entire cluster to run the cluster service, you can set up only the members in the restricted failover domain that you associate with the cluster service.
To configure a preferred member, you can create an unrestricted failover domain comprising only one cluster member. Doing that causes a cluster service to run on that cluster member primarily (the preferred member), but allows the cluster service to fail over to any of the other members.
To configure a failover domain, perform the following procedure:
- To add a failover domain, execute the following command:
ccs -h host --addfailoverdomain name [restricted] [ordered] [nofailback]
NoteThe name should be descriptive enough to distinguish its purpose relative to other names used in your cluster.For example, the following command configures a failover domain named
node-01.example.comthat is unrestricted, ordered, and allows failback:
ccs -h node-01.example.com --addfailoverdomain example_pri ordered
- To add a node to a failover domain, execute the following command:
ccs -h host --addfailoverdomainnode failoverdomain node priorityFor example, to configure the failover domain
example_priin the configuration file on
node-01.example.comso that it contains
node-01.example.comwith a priority of 1,
node-02.example.comwith a priority of 2, and
node-03.example.comwith a priority of 3, execute the following commands:
ccs -h node-01.example.com --addfailoverdomainnode example_pri node-01.example.com 1 ccs -h node-01.example.com --addfailoverdomainnode example_pri node-02.example.com 2 ccs -h node-01.example.com --addfailoverdomainnode example_pri node-03.example.com 3
NoteThe priority value is applicable only if ordered failover is configured.
You can list all of the failover domains and failover domain nodes configured in a cluster with the following command:
ccs -h host --lsfailoverdomain
To remove a failover domain, execute the following command:
ccs -h host --rmfailoverdomain name
To remove a node from a failover domain, execute the following command:
ccs -h host --rmfailoverdomainnode failoverdomain node
Note that when you have finished configuring all of the components of your cluster, you will need to sync the cluster configuration file to all of the nodes, as described in Section 6.15, “Propagating the Configuration File to the Cluster Nodes”.