Installation guide
Note
Use a descriptive name that clearly distinguishes the service from other services in the
cluster.
When you add a service to the cluster configuration, you configure the following attributes:
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. The restart recovery policy indicates that the
system should attempt to restart the failed service before trying to relocate the service to
another node. The relocate policy indicates that the system should try to restart the service
in a different node. The disable policy indicates that the system should disable the
resource group if any component fails. The restart-disable policy indicates that the system
should attempt to restart the service in place if it fails, but if restarting the service fails the
service will be disabled instead of being moved to another host in the cluster.
If you select Rest art or Rest art - Disab le as the recovery policy for the service, you can
specify the maximum number of restart failures before relocating or disabling the service,
and you can specify the length of time in seconds after which to forget a restart.
For example, to add a service to the configuration file on the cluster node nod e-
0 1. example. co m named example_apache that uses the failover domain exampl e_pri ,
and that has recovery policy of rel o cate, execute the following command:
ccs -h node-01.example.com --addservice example_apache
domain=example_pri recovery=relocate
When configuring services for a cluster, you may find it useful to see a listing of available
services for your cluster and the options available for each service. For information on using
the ccs command to print a list of available services and their options, refer to Section 5.11,
“ Listing Available Cluster Services and Resources”.
2. Add resources to the service with the following command:
ccs -h host --addsubservice servicename subservice [service
options]
Depending on the type of resources you want to use, populate the service with global or
service-specific resources. To add a global resource, use the --ad d subservi ce option of
the ccs to add a resource. For example, to add the global file system resource named
web_fs to the service named example_apache on the cluster configuration file on no d e-
0 1. example. co m, execute the following command:
ccs -h node01.example.com --addsubservice example_apache fs
ref=web_fs
To add a service-specific resource to the service, you need to specify all of the service
Chapt er 5. Configuring Red Hat Hig h Availabilit y Add- O n Wit h t he ccs Command
91