9.3.2. Managing HA Services with clusvcadm You can manage HA services using the clusvcadm command. With it you can perform the following operations: Enable and start a service. Disable a service. Stop a service. Freeze a service Unfreeze a service Migrate a service (for virtual machine services only) Relocate a service. Restart a service. Restart failed non-critical resources in a resource group Table 9.2, "Service Operations" describes the operations in more detail. For a complete description on how to perform those operations, see the clusvcadm utility man page. Table 9.2. Service Operations 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 (see 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> Migrate Migrate a virtual machine to another node. You must specify a target node. Depending on the failure, a failure to migrate may result with the virtual machine in the failed state or in the started state on the original owner. clusvcadm -M <service_name> -m <member> Important For the migrate operation, you must specify a target node using the -m <member> option. Restart Restart a service on the node where it is currently running. clusvcadm -R <service_name> Convalesce Convalesce (repair, fix) a resource group. Whenever a non-critical subtree's maximum restart threshold is exceeded, the subtree is stopped, and the service gains a P flag (partial), which is displayed in the output of the clustat command to one of the cluster resource groups. The convalesce operation attempts to start failed, non-critical resources in a service group and clears the P flag if the failed, non-critical resources successfully start. clusvcadm -c <service_name> Considerations for Using the Freeze and Unfreeze Operations Using the freeze operation allows maintenance of parts of rgmanager services. For example, if you have a database and a web server in one rgmanager service, you may freeze the rgmanager service, stop the database, perform maintenance, restart the database, and unfreeze the service. When a service is frozen, it behaves as follows: Status checks are disabled. Start operations are disabled. Stop operations are disabled. Failover will not occur (even if you power off the service owner). Important Failure to follow these guidelines may result in resources being allocated on multiple hosts: You must not stop all instances of rgmanager when a service is frozen unless you plan to reboot the hosts prior to restarting rgmanager. You must not unfreeze a service until the reported owner of the service rejoins the cluster and restarts rgmanager.

Commands: