Index Index for
Section 8
Index Alphabetical
listing for C
Bottom of page Bottom of
page

caa_relocate(8)

NAME

caa_relocate - Relocates an application resource from one cluster member to another

SYNOPSIS

/usr/sbin/caa_relocate resource_name [...] [-c cluster_member] [-f] [-q] /usr/sbin/caa_relocate resource_name [-c cluster_member] [-q] /usr/sbin/caa_relocate [USR_attribute_name=value] [...] resource_name [-c cluster_member] [-q] /usr/sbin/caa_relocate -s source_member [-c cluster_member] [-q]

PARAMETER

resource_name [...] Name(s) of one or more application resources as specified in a resource profile. If you do not specify any options, the caa_relocate command relocates each specified application resource according to its placement policy and required resource lists. A resource is not relocated if there are interdependent application resources unless the -f option is specified.

OPTIONS

-c cluster_member Relocates each indicated resource to the specified member regardless of its placement policy. If an application resource's required resources are not available on the destination member or the applicaton resource is restricted from that cluster member, the caa_relocate command fails and the resource remains on the current member. -s source_member Relocates all running application resources from the source_member. If you do not also specify the -c option, the caa_relocate command relocates each resource according to its placement policy and required resource lists. -f Forces relocation of the specified applications, all applications dependent on them and all applications that they are dependent upon. This option is necessary for relocating any application that requires another application or one that is required by any ONLINE application. -q Runs the caa_relocate command in quiet mode; no messages are displayed on the console.

DESCRIPTION

The caa_relocate command relocates application resources as directed by the specified options and the resource profile. The specified resource must be registered and running under CAA in the cluster environment before you can relocate it. The command displays a message if you specify a cluster member that is unavailable or the attempt to relocate failed. You must have root privilege to use this command. When you execute a caa_relocate command, CAA first runs the stop entry point of the action script on the member that it is currently running. CAA then executes the start entry point of the resource action script to start it on a new member. If CAA fails to stop the application resource on the current member due to an error in the action script, it marks it as "UNKNOWN." You cannot run caa_relocate on a resource in this state. You must explicitly execute a caa_stop -f command on the resource and restart it with caa_start to return it to the "ONLINE" state before you attempt to relocate it again. If CAA fails to restart an application resource, you may want to check the resource action script. If the action script start entry point fails to execute successfully, the stop entry point is run. If the stop entry point fails to execute successfully, the application resource state is marked as "UNKNOWN" and relocation attempts are aborted. If the stop entry point succeeds, the state is set to "OFFLINE". The target state remains "ONLINE" however, so subsequent cluster member failures or restarts may attempt to restart the application. If you have not specified one member to relocate to and there are available cluster members that satisfy the placement criteria, CAA will attempt to start the application on one of the available members. If one or more user-defined attributes have been defined for application resources, you can specify values for these attributes when relocating an application with caa_relocate. The specified value is passed to the action script as an environment variable with the attribute name, see caa(4). The actions that CAA takes while relocating an application resource are echoed on the command line and can also be monitored using EVM. See EVM(5) for more information. Standard error and standard output from a resource action script invoked by caa_relocate are redirected to the standard error and standard output for caa_relocate. Note that if the CAA daemon starts an application, standard error and standard output of the action script is lost. Within an action script, you can check for user invocation of the action script using reason codes. For more information on reason codes see caa(4).

EXAMPLES

The following example relocates an application resource to member polishham: /usr/sbin/caa_relocate clock -c polishham Attempting to stop `clock` on member `provolone` Stop of `clock` on member `polishham` succeeded Attempting to start `clock` on member `polishham` Start of `clock` on member `polishham` succeeded The following example attempts to relocate all application resources from member provolone to member polishham: /usr/sbin/caa_relocate -s provolone -c polishham Attempting to stop `clock` on member `provolone` Stop of `clock` on member `provolone` succeeded. Attempting to start `clock` on member `polishham` Start of `clock` on member `polishham` succeeded. Attempting to stop `calc` on member `provolone` Stop of `calc` on member `provolone` succeeded. Attempting to start `calc` on member `polishham` Start of `calc` on member `polishham` succeeded. If a user-defined attribute USR_DEBUG has been defined, see caa(4), the following example runs the stop and start entry point of the action script with the USR_DEBUG environment variable set to false, overriding any value set in the resource profile. In the corresponding action script, if you add the following line to the appropriate section of the action script you can view the value: echo $USR_DEBUG Then execute the command: # caa_relocate USR_DEBUG=false database false Attempting to stop `database` on member `provolone` Stop of `database` on member `provolone` succeeded. Attempting to start `database` on member `polishham` Start of `database` on member `polishham` succeeded. Attempting to stop `database` on member `provolone`

EXIT VALUES

The following exit values are returned: 0 Successful completion. non-zero A failure has occurred. A corresponding text message will be given for the following error conditions: No root privilege. Application is not running. Cluster member intended for relocation is not available. Relocation failed.

SEE ALSO

Commands: caa_profile(8), caa_register(8), caa_start(8), caa_stat(1), caa_stop(8), caa_unregister(8) Daemon: caad(8) File: caa(4) TruCluster Server Cluster Administration

Index Index for
Section 8
Index Alphabetical
listing for C
Top of page Top of
page