Installation guide

<apache config_file="conf/httpd.conf" name="example_server"
server_root="/etc/httpd" shutdown_wait="0"/>
</resources>
</rm>
</cluster>
7.5.2. Adding a Clust er Service t o t he Clust er
To add a cluster service to the cluster, follow the steps in this section.
Note
The examples provided in this section show a cluster service in which all of the resources are
at the same level. For information on defining a service in which there is a dependency chain
in a resource hierarchy, as well as the rules that govern the behavior of parent and child
resources, see Appendix C, HA Resource Behavior.
1. Open /etc/cl uster/cl uster.co nf at any node in the cluster.
2. Add a service section within the rm element for each service. For example:
<rm>
<service autostart="1" domain="" exclusive="0" name=""
recovery="restart">
</service>
</rm>
3. Configure the following parameters (attributes) in the service element:
autostart — Specifies whether to autostart the service when the cluster starts. Use '1' to
enable and '0' to disable; the default is enabled.
d o mai n — Specifies a failover domain (if required).
exclusi ve — Specifies a policy wherein the service only runs on nodes that have no
other services running on them.
recovery — Specifies a recovery policy for the service. The options are to relocate,
restart, disable, or restart-disable the service.
4. Depending on the type of resources you want to use, populate the service with global or
service-specific resources
For example, here is an Apache service that uses global resources:
<rm>
<resources>
<fs name="web_fs" device="/dev/sdd2"
mountpoint="/var/www" fstype="ext3"/>
Fencin g Configurat ion Examples
121