Friday , 24 May 2019
Breaking News

Red Hat Cluster commands Cheat Sheet

Service Operation Description Command Syntax
Enable Start the service, optionally on a preferred target and optionally according to failover domain rules. In the absence of either a preferred target or failover domain rules, the local host where clusvcadm is run will start the service. If the original start fails, the service behaves as though a relocate operation was requested (refer to Relocate in this table). If the operation succeeds, the service is placed in the started state. clusvcadm -e <service_name> or clusvcadm -e <service_name> -m <member>(Using the -m option specifies the preferred target member on which to start the service.)
Disable Stop the service and place into the disabled state. This is the only permissible operation when a service is in the failed state. clusvcadm -d <service_name>
Relocate Move the service to another node. Optionally, you may specify a preferred node to receive the service, but the inability of the service to run on that host (for example, if the service fails to start or the host is offline) does not prevent relocation, and another node is chosen. rgmanager attempts to start the service on every permissible node in the cluster. If no permissible target node in the cluster successfully starts the service, the relocation fails and the service is attempted to be restarted on the original owner. If the original owner cannot restart the service, the service is placed in the stopped state. clusvcadm -r <service_name> or clusvcadm -r <service_name> -m <member> (Using the -m option specifies the preferred target member on which to start the service.)
Stop Stop the service and place into the stopped state. clusvcadm -s <service_name>
Freeze Freeze a service on the node where it is currently running. This prevents status checks of the service as well as failover in the event the node fails or rgmanager is stopped. This can be used to suspend a service to allow maintenance of underlying resources. Refer to the section called “Considerations for Using the Freeze and Unfreeze Operations” for important information about using the freeze and unfreeze operations. clusvcadm -Z <service_name>
Unfreeze Unfreeze takes a service out of the freeze state. This re-enables status checks. Refer to the section called “Considerations for Using the Freeze and Unfreeze Operations” for important information about using the freeze and unfreeze operations. clusvcadm -U <service_name>
Restart Restart a service on the node where it is currently running. clusvcadm -R <service_name>

Note – How do you have cluster services start based on their failover domain rules?

Issue:-

When starting a service with clusvcadm command the service will start on the node that I am running command on and not obey the failover domain rules of the service.

When starting a service with luci web interface the service will not obey the failover domain rules of the service.

Environment:- Red Hat Enterprise Linux 5.1+ Advanced Platform (Clustering)
Red Hat Enterprise Linux Server 6 (with the High Availability Add on)

Resolution

To manually start a service and have it start on a cluster node based on failover domain rules then use the following command below. By default clusvcadm does not start clustered services on a particular node based on failover domain rules. The command includes the -F option which will cause the service to start on a cluster node based on the failover domain rules:

$ clusvcadm -Fe <service name>

Leave a Reply