Installation guide
7.5.1. Adding Clust er Resources
You can configure two types of resources:
Global — Resources that are available to any service in the cluster. These are configured in the
resources section of the configuration file (within the rm element).
Service-specific — Resources that are available to only one service. These are configured in each
service section of the configuration file (within the rm element).
This section describes how to add a global resource. For procedures about configuring service-
specific resources, refer to Section 7.5.2, “Adding a Cluster Service to the Cluster”.
To add a global cluster resource, follow the steps in this section.
1. Open /etc/cl uster/cl uster.co nf at any node in the cluster.
2. Add a reso urces section within the rm element. For example:
<rm>
<resources>
</resources>
</rm>
3. 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 (i p) resource, and an Apache (apache) resource.
<rm>
<resources>
<fs name="web_fs" device="/dev/sdd2"
mountpoint="/var/www" fstype="ext3"/>
<ip address="127.143.131.100" monitor_link="yes"
sleeptime="10"/>
<apache config_file="conf/httpd.conf"
name="example_server" server_root="/etc/httpd" shutdown_wait="0"/>
</resources>
</rm>
Example 7.9, “ cl uster. co nf File with Resources Added ” shows an example of a
cl uster.co nf file with the reso urces section added.
4. Update the confi g _versio n attribute by incrementing its value (for example, changing
from co nfi g _versi o n= "2" to co nfi g _versio n= "3").
5. Save /etc/cl uster/cl uster.co nf.
6. (O pti o nal ) Validate the file against the cluster schema (cl uster.rng ) by running the
ccs_co nfi g _val i d ate command. For example:
[root@ example-01 ~]# ccs_co nfi g _val i d ate
Configuration validates
Fencin g Configurat ion Examples
119