8.5. Configuring HA Services
Configuring HA (High Availability) services consists of configuring resources and assigning them to services.
The following sections describe how to edit
/etc/cluster/cluster.conf to add resources and services.
Important
There can be a wide range of configurations possible with High Availability resources and services. For a better understanding about resource parameters and resource behavior, see Appendix B, HA Resource Parameters and Appendix C, HA Resource Behavior. For optimal performance and to ensure that your configuration can be supported, contact an authorized Red Hat support representative.
8.5.1. Adding Cluster Resources Copy linkLink copied to clipboard!
Copy linkLink copied to clipboard!
You can configure two types of resources:
- Global — Resources that are available to any service in the cluster. These are configured in the
resourcessection of the configuration file (within thermelement). - Service-specific — Resources that are available to only one service. These are configured in each
servicesection of the configuration file (within thermelement).
This section describes how to add a global resource. For procedures about configuring service-specific resources, refer to Section 8.5.2, “Adding a Cluster Service to the Cluster”.
To add a global cluster resource, follow the steps in this section.
- Open
/etc/cluster/cluster.confat any node in the cluster. - Add a
resourcessection within thermelement. For example:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Populate it with resources according to the services you want to create. For example, here are resources that are to be used in an Apache service. They consist of a file system (
fs) resource, an IP (ip) resource, and an Apache (apache) resource.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example 8.9, “cluster.confFile with Resources Added ” shows an example of acluster.conffile with theresourcessection added. - Update the
config_versionattribute by incrementing its value (for example, changing fromconfig_version="2"toconfig_version="3"). - Save
/etc/cluster/cluster.conf. - (Optional) Validate the file against the cluster schema (
cluster.rng) by running theccs_config_validatecommand. For example:ccs_config_validate
[root@example-01 ~]# ccs_config_validate Configuration validatesCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Run the
cman_tool version -rcommand to propagate the configuration to the rest of the cluster nodes. - Verify that the updated configuration file has been propagated.
Example 8.9. cluster.conf File with Resources Added