crsctl relocate resource

Use the crsctl relocate resource command to relocate resources to another server in the cluster.

Syntax

crsctl relocate resource {resource_name [-k cid] | {resource_name | -all}
-s source_server | -w "filter"} [-n destination_server] [-env "env1=val1,env2=val2,..."]
[-i] [-f]

Parameters

Table E-53 crsctl relocate resource Command Parameters

Parameter Description
resource_name [-k cid]

The name of a resource you want to relocate.

Optionally, you can also specify the resource cardinality ID. If you specify this parameter, then Oracle Clusterware relocates the resource instance that have the cardinality you specify.

resource_name | -all
-s source_server

Specify one particular or all resources located on a particular server from which you want to relocate those resources.

-w "filter"

Specify a resource filter that Oracle Clusterware uses to limit the number of resources relocated. The filter must be enclosed in double quotation marks (""). Examples of resource filters include:

  • "TYPE == cluster_resource": This filter limits Oracle Clusterware to relocate only resources of cluster_resource type

  • "CHECK_INTERVAL > 10": This filter limits Oracle Clusterware to relocate resources that have a value greater than 10 for the CHECK_INTERVAL resource attribute

  • "(CHECK_INTERVAL > 10) AND (NAME co 2)": This filter limits Oracle Clusterware to relocate resources that have a value greater than 10 for the CHECK_INTERVAL resource attribute and the name of the resource contains the number 2

See Also: "Filters" for more information

-n destination_server

Specify the name of the server to which you want relocate resources. If you do not specify a destination server, then Oracle Clusterware relocates the resources to the best server according to the attribute profile of each resource.

-env "env1=val1,
env2=val2,..."

You can optionally override one or more resource profile attribute values for this command. If you specify multiple environment name-value pairs, then you must separate each pair with a comma and enclose the entire list in double quotation marks ("").

-i

If you specify -i, then the command returns an error if processing this command requires waiting for Oracle Clusterware to unlock the resource or its dependents. Sometimes, Oracle Clusterware locks resources or other objects to prevent commands from interfering with each other.

-f

Specify the -f parameter to force the relocating of the resource when it has other resources running that depend on it. Dependent resources are relocated or stopped when you use this parameter.

Note: When you are relocating resources that have cardinality greater than 1, you must use either -k or -s to narrow down which resource instances are to be relocated.

Usage Notes

  • Any one of the three following options is required to specify which resources you want to relocate:

    • You can specify one particular resource to relocate.

    • Or you can specify one particular or all the resources to relocate from a particular source server.

    • Thirdly, you can specify a resource filter that Oracle Clusterware uses to match resources to relocate.

  • If a resource has a degree ID greater than 1, then Oracle Clusterware relocates all instances of the resource.

  • You must have read and execute permissions on the specified resources to relocate them

  • Do not use this command for any resources with names that begin with ora because these resources are Oracle resources.

Example

To relocate one particular resource from one server to another:

# crsctl relocate resource myResource1 -s node1 -n node3