Skip Headers
Oracle® Clusterware Administration and Deployment Guide
11g Release 2 (11.2)

Part Number E10717-04
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

E CRSCTL Utility Reference

This appendix describes how to administer Oracle Clusterware using the Oracle Clusterware Control (CRSCTL) utility.

Note:

Do not use CRSCTL commands on Oracle entities (such as resources, resource types, and server pools) that have names beginning with ora unless you are directed to do so by Oracle Support. The Server Control utility (SRVCTL) is the correct utility to use on Oracle entities.

This appendix includes the following topics:


CRSCTL Overview

CRSCTL is an interface between you and Oracle Clusterware, parsing and calling Oracle Clusterware APIs for Oracle Clusterware objects.

Oracle Clusterware 11g release 2 (11.2) introduces cluster-aware commands with which you can perform check, start, and stop operations on the cluster. You can run these commands from any node in the cluster on another node in the cluster, or on all nodes in the cluster, depending on the operation.

You can use CRSCTL commands to perform several operations on Oracle Clusterware, such as:


Clusterized (Cluster Aware) Commands

You can run clusterized commands on one node to perform operations on another node in the cluster. These are referred to as remote operations. This simplifies administration because, for example, you no longer have to log in to each node to check the status of the Oracle Clusterware on all of your nodes.

Clusterized commands are completely operating system independent; they rely on the OHASD (Oracle High Availability Service Daemon). If this daemon is running, then you can perform remote operations, such as the starting, stopping, and checking the status of remote nodes.

Clusterized commands include the following:


Operational Notes

Usage Information

Using CRSCTL Help

To print the help information for CRSCTL, use the following command:

crsctl -help

If you want help for a specific command, such as start, then enter the command and append -help to the end, as shown in the following example:

crsctl start -help

You can also use the abbreviations -h or -? (this option functions in Linux, UNIX, and Windows environments) instead of -help.


Deprecated Subprograms or Commands

The following commands are deprecated in Oracle Clusterware 11g release 2 (11.2):


CRSCTL Command Reference

This section is separated into three categories of CRSCTL commands:


Dual Environment CRSCTL Commands

You can use the following commands in either the Oracle RAC or the Oracle Restart environments:

crsctl add resource

Use the crsctl add resource command to register a resource to be managed by Oracle Clusterware. A resource could be an application process, a database, a service, a listener, and so on.

Syntax

crsctl add resource resource_name -type resource_type [-file file_path |
-attr "attribute_name=attribute_value,attribute_name=attribute_value,..."]
[-i] [-f]

Parameters

Table E-1 crsctl add resource Command Parameters

Parameter Description
resource_name

A short, descriptive name for the resource.

-type resource_type

The type of resource that you are adding preceded by the -type flag.

-file file_path

Path name (either absolute or relative) for a text file containing line-separated attribute name-value pairs that define the resource.

-attr "attribute_name=
attribute_value

You can specify attributes for a resource you are adding in two different ways:

  • Following the -attr flag, you can specify one or more comma-delimited attribute name-value pairs enclosed in double quotations marks (""). For example:

    -attr "CHECK_INTERVAL=30,START_TIMEOUT=25"
    
  • Additionally, you can specify attribute values for resource instances with a particular cardinality value, and with a particular degree value. This method can be useful for applications that are tied to a particular server. Following the -attr flag, the syntax is as follows:

    attribute_name{@SERVERNAME(server_name)
    [@DEGREEID(did)] | @CARDINALITYID(cid)
    [@DEGREEID(did)]}=attribute_value
    

    If you specify the @SERVERNAME(server_name) syntax, then the attribute value you specify for the attribute you specify is limited to resource instances residing on the server you specify.

    Alternatively, if you specify the @CARDINALITYID(cid) syntax, then the attribute value you specify for the attribute you specify is limited to resource instances with a specific cardinality ID (cid).

    Optionally, you can combine the @DEGREEID(did) syntax with either the SERVERNAME or CARDINALITYID syntax, or both, to limit the attribute value to resources with the specific DEGREE.

    Examples:

    CHECK_INTERVAL@SERVERNAME(node1)=45
    STOP_TIMEOUT@CARDINALITYID(2)=65
    STOP_TIMEOUT@SERVERNAME(node1)@DEGREEID(2)=65
    STOP_TIMEOUT@CARDINALITYID(3)@DEGREEID(2)=65
    
-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

Use the force option:

  • To add a resource that has dependencies on other resources that do not yet exist. The force option overrides checks that would prevent a command from being completed.

  • To add a resource if the resource has hard dependencies on other resources and the owner of the resources does not execute permissions on one or more of the dependencies. If you do not specify the force option in this case, an error displays.

  • To add resources of application type because you may need to move servers into the GENERIC server pool. If the servers currently host resources that must be stopped, then the force option is required


See Also:

Appendix B, "Oracle Clusterware Resource Reference" for more information about resources and resource attributes

Usage Notes

Example

Example 1

To register a VIP as a resource with Oracle Clusterware:

$ crsctl add resource app.appvip -type app.appvip.type \
-attr "RESTART_ATTEMPTS=2,\
START_TIMEOUT=100,STOP_TIMEOUT=100,CHECK_INTERVAL=10,\
USR_ORA_VIP=172.16.0.0,\
START_DEPENDENCIES=hard(ora.net1.network)pullup(ora.net1.network),\
STOP_DEPENDENCIES=hard(ora.net1.network)"

Example 2

To register a resources based on the test_type1 resource type:

$ crsctl add resource r1 -type test_type1 -attr "PATH_NAME=/tmp/r1.txt"
$ crsctl add resource r1 -type test_type1 -attr "PATH_NAME=/tmp/r2.txt"

crsctl add type

Use the crsctl add type command to create a resource type in Oracle Clusterware.

Syntax

crsctl add type type_name -basetype base_type_name {-file file_path | 
 -attr "ATTRIBUTE=attribute_name,TYPE={string | int}
 [,DEFAULT_VALUE=default_value][,FLAGS=[READONLY][|REQUIRED]]” 
 [-attr ...]}

Parameters

Table E-2 crsctl add type Command Parameters

Parameter Description
type_name

A name for the resource type in the form of xxx.yyy.type. Resource type names must be unique and cannot be changed after the resource type is registered.

-basetype base_type_name

The name of an existing base type. Any resource type that you create must either have local_resource or cluster_resource as its base resource type.

-file file_path

Path name (either absolute or relative) for a text file containing line-separated attribute name-value pairs that define the resource type.

-attr

You can specify the resource type attributes using the -attr argument. Enter a comma-delimited description of a resource type attribute enclosed in double quotation marks (""). The descriptors for an attribute include:

  • ATTRIBUTE: Specify a name for the attribute. The name is case-sensitive and cannot contain spaces.

  • TYPE: Specify whether the attribute type is integer or string.

  • DEFAULT_VALUE: (Optional) If the attribute is required, then a default value is not required. For attributes that are not required, you must specify a default value that Oracle Clusterware uses when you create resources based on this resource type.

  • FLAGS: (Optional) Specify whether the attribute is READONLY or REQUIRED. READONLY means that after you register a resource with this resource type, you cannot modify this attribute.

    REQUIRED means that you must specify the name and value of this attribute when you create a resource that is based on this resource type. If you specify that this attribute is not required, then Oracle Clusterware uses the default value of this attribute that you specify.

You can use multiple -attr arguments to define multiple arguments for the resource type.


See Also:

"Resource Type" for more information about resource types

Usage Notes

Example

To create a resource type for demoActionScript:

# crsctl add type test_type1 -basetype cluster_resource \
 -attr "ATTRIBUTE=PATH_NAME,TYPE=string,DEFAULT_VALUE=default.txt"\
 -attr "ATTRIBUTE=ACTION_SCRIPT,TYPE=string,DEFAULT_VALUE=/u01/grid/crs/demo
/demoActionScript"

crsctl check css

Use the crsctl check css command to check the status of Cluster Synchronization Services. This command is most often used when Oracle Automatic Storage Management (Oracle ASM) is installed on the local server.

Syntax

crsctl check css

Usage Notes

Example

The crsctl check css command returns output similar to the following:

CRS-4529: Cluster Synchronization Services is online

crsctl delete resource

Use the crsctl delete resource command to remove resources from the Oracle Clusterware configuration.

Syntax

crsctl delete resource resource_name [-i] [-f]

Parameters

Table E-3 crsctl delete resource Command Parameters

Parameter Description
resource_name

Specify the name of the resource you want to remove.

-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

Use the force option to remove either running resources, or remove this resource even though other resources have a hard dependency on it.


Usage Notes

Example

To delete a resource from Oracle Clusterware:

# crsctl delete resource myResource

crsctl delete type

Use the crsctl delete type command to remove a resource type from the Oracle Clusterware configuration.

Syntax

crsctl delete type type_name [-i]

Usage Notes

Example

To delete a resource type, run the following command as who has write permissions on the resource type:

$ crsctl delete type app.appvip.type

crsctl get hostname

Use the crsctl get hostname command to retrieve the host name of the local server.

Syntax

crsctl get hostname

Example

Oracle Clusterware returns the host name of the local server:

$ crsctl get hostname
node2

crsctl getperm resource

Use the crsctl getperm resource command to display the user and group permissions for the specified resource.

Syntax

crsctl getperm resource resource_name [ {-u user_name | -g group_name} ]

See Also:

Appendix B, "Oracle Clusterware Resource Reference" for more information about resources and resource attributes

Parameters

Table E-4 crsctl getperm resource Command Parameters

Parameter Description
resource_name

Specify the name of the resource for which you want to obtain permissions.

-u user_name

If you specify -u, then Oracle Clusterware obtains permissions for a particular user.

-g group_name

If you specify -g, then Oracle Clusterware obtains permissions for a particular group.


Usage Notes

Example

The crsctl getperm resource command returns output similar to the following, depending on the command option you choose:

$ crsctl getperm resource app.appvip

Name: app.appvip
owner:root:rwx,pgrp:oinstall:rwx,other::r--
$ crsctl getperm resource app.appvip -u oracle

Name: app.appvip
rwx
$ crsctl getperm resource app.appvip -g dba

Name: app.appvip
r--

crsctl getperm type

Use the crsctl getperm type command to obtain permissions for a particular resource type.

Syntax

crsctl getperm type resource_type  [-u user_name] | [-g group_name]

See Also:

"Resource Type" for more information about resource types

Parameters

Table E-5 crsctl getperm type Command Parameters

Parameter Description
resource_type

Specify the resource type for which you want to obtain permissions.

-u user_name

If you specify -u, then Oracle Clusterware obtains permissions for a particular user.

-g group_name

If you specify -g, then Oracle Clusterware obtains permissions for a particular group.


Usage Notes

Example

The crsctl getperm type command returns output similar to the following:

$ crsctl getperm type app.appvip.type

Name: app.appvip.type
owner:root:rwx,pgrp:oinstall:rwx,other::r--

crsctl modify resource

Use the crsctl modify resource command to modify the attributes of a particular resource in Oracle Clusterware.

Syntax

crsctl modify resource resource_name -attr "attribute_name=attribute_value"
[-i] [-f] [-delete]

Parameters

Table E-6 crsctl modify resource Command Parameters

Parameter Description
resource_name

The name of the resource you want to modify.

-attr "attribute_name=
attribute_value"

You can specify attributes for a resource you want to modify in two different ways:

  • Following the -attr flag, you can specify one or more comma-delimited attribute name-value pairs to modify enclosed in double quotations marks (""). For example:

    -attr "CHECK_INTERVAL=30, START_TIMEOUT=25"
    
  • Alternatively, you can specify attribute values for resources on a particular server, with a particular cardinality value, and with a particular degree value. This method can be useful for applications that are somehow tied to a particular server. Following the -attr flag, the syntax is as follows:

    attribute_name{@SERVERNAME(server_name)
    [@DEGREEID(did)] | @CARDINALITYID(cid)
    [@DEGREEID(did)]}=attribute_value
    

    If you specify the @SERVERNAME(server_name) syntax, then the attribute value you specify for the attribute you specify is limited to resources residing on the server you specify.

    Alternatively, if you specify the @CARDINALITYID(cid) syntax, then the attribute value you specify for the attribute you specify is limited to resource instances with a specific cardinality ID (cid).

    Optionally, you can combine the @DEGREEID(did) syntax with either the SERVERNAME or CARDINALITYID syntax, or both, to limit the attribute value to resources with the specific DEGREE.

    Examples:

    CHECK_INTERVAL@SERVERNAME(node1)=45
    STOP_TIMEOUT@CARDINALITYID(2)=65
    STOP_TIMEOUT@SERVERNAME(node1)@DEGREEID(2)=65
    STOP_TIMEOUT@CARDINALITYID(3)@DEGREEID(2)=65
    
-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

Use the -f option when:

  • The resource has a hard dependency on a non-existing resource

  • The owner of the resource does not have execute permissions on one or more hard dependencies

  • The modification results in servers being moved into the Generic pool and resources being stopped or relocated to accomplish the server move

-delete

If you specify the -delete option, then Oracle Clusterware deletes the named attribute.


See Also:

Appendix B, "Oracle Clusterware Resource Reference" for more information about resources and resource attributes

Usage Notes

Example

To modify the attributes of the appsvip resource:

$ crsctl modify resource appsvip -attr USR_ORA_VIP=10.1.220.17 -i

crsctl modify type

Use the crsctl modify type command to modify an existing resource type.

Syntax

crsctl modify type type_name -attr "ATTRIBUTE=attribute_name,
TYPE={string | int} [,DEFAULT_VALUE=default_value]
[,FLAGS=[READONLY][| REQUIRED]]" [-i] [-f]

Parameters

Table E-7 crsctl modify type Command Parameters

Parameter Description
type_name

Specify the name of the resource type you want to modify. You cannot modify resource type names.

-attr

You can modify the following resource type attributes:

  • ATTRIBUTE

  • TYPE

  • DEFAULT_VALUE

  • FLAGS

See Also: Table E-2, "crsctl add type Command Parameters" for descriptions of these attributes

-i

If you specify the -i option, then the command fails if Oracle Clusterware cannot process the request immediately.


See Also:

"Resource Type" for more information about resource types

Usage Notes

Example

To modify an existing resource type:

$ crsctl modify type myType.type -attr "ATTRIBUTE=myAttrName,TYPE='string',
DEFAULT_VALUE='myDefault'"

crsctl setperm resource

Use the crsctl setperm resource command to set permissions for a particular resource.

Syntax

crsctl setperm resource resource_name {-u acl_string | -x acl_string |
-o user_name | -g group_name}

Parameters

Table E-8 crsctl setperm resource Command Parameters

Parameter Description
resource_name

Specify the name of the resource for which you want to set permissions.

{-u | -x | -o | -g}

You can set only one of the following permissions for a resource:

  • -u acl_string: You can update the access control list (ACL) for a resource

  • -x acl_string: You can delete the ACL for a resource

  • -o user_name: You can change the owner of a resource by entering a user name

  • -g group_name: You can change the primary group of a resource by entering a group name

Specify a user, group, or other ACL string, as follows:

user:user_name[:readPermwritePermexecPerm] |
group:group_name[:readPermwritePermexecPerm] |
other[::readPermwritePermexecPerm]
  • user: User ACL

  • group: Group ACL

  • other: Other ACL

  • readPerm: Read permission for the resource; the letter r grants a user, group, or other read permission, the minus sign (-) denies read permission

  • writePerm: Write permission for the resource; the letter w grants a user, group, or other write permission, the minus sign (-) denies write permission

  • execPerm: Execute permission for the resource; the letter x grants a user, group, or other execute permission, the minus sign (-) denies execute permission


See Also:

Appendix B, "Oracle Clusterware Resource Reference" for more information about resources and resource attributes

Usage Notes

Example

To grant read, write, and execute permissions on a resource for user Scott:

$ crsctl setperm resource myResource -u user:scott:rwx

crsctl setperm type

Use the crsctl setperm type command to set permissions resources of a particular resource type.

Syntax

crsctl setperm type resource_type_name {-u acl_string | -x acl_string |
-o user_name | -g group_name}

Parameters

Table E-9 crsctl setperm type Command Parameters

Parameter Description
resource_type_name

Specify the name of the resource type for which you want to set permissions.

{-u | -x | -o | -g}

You can specify only one of the following parameters for a resource type:

  • -u acl_string: You can update the access control list (ACL) for a resource type

  • -x acl_string: You can delete the ACL for a resource type

  • -o user_name: You can change the owner of a resource type by entering a user name

  • -g group_name: You can change the primary group of a resource type by entering a group name

Specify a user, group, or other ACL string, as follows:

user:user_name[:readPermwritePermexecPerm] |
group:group_name[:readPermwritePermexecPerm] |
other[::readPermwritePermexecPerm]
  • user: User ACL

  • group: Group ACL

  • other: Other ACL

  • readPerm: Read permission for the resource type; the letter r grants a user, group, or other read permission, the minus sign (-) denies read permission

  • writePerm: Write permission for the resource type; the letter w grants a user, group, or other write permission, the minus sign (-) denies write permission

  • execPerm: Execute permission for the resource type; the letter x grants a user, group, or other execute permission, the minus sign (-) denies execute permission


Usage Notes

Example

To grant read, write, and execute permissions on a resource type for user Scott:

$ crsctl setperm type resType -u user:scott:rwx

crsctl start resource

Use the crsctl start resource command to start many idle resources on a particular server in the cluster.

Syntax

crsctl start resource {resource_name [...] | -w filter | -all} [-n server_name]
[-k cid] [-d did] [-env "env1=val1,env2=val2,..."] [-i] [-f]

Parameters

Table E-10 crsctl start resource Command Parameters

Parameter Description
resource_name [...]

One or more space-delimited resource names to start.

-w filter

Specify a resource filter that Oracle Clusterware uses to match resources.

-all

Use this option to start all resources in the cluster.

-n server_name

Specify the name of the server on which the resources you want to start reside. If you do not specify a server, then Oracle Clusterware starts the resources on the best server according to the attribute profile of each resource.

-k cid

Specify the resource cardinality ID. If you specify this parameter, then Oracle Clusterware starts the resource instances that have the cardinality you specify.

-d did

Specify the resource degree ID. If you specify this parameter and the degree ID is greater than 1, then Oracle Clusterware starts all resource instances that meet this criteria.

Note: You cannot use the -d option without specifying the -k option.

-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

Use the -f option to relocate a resource running on another server on which the resource you want to start has a hard start dependency. If you do not specify the force option in this case, then the start command fails.


Usage Notes

Example

To start a resource:

# crsctl start resource myResource -n server1

crsctl status resource

Use the crsctl status resource command to obtain the status and configuration information of many particular resources.

Syntax

crsctl status resource {resource_name [...] | -w "filter"}  [-p | -v [-e]] |
[-f | -l | -g] [[-k cid | -n server_name] [-d did]] | [-s -k cid [-d did]] [-t]

Parameters

Table E-11 crsctl status resource Command Parameters

Parameter Description
resource_name [...] |
-w "filter"

One or more space-delimited resource names of which you want to check the status.

Or you can specify a resource filter that Oracle Clusterware uses to limit the number of resources displayed. The filter must be enclosed in double quotation marks (""). Values that contain parentheses or spaces must be enclosed in single quotation marks (''). Operators must be surrounded by spaces. Examples of resource filters include:

  • "TYPE == cluster_resource": This filter limits the display to only resources of cluster_resource type.

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

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

  • "START_DEPENDENCIES = 'hard(appsvip)'": This filter limits the display to resources that have a hard start dependency on the appsvip resource.

See Also: "Filters" for more information about filters

[-p | -v [-e]] | [-f | -l | -g]

You can specify one of two options: [-p | -v [-e]] or [-f | -l | -g], where:

  • Specify the -p parameter to display the static configuration of the resource or specify the -v parameter to display the runtime configuration of the resource. Use the -e parameter with the -v parameter to evaluate the special values of the resource instance.

  • Specify the -f parameter to display the full configuration of the resource; or specify the -l parameter to display all cardinal and degree values of the resource; or specify the -g parameter to check whether the specified resources are registered

[-k cid | 
-n server_name] [-d did |
[-s -k cid [-d did]]]

You can specify one of two options: [-k cid | -n server_name] or [-s -k cid [-d did]], where:

  • Specify the -k cid parameter to specify a cardinality ID of the resources you want to query. Or you can specify the -n parameter to specify a particular server on which to check resources. Optionally, you can specify the -d parameter with the -n parameter to specify the degree ID of resources you want to check. If you specify a degree ID greater than 1, then Oracle Clusterware checks all resource instances on the server that meet this criteria.

  • Specify the -s parameter with the -k parameter to obtain a list of target servers for relocation. You can further limit the output by specifying a degree ID with the -d parameter.

-t

Specify the -t parameter to display the output in tabular form.


Usage Notes

Example

The crsctl status resource command returns output similar to the following:

$ crsctl status resource ora.staii14.vip

NAME=ora.staii14.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=ONLINE on staii14

crsctl status type

Use the crsctl status type command to obtain the configuration information of one or more particular resource types.

Syntax

crsctl status type resource_type_name [...]] [-g] [-p] [-f]

Parameters

Table E-12 crsctl status type Command Parameters

Parameter Description
[resource_type_name [...]

Specify one or more space-delimited resource type names of which you want to check the status.

-g] [-p] [-f

You can specify the following parameters as options when Oracle Clusterware checks the status of specific server pools:

  • -g: Use this parameter to check if the specified resource types are registered

  • -p: Use this parameter to display static configuration of the specified resource types

  • -f: Use this parameter to display the full configuration of the resource types


Usage Notes

Example

The crsctl status type command returns output similar to the following:

$ crsctl status type ora.network.type

TYPE_NAME=ora.network.type
BASE_TYPE=ora.local_resource.type

crsctl stop resource

Use the crsctl stop resource command to stop running resources.

Syntax

crsctl stop resource {resource_name [...] | -w "filter" | -all} [-n server_name]
[-k cid] [-d did] [-env "env1=val1,env2=val2,..."] [-i] [-f]

Parameters

Table E-13 crsctl stop resource Command Parameters

Parameter Description
resource_name [...]

One or more space-delimited resource names to stop.

-w "filter"

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

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

  • "CHECK_INTERVAL > 10": This filter limits Oracle Clusterware to stop 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 stop resources that have a value greater than 10 for the CHECK_INTERVAL resource attribute and the name of the resource contains the number 2

-all

Use this option to stop all resources in the cluster.

-n server_name

Specify the name of the server on which the resource instances you want to stop reside. If you do not specify a server, then Oracle Clusterware stops all instances of the resource.

-k cid

Specify the resource cardinality ID. If you specify this parameter, then Oracle Clusterware stops the resource instances that have the cardinality you specify.

-d did

Specify the resource degree ID. If you specify this parameter and the degree ID is greater than 1, then Oracle Clusterware stops all resource instances that meet this criteria.

-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 option to force the stopping of the resource when it has other resources running that depend on it. Dependent resources are relocated or stopped when you use this option.


Usage Notes

Example

To stop a resource:

$ crsctl stop resource -n node1 -k 2

Oracle RAC Environment CRSCTL Commands

The commands listed in this section manage the Oracle Clusterware stack in an Oracle RAC environment, which consists of the following:

You can use the following commands only in an Oracle RAC environment:

crsctl add crs administrator

Use the crsctl add crs administrator command to add a user to the list of cluster administrators.

Syntax

crsctl add crs administrator -u user_name [-f]

Parameters

Table E-14 crsctl add crs administrator Command Parameters

Parameter Description
-u user_name

The name of the user to whom you want to give Oracle Clusterware administrative privileges.

-f

Use this option to override the user name validity check.


Usage Notes

Example

To add a user to the list of Oracle Clusterware administrators:

# crsctl add crs administrator -u scott

crsctl add css votedisk

Use the crsctl add css votedisk command to add one or more voting disks to the cluster on storage devices or to ASM diskgroup with redundancy normal or high.

Note:

if disk group redundancy is set to external, then you can only create one voting disk in the ASM disk group. If you try to add multiple voting disks, then Oracle returns an error.

Use the crsctl add css votedisk command to add one or more voting disks to the cluster on storage devices or to an Oracle ASM disk group with normal or high redundancy.

Syntax

crsctl add css votedisk path_to_voting_disk [path_to_voting_disk ...] [-purge]

Parameters

Table E-15 crsctl add css votedisk Command Parameters

Parameter Description
path_to_voting_disk

A fully qualified path to the voting disk you want to add. To add multiple voting disks, separate each path with a space.

-purge

Removes all existing voting disks at once. You can replace the existing set of voting files in one operation.


Usage Notes

See Also:

"Adding, Deleting, or Migrating Voting Disks" for more information

Example

To add a voting disk to the cluster:

$ crsctl add css votedisk /stor/grid/ -purge

crsctl add serverpool

Use the crsctl add serverpool command to add a server pool to Oracle Clusterware.

Syntax

crsctl add serverpool server_pool_name {-file file_path | 
                  -attr "attr_name=attr_value[,attr_name=attr_value[,...]]"}
                  [-i] [-f]

Parameters

Table E-16 crsctl add serverpool Command Parameters

Parameter Description
server_pool_name

A short, descriptive name for the server pool.

-file file_path

Fully-qualified path to an attribute file to define the server pool.

attribute_name

The name of a server pool attribute Oracle Clusterware uses to manage the server pool preceded by the -attr flag. The available attribute names include:

  • IMPORTANCE

  • MIN_SIZE

  • MAX_SIZE

  • SERVER_NAMES

  • PARENT_POOLS

  • EXCLUSIVE_POOLS

  • ACL

  • ACTIVE_SERVERS

attribute_value

A value for the server pool attribute.

Note: The attribute_name and attribute_value parameters must be enclosed in double quotation marks ("") and separated by commas. For example:

-attr "MAX_SIZE=30, IMPORTANCE=3"
-i

If you specify -i, then the command fails if Oracle Clusterware cannot process the request immediately.

-f

If you specify the -f option, then Oracle Clusterware stops resources running on a server in another server pool and relocates that server into the server pool you are adding. If you do not specify the -f option, then Oracle Clusterware checks whether the creation of the server pool results in stopping any resources on a server in another server pool that is going to give up a server to the server pool you are adding. If so, then Oracle Clusterware rejects the crsctl add serverpool command.


See Also:

"Understanding Server Pools" for more information about server pools and server pool attributes

Usage Notes

Example

Example 1

To add a server pool named testsp with a maximum size of 5 servers, run the following command as root or the Oracle Clusterware installation owner:

# crsctl add serverpool testsp -attr "MAX_SIZE=5"

Example 2

Create the sp1_attr file with the attribute values for the sp1 serverpool, each on its own line, as shown in the following example:

IMPORTANCE=1
MIN_SIZE=1
MAX_SIZE=2
SERVER_NAMES=node3 node4 node5
PARENT_POOLS=Generic
EXCLUSIVE_POOLS=testsp
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--

Use the following command to create the sp1 server pool using the sp1_attr file as input:

$ crsctl add serverpool sp1 -file /tmp/sp1_attr

crsctl check cluster

Use the crsctl check cluster command on any node in the cluster to check the status of the Oracle Clusterware stack.

Syntax

crsctl check cluster [-all | [-n server_name [...]]

Usage Notes

Example

The crsctl check cluster command returns output similar to the following:

$ crsctl check cluster -all
*****************************************************************
node1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
*****************************************************************
node2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
*****************************************************************

crsctl check crs

Use the crsctl check crs command to check the status of Oracle High Availability Services and the Oracle Clusterware stack on the local server.

Syntax

crsctl check crs

Example

To check the health of Oracle Clusterware on the local server:

$ crsctl check crs
CRS-4638: Oracle High Availablity Services is online
CRS-4537: Cluster Ready Services is onlin
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

crsctl check resource

Use the crsctl check resource command to initiate the check action inside the application-specific agent of a particular resource. Oracle Clusterware only provides output if something prevents the system from issuing the check request, such as a bad resource name.

Syntax

crsctl check resource {resource_name [...] | -w "filter" }
      [-n node_name] [-k cardinality_id] [-d degree_id] }

Parameters

Table E-17 crsctl check resource Command Parameters

Parameter Description
resource_name

Specify a particular resource. You can check multiple resources by entering multiple resource names, with each name separated by a space.

-w "filter"

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

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

  • "CHECK_INTERVAL > 10": This filter limits Oracle Clusterware to check 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 check resources that have a value greater than 10 for the CHECK_INTERVAL resource attribute and the name of the resource contains the number 2

-n node_name

Check the resource instance on a specific node. If you do not specify the -n option, then Oracle Clusterware checks the resource instances only on the local server.

-k cardinality_id

Specify the resource cardinality ID.

-d degree_id

Specify the resource degree ID.


Usage Notes

Example

To initiate the check action inside the application-specific agent of a particular resource:

$ crsctl check resource appsvip

crsctl check ctss

Use the crsctl check ctss command to check the status of the Cluster Time Synchronization services.

Syntax

crsctl check ctss

Example

The crsctl check ctss command returns output similar to the following:

CRS-4700: The Cluster Time Synchronization Service is in Observer mode.

or

CRS-4701: The Cluster Time Synchronization Service is in Active mode.
CRS-4702: Offset from the reference node (in msec): 100

crsctl config crs

Use the crsctl config crs command to display Oracle High Availability Services automatic startup configuration.

Syntax

crsctl config crs

Example

The crsctl config crs command returns output similar to the following:

CRS-4622: Oracle High Availability Services autostart is enabled.

crsctl delete crs administrator

Use the crsctl delete crs administrator command to remove a user from the Oracle Clusterware administrator list.

Syntax

crsctl delete crs administrator -u user_name [-f]

Parameters

Table E-18 crsctl delete crs administrator Command Parameters

Parameter Description
-u user_name

The name of the user whose Oracle Clusterware administrative privileges you want to remove.

By default, the list of users with Oracle Clusterware administrative privileges consists of the user who installed Oracle Clusterware, root, and *. The user who installed Oracle Clusterware and root are permanent members this list. The * value gives Oracle Clusterware administrative privileges to all users and must be removed to enable role-separated management.

See Also: "Role-separated Management" for more information

-f

Use this option to override the user name validity check.


Usage Notes

Example

To remove a user from the list of cluster administrators:

# crsctl delete crs administrator -u scott

crsctl delete css votedisk

Use the crsctl delete css votedisk to remove a voting disk from the Oracle Clusterware configuration.

Syntax

crsctl delete css votedisk voting_disk_GUID [voting_disk_GUID [...]]

Parameters

Table E-19 crsctl delete css votedisk Command Parameters

Parameter Description
voting_disk_GUID

Enter the file universal identifier (GUID) of the voting disk you want to remove. Specify multiple GUIDs in a space-delimited list.


Usage Notes

Example

To remove a voting disk:

$ crsctl delete css votedisk 26f7271ca8b34fd0bfcdc2031805581e

crsctl delete node

Use the crsctl delete node to remove a node from the cluster.

Syntax

crsctl delete node -n node_name

Usage Notes

Example

To delete the node named node06 from the cluster, run the following command as root or the Oracle Clusterware installation owner:

# crsctl delete node -n node06

crsctl delete serverpool

Use the crsctl delete serverpool command to remove a server pool from the Oracle Clusterware configuration.

Syntax

crsctl delete serverpool server_pool_name [server_pool_name [...]] [-i]

See Also:

"Understanding Server Pools" for more information about server pools and server pool attributes

Usage Notes

Example

To delete a server pool, run the following command as root or the Oracle Clusterware installation owner:

# crsctl delete serverpool sp1

crsctl disable crs

Use the crsctl disable crs command to prevent the automatic startup of Oracle High Availability Services when the server boots.

Syntax

crsctl disable crs

Usage Notes

Example

The crsctl disable crs command returns output similar to the following:

CRS-4621: Oracle High Availability Services autostart is disabled.

crsctl enable crs

Use the crsctl enable crs command to enable automatic startup of Oracle High Availability Services when the server boots.

Syntax

crsctl enable crs

Usage Notes

Example

The crsctl enable crs command returns output similar to the following:

CRS-4622: Oracle High Availability Services autostart is enabled.

crsctl get css

Use the crsctl get css command to obtain the value of a specific Cluster Synchronization Services parameter.

Syntax

crsctl get css parameter

Usage Notes

Example

To display the value of the disktimeout parameter for CSS, use the following command:

$ crsctl get css disktimeout
200

crsctl get css ipmiaddr

Use the crsctl get css ipmiaddr command to get the address of the local Intelligent Platform Management Interface (IPMI) device, or the Baseboard Management Controller (BMC), as specified in the Oracle Cluster Registry.

Syntax

crsctl get css ipmiaddr

Usage Notes

Example

To obtain the IPMI device IP address:

$ crsctl get css ipmiaddr

crsctl get nodename

Use the crsctl get nodename command to obtain the name of the local node.

Syntax

crsctl get nodename

Example

The crsctl get nodename command returns output similar to the following:

node2

crsctl getperm serverpool

Use the crsctl getperm serverpool command to obtain permissions for a particular server pool.

Syntax

crsctl getperm serverpool server_pool_name  [-u user_name | -g group_name]

See Also:

"Understanding Server Pools" for more information about server pools and server pool attributes

Parameters

Table E-20 crsctl getperm serverpool Command Parameters

Parameter Description
server_pool_name

Specify the name of the server pool for which you want to obtain permissions.

-u user_name

If you specify -u, then Oracle Clusterware obtains permissions for a particular user.

-g group_name

If you specify -g, then Oracle Clusterware obtains permissions for a particular group.


Usage Notes

Example

The crsctl getperm serverpool command returns output similar to the following:

$ crsctl getperm serverpool sp1
NAME: sp1
owner:root:rwx,pgrp:root:r-x,other::r--

crsctl lsmodules

Use the crsctl lsmodules command to list the components of the modules that you can debug.

See Also:

"Dynamic Debugging" for more information about debugging

Syntax

crsctl lsmodules { crs | css | evm }

Usage Notes

Example

The crsctl lsmodules command returns output similar to the following:

$ crsctl lsmodules evm
List EVMD Debug Module: CLSVER
List EVMD Debug Module: CLUCLS
List EVMD Debug Module: COMMCRS
List EVMD Debug Module: COMMNS
List EVMD Debug Module: CRSOCR
List EVMD Debug Module: CSSCLNT
List EVMD Debug Module: EVMAGENT
List EVMD Debug Module: EVMAPP
...

crsctl modify serverpool

Use the crsctl modify serverpool command to modify an existing server pool.

Syntax

crsctl modify serverpool server_pool_name -attr "attr_name=attr_value
                      [,attr_name=attr_value[, ...]]" [-i] [-f]

Parameters

Table E-21 crsctl modify serverpool Command Parameters

Parameter Description
server_pool_name

The name of the server pool you want to modify.

attr_name

The name of a server pool attribute you want to modify preceded by the -attr flag.

attr_value

A value for the server pool attribute.

Note: The attr_name and attr_value parameters must be enclosed in double quotation marks ("") and separated by commas. For example:

-attr "CHECK_INTERVAL=30,START_TIMEOUT=25"
-i

If you specify -i, then the command fails if Oracle Clusterware cannot process the request immediately.

-f

If you specify the -f option, then Oracle Clusterware stops resources running on a server in another server pool and relocates that server into the server pool you are adding.

If you do not specify the -f option, then Oracle Clusterware checks whether the creation of the server pool results in stopping any resources on a server in another server pool that is going to give up a server to the server pool you are adding. If so, then Oracle Clusterware rejects the crsctl add serverpool command.


See Also:

"Understanding Server Pools" for more information about server pools and server pool attributes

Usage Notes

Example

To modify an existing server pool, run the following command as root or the Oracle Clusterware installation owner:

# crsctl modify serverpool sp1 -attr "MAX_SIZE=7"

crsctl pin css

Use the crsctl pin css command to pin many specific nodes. Pinning a node means that the association of a node name with a node number is fixed. If a node is not pinned, its node number may change if the lease expires while it is down. The lease of a pinned node never expires.

Syntax

crsctl pin css -n node_name [ node_name [..]]

Usage Notes

Example

To pin the node named node2:

# crsctl pin css -n node2

crsctl query crs administrator

Use the crsctl query crs administrator command to display the list of users with Oracle Clusterware administrative privileges.

Syntax

crsctl query crs administrator

Example

The crsctl query crs administrator command returns output similar to the following:

CRS Administrator List: scott

crsctl query crs activeversion

Use the crsctl query crs activeversion command to display the active version, or the binary version, of the Oracle Clusterware software on the local node.

Syntax

crsctl query crs activeversion

Example

The crsctl query crs activeversion command returns output similar to the following:

Oracle Clusterware active version on the cluster is [11.2.0.1.0]"

crsctl query crs releaseversion

Use the crsctl query crs releaseversion command to display the release version of the Oracle Clusterware software.

Syntax

crsctl query crs releaseversion

Example

The crsctl query crs releaseversion command returns output similar to the following:

Oracle High Availablity Services release version on the local node is [11.2.0.1.0]

crsctl query crs softwareversion

Use the crsctl query crs softwareversion command to display the software version, or the lowest Oracle Clusterware software version running on a particular server in the cluster.

Syntax

crsctl query crs softwareversion node_name

Usage Notes

Example

The crsctl query crs softwareversion command returns output similar to the following:

Oracle Clusterware version on node [node1] is [11.2.0.1.0]

crsctl query css ipmidevice

Use the crsctl query css ipmidevice command to determine the presence of the Intelligent Platform Management Interface (IPMI) driver on the local system.

Syntax

crsctl query css ipmidevice

Usage Notes

Example

The crsctl query crs ipmidevice command returns output similar to the following:

CRS-4231: IPMI device successfully found and is configured

or

CRS-4128: IPMI device not found

crsctl query css votedisk

Use the crsctl query css votedisk command to display the voting disks used by Cluster Synchronization Services, the status of the voting disks, and the location of the disks, whether they are stored on Oracle ASM or elsewhere.

Syntax

crsctl query css votedisk

Usage Notes

Example

The crsctl query css votedisk command returns output similar to the following:

$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
1. ONLINE   296641fd201f4f3fbf3452156d3b5881 (/ocfs2/host09_vd3) []
2. ONLINE   8c4a552bdd9a4fd9bf93e444223146f2 (/netapp/ocrvf/newvd) []
3. ONLINE   8afeee6ae3ed4fe6bfbb556996ca4da5 (/ocfs2/host09_vd1) []
Located 3 voting disk(s).

crsctl relocate resource

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

Syntax

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

Parameters

Table E-22 crsctl relocate resource Command Parameters

Parameter Description
resource_name

The name of a resource you want to relocate.

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

-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.

-k cid

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

-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 option 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 option.

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

Example

To relocate one particular resource from one server to another:

# crsctl relocate resource myResource1 -s node1 -n node3

crsctl relocate server

Use the crsctl relocate server command to relocate a server to a different server pool.

Syntax

crsctl relocate server server_name [...] -c server_pool_name [-i] [-f]

Parameters

Table E-23 crsctl relocate server Command Parameters

Parameter Description
server_name

The name of the server you want to relocate. You can provide a space-delimited list of servers if you want to relocate multiple servers.

-c server_pool_name

Specify the name of the server pool to which you want relocate the servers.

-i

If you specify -i, then the command fails if Oracle Clusterware cannot process the request immediately.

-f

If you specify the -f option, then Oracle Clusterware stops resources running on the servers in another server pool and relocates that server into the server pool you specified.

If you do not specify the -f option, then Oracle Clusterware checks for resources that must be stopped on the servers that are being relocated. If it finds any, then Oracle Clusterware rejects the crsctl relocate server command.


Usage Notes

Example

 To move the node6 and node7 servers into the sp1 server pool without disrupting any active resources on those nodes, use the following command:

$ crsctl relocate server node6 node7 -c sp1

crsctl replace discoverystring

Use the crsctl replace discoverystring command to replace the existing discovery string used to locate voting disk files.

Syntax

crsctl replace discoverystring 'absolute_path[,...]'

Parameters

Table E-24 crsctl replace discoverystring Command Parameters

Parameter Description
absolute_path

Specify one or more comma-delimited absolute paths that match one or more voting disk file locations. Wildcards may be used.

The list of paths must be enclosed in quotes.


Usage Notes

Example

Assume the current discovery string is /oracle/css1/*. To also use voting disk files in the /oracle/css2/ directory, replace the current discovery string using the following command:

# crsctl replace discoverystring "/oracle/css1/*,/oracle/css2/*"

crsctl replace votedisk

Use the crsctl replace votedisk command to move or replace the existing voting disks. This command creates voting disks in the specified locations, either in Oracle ASM or some other storage option. Oracle Clusterware copies existing voting disk information into the new locations and removes the voting disks from the former locations.

Syntax

crsctl replace votedisk [+asm_disk_group | path_to_voting_disk [...]]

Parameters

Table E-25 crsctl replace votedisk Command Parameters

Parameter Description

+asm_disk_group

Specify the disk group in Oracle ASM where you want to locate the voting disk.

path_to_voting_disk [...]

A space-delimited list of voting disk file paths for voting disk files that reside outside of Oracle ASM.


Usage Notes

Example

Example 1

To replace a voting disk that is located within Oracle ASM:

$ crsctl replace votedisk +diskgroup1

Example 2

To replace a voting disk that is located on a shared file system:

$ crsctl replace votedisk /mnt/nfs/disk1 /mnt/nfs/disk2

crsctl set css

Use the crsctl set css command to set the value of a Cluster Synchronization Services parameter.

Syntax

crsctl set css parameter value

Usage Notes

Example

To set the value of a Cluster Synchronization Services parameter:

$ crsctl set css diagwait 30

crsctl set css ipmiaddr

Use the crsctl set css ipmiaddr command to store the address of the local Intelligent Platform Management Interface (IPMI) device, or the Baseboard Management Controller (BMC), in the Oracle Cluster Registry.

Syntax

crsctl set css ipmiaddr ip_address

Usage Notes

Example

To store the BMC IP address on a local server and distribute it to other cluster nodes:

$ crsctl set css ipmiaddr 192.0.2.244

crsctl set css ipmiadmin

Use the crsctl set css ipmiadmin command to store in the Oracle Registry the login information of an Intelligent Platform Management Interface (IPMI) administrator configured on the resident baseboard management controller (BMC) of the local server.

Syntax

crsctl set css ipmiadmin ipmi_administrator_name

Usage Notes

Example

To modify the IPMI administrator scott:

$ crsctl set css ipmiadmin scott

crsctl setperm serverpool

Use the crsctl setperm serverpool command to set permissions for a particular server pool.

Syntax

crsctl setperm serverpool server_pool_name {-u acl_string | -x acl_string |
-o user_name | -g group_name}

Parameters

Table E-26 crsctl setperm serverpool Command Parameters

Parameter Description
server_pool_name

Specify the name of the server pool for which you want to set permissions.

{-u | -x | -o | -g}

You can specify only one of the following parameters for a server pool:

  • -u acl_string: You can update the access control list (ACL) for a server pool

  • -x acl_string: You can delete the ACL for a server pool

  • -o user_name: You can change the owner of a server pool by entering a user name

  • -g group_name: You can change the primary group of a server pool by entering a group name

Specify a user, group, or other ACL string, as follows:

user:user_name[:readPermwritePermexecPerm] |
group:group_name[:readPermwritePermexecPerm] |
other[::readPermwritePermexecPerm]
  • user: User ACL

  • group: Group ACL

  • other: Other ACL

  • readPerm: Read permission for the server pool; the letter r grants a user, group, or other read permission, the minus sign (-) denies read permission

  • writePerm: Write permission for the server pool; the letter w grants a user, group, or other write permission, the minus sign (-) denies write permission

  • execPerm: Execute permission for the server pool; the letter x grants a user, group, or other execute permission, the minus sign (-) denies execute permission


Usage Notes

Example

To grant read, write, and execute permissions on a server pool for user Scott Tiger:

crsctl setperm serverpool sp3 -u user:scott.tiger:rwx

crsctl start cluster

Use the crsctl start cluster command on any node in the cluster to start the Oracle Clusterware stack.

Syntax

crsctl start cluster [-all | -n server_name [...]]

Usage Notes

Example

To start the Oracle Clusterware stack on two named servers run the following command as root or the owner of the Oracle Clusterware installation:

# crsctl start cluster -n node1 node2

crsctl start crs

Use the crsctl start crs command to start Oracle High Availability Services on the local server.

Syntax

crsctl start crs

Usage Notes

Example

To start Oracle High Availability Services on the local server, run the following command as root or the owner of the Oracle Clusterware installation:

# crsctl start crs

crsctl status server

Use the crsctl status server command to obtain the status and configuration information of one or more particular servers.

Syntax

crsctl status server [-p | -v | -f]

crsctl status server { server_name [...] | -w "filter"} [-g | -p | -v | -f]

Parameters

Table E-27 crsctl status server Command Parameters

Parameter Description
server_name [...]

Specify one or more space-delimited server names

-w "filter"

Specify a filter to determine which servers are displayed. The filter must be enclosed in double quotation marks (""). Values that contain parentheses or spaces must be enclosed in single quotation marks (''). For example, "STATE = ONLINE" limits the display to servers that are online.

See Also: "Filters" for more information about filters

-g | -p | -v | -f

You can specify one of the following parameters when Oracle Clusterware checks the status of specific servers:

  • -g: Use this parameter to check if the specified servers are registered

  • -p: Use this parameter to display static configuration of the specified servers

  • -v: Use this parameter to display the runtime configuration of the specified servers

  • -f: Use this parameter to display the full configuration of the specified servers


Example

Example 1

The crsctl status server command returns output similar to the following:

NAME=node1
STATE=ONLINE

NAME=node2
STATE=ONLINE

Example 2

To display the full configuration of a specific server, enter a command similar to the following:

$ crsctl status server node2 -f
NAME=node2
STATE=ONLINE
ACTIVE_POOLS=ora.orcl Generic
STATE_DETAILS=

crsctl status serverpool

Use the crsctl status serverpool command to obtain the status and configuration information of one or more particular server pools.

Syntax

crsctl status serverpool [-p | -v | -f]

crsctl status serverpool [server_pool_name [...]] [-g | -p | -v | -f]

Parameters

Table E-28 crsctl status serverpool Command Parameters

Parameter Description
[server_pool_name [...]

Specify one or more space-delimited server pool names.

[-g | -p | -v | -f]

You can optionally specify one of the following parameters:

  • -g: Use this parameter to check if the specified server pools are registered

  • -p: Use this parameter to display static configuration of the specified server pools

  • -v: Use this parameter to display the runtime configuration of the specified server pools

  • -f: Use this parameter to display the full configuration of the specified server pools


Usage Notes

Example

Example 1

To display the full configuration of the server pool sp1:

$ crsctl status serverpool sp1 -f 
NAME=spl
IMPORTANCE=1
MIN_SIZE=0
MAX_SIZE=-1
SERVER_NAMES=node3 node4 node5
PARENT_POOLS=Generic
EXCLUSIVE_POOLS=
ACL=owner:oracle:rwx,pgrp:oinstall:rwx,other::r--
ACTIVE_SERVERS=node3 node4

Example 2

To display all the server pools and the servers associated with them, use the following command:

$ crsctl status serverpool
NAME=Free
ACTIVE_SERVERS=

NAME=Generic
ACTIVE_SERVERS=node1 node2

NAME=ora.orcl
ACTIVE_SERVERS=node1 node2

NAME=sp1
ACTIVE_SERVERS=node3 node4

crsctl stop cluster

Use the crsctl stop cluster command on any node in the cluster to stop the Oracle Clusterware stack on all servers in the cluster or specific servers.

Syntax

crsctl stop cluster [-all | -n server_name [...]] [-f]

Usage Notes

Example

To stop the Oracle Clusterware stack on a particular server:

# crsctl stop cluster -n node1

crsctl stop crs

Use the crsctl stop crs command to stop Oracle High Availability Services on the local server.

Syntax

crsctl stop crs [-f]

Usage Notes

Example

To stop Oracle High Availability Services on the local server:

# crsctl stop crs

crsctl unpin css

Use the crsctl unpin css command to unpin many servers. If a node is not pinned, its node number may change if the lease expires while it is down.

Syntax

crsctl unpin css -n node_name [ node_name [..]]

Usage Notes

Example

To unpin two nodes:

$ crsctl unpin css node1 node4

crsctl unset css

Use the crsctl unset css command to restore the value of a Cluster Synchronization Services parameter to its default value.

Syntax

crsctl unset css parameter

Usage Notes

Example

To restore the reboottime Cluster Synchronization Services parameter to its default value:

$ crsctl unset css reboottime

Oracle Restart Environment CRSCTL Commands

The commands listed in this section control Oracle High Availability Services. These commands manage the Oracle High Availability Services stack in the Oracle Restart environment, which consists of the Oracle High Availability Services daemon (ohasd), Oracle ASM (if installed), and Cluster Synchronization Services (if Oracle ASM is installed). These commands only affect the local server on which you run them.

Each server in the cluster is in one of two possible states:

You can use the following commands in the Oracle Restart environment, only:

crsctl check has

Use the crsctl check has command to check the status of ohasd.

Syntax

crsctl check has

Usage Notes

Example

The crsctl check has command returns output similar to the following:

CRS-4638: Oracle High Availability Services is online

crsctl config has

Use the crsctl check has command to display the automatic startup configuration of the Oracle High Availability Services stack on the server.

Syntax

crsctl config has

Usage Notes

Example

The crsctl config has command returns output similar to the following:

CRS-4622 Oracle High Availability Services autostart is enabled.

crsctl disable has

Use the crsctl disable has command to disable automatic startup of the Oracle High Availability Services stack when the server boots up.

Syntax

crsctl disable has

Usage Notes

Example

The crsctl disable has command returns output similar to the following:

CRS-4621 Oracle High Availability Services autostart is disabled.

crsctl enable has

Use the crsctl enable has command to enable automatic startup of the Oracle High Availability Services stack when the server boots up.

Syntax

crsctl enable has

Usage Notes

Example

The crsctl enable has command returns output similar to the following:

CRS-4622 Oracle High Availability Services autostart is enabled.

crsctl query has releaseversion

Use the crsctl query crs releaseversion command to display the release version of the Oracle Clusterware software on the local node.

Syntax

crsctl query has releaseversion

Usage Notes

Example

The crsctl query has releaseversion command returns output similar to the following:

Oracle High Availability Services release version on the local node is [11.2.0.0.2]

crsctl query has softwareversion

Use the crsctl query crs softwareversion command to display the software version on the local node.

Syntax

crsctl query has softwareversion server_name

Usage Notes

Example

The crsctl query has softwareversion command returns output similar to the following:

Oracle High Availability Services version on the local node is [11.2.0.0.2]

crsctl start has

Use the crsctl start has command to start Oracle High Availability Services on the local server.

Syntax

crsctl start has

Usage Notes

Example

To start Oracle High Availability Services on the local server:

# crsctl start has

crsctl stop has

Use the crsctl stop has command to stop Oracle High Availability Services on the local server.

Syntax

crsctl stop has [-f]

Usage Notes

Example

To stop Oracle High Availability Services on the local server:

# crsctl stop has

Troubleshooting and Diagnostic Output

You can use crsctl set log commands as the root user to enable dynamic debugging for Cluster Ready Services (CRS), Cluster Synchronization Services (CSS), and the Event Manager (EVM), and the clusterware subcomponents. You can dynamically change debugging levels using crsctl debug commands. Debugging information remains in the Oracle Cluster Registry for use during the next startup. You can also enable debugging for resources.

This section covers the following topics:


Dynamic Debugging

This section includes the following CRSCTL commands that aid in debugging:

crsctl set log

Use the crsctl set log command to set log levels for Oracle Clusterware.

Syntax

crsctl set log {[crs | css | evm "component_name=log_level, [...]"] | 
[all=log_level]}

You can also set log levels for the agents of specific resources, as follows:

crsctl set log res "resource_name=log_level, [...]"

Usage Notes

Examples

To set log levels for the CRSRTI and CRSCOMM components of the CRS module:

$ crsctl set log crs "CRSRTI=1,CRSCOMM=2"

To set log levels for all components of the EVM module:

$ crsctl set log evm all=2

To set a log level for a resource:

$ crsctl set log res "myResource1=3"

crsctl set trace

Use the crsctl set trace command to set tracing levels for Oracle Clusterware.

Syntax

crsctl set trace {[crs | evm "component_name=tracing_level, [...]"] | 
["all=tracing_level"]

Usage Notes

Examples

To set tracing levels for the CRSCCL and CRSEVT components of the CRS module:

$ crsctl set trace crs "CRSCCL=1,CRSEVT=2"

Component Level Debugging

You can use crsctl set log and crsctl set trace commands as the root user to enable dynamic debugging for the Oracle Clusterware Cluster Ready Services (CRS), Cluster Synchronization Services (CSS), and the Event Manager (EVM).

This section includes the following topics:

Enabling Debugging for CRS, CSS, and EVM Modules

You can enable debugging for the CRS, CSS, and EVM modules and their components, and for resources, by setting environment variables or by issuing crsctl set log commands, using the following syntax:

crsctl set {log | trace} module_name 
 “component:debugging_level[,component:debugging_level][...]”

Run the crsctl set command as the root user, and supply the following information:

The following commands show examples of how to enable debugging for the various modules:

To obtain a list of components that can be used for debugging, run the crsctl lsmodules command, as follows:

crsctl lsmodules {crs | css | evm}

Note:

You do not have to be the root user to run the crsctl lsmodulues command.

Table E-29 shows the components for the CRS, CSS, and EVM modules, respectively. Note that some component names are common between the CRS, EVM, and CSS daemons and may be enabled on that specific daemon. For example, COMMNS is the NS layer and because each daemon uses the NS layer, you can enable this specific module component on any of the daemons to get specific debugging information.

Table E-29 Components for the CRS, CSS, and EVM Modules

CRS ComponentsFoot 1  CSS ComponentsFoot 2  EVM ComponentsFoot 3 
CRSUI
CRSCOMM
CRSRTI
CRSMAIN
CRSPLACE
CRSAPP
CRSRES
CRSCOMM
CRSOCR
CRSTIMER
CRSEVT
CRSD
CLUCLS
CSSCLNT
COMMCRS
COMMNS
CSSD
COMMCRS
COMMNS
EVMD
EVMDMAIN
EVMCOMM
EVMEVT
EVMAPP
EVMAGENT
CRSOCR
CLUCLS
CSSCLNT
COMMCRS
COMMNS

Footnote 1 Obtain the list of CRS components using the crsctl lsmodules crs command.

Footnote 2 Obtain the list of CSS components using the crsctl lsmodules css command.

Footnote 3 Obtain the list of EVM components using the crsctl lsmodules evm command.

Example 1    

To set debugging levels on all cluster nodes, include the -all keyword, as follows:

crsctl debug log crs "CRSRTI:1,CRSCOMM:2" -all
Example 2    

To set debugging levels on specific cluster nodes, include the -nodelist keyword and the names of the nodes, as follows:

crsctl debug log crs "CRSRTI:1,CRSCOMM:2" -nodelist node1,node2

Table E-30 describes the Cluster Synchronization Services modules.

Table E-30 Cluster Synchronization Services (CSS) Modules and Functions

Module Description

CSS

CSS client component

CSSD

CSS daemon component


Table E-31 describes the function of each communication (COMM) module.

Table E-31 Communication (COMM) Modules and Functions

Module Description

COMMCRS

Clusterware communication layer

COMMNS

NS communication layer


Table E-32 describes the functions performed by each CRS module.

Table E-32 Oracle Clusterware (CRS) Modules and Functions

Module Descriptions

CRSUI

User interface module

CRSCOMM

Communication module

CRSRTI

Resource management module

CRSMAIN

Main module/driver

CRSPLACE

CRS placement module

CRSAPP

CRS application

CRSRES

CRS resources

CRSOCR

Oracle Cluster Registry interface

CRSTIMER

Various timers related to CRS

CRSEVT

CRS EVM/event interface module

CRSD

CRS daemon


Using the crsctl set log crs command, you can debug the OCR components listed in Table E-33. The components listed in Table E-33 can also be used for the Oracle Local Registry (OLR) except for OCRMAS and OCRASM. You can also use them for the OCR and OLR clients, except for OCRMAS and OCRSRV. Some of the OCR/OLR clients are OCRCONFIG, OCRDUMP, and so on.

Table E-33 Oracle Cluster Registry (OCR) Component Names

Module Description

OCRAPI

OCR abstraction component

OCRCLI

OCR client component

OCRSRV

OCR server component

OCRMAS

OCR master thread component

OCRMSG

OCR message component

OCRCAC

OCR cache component

OCRRAW

OCR raw device component

OCRUTL

OCR util component

OCROSD

OCR operating system dependent (OSD) layer

OCRASM

OCR ASM component


Table E-34 describes the OCR tool modules.

Table E-34 OCRCONFIG Modules and Functions

Module Description

OCRCONFIG

OCRCONFIG component for configuring the OCR

OCRDUMP

OCRDUMP component that lists the Oracle Cluster Registry contents

OCRCHECK

OCRCHECK component that verifies all of the configured OCRs


Creating an Initialization File to Contain the Debugging Level

This section describes how to specify the debugging level in an initialization file. This debugging information is stored for use during the next startup.

For each process to debug, you can create an initialization file that contains the debugging level.

The initialization file name includes the name of the process that you are debugging (process_name.ini). The file is located in the Grid_home/log/host_name/admin/ directory. For example, the name for the CLSCFG debugging initialization file on node1 would be:

Grid_home/log/node1/admin/clscfg.ini

You can also use an initialization file when using OCR utilities. The initialization file for ocrconfig, ocrdump, and ocrcheck is:

Grid_home/srvm/admin/ocrlog.ini

The format of the initialization file is as follows:

mesg_logging_level=2
comploglvl=”OCRAPI:0;OCRSRV:0”
comptrclvl=”OCRAPI:0;OCRSRV:0”

You can specify component names, logging, and tracing levels.

See Also:

"Enabling Debugging for CRS, CSS, and EVM Modules" for information about dynamically changing debugging levels by specifying the level number (from 1 to 5) on the crsctl command

Enabling Additional Tracing for Oracle Clusterware High Availability

Oracle Support may ask you to enable tracing to capture additional information. Because the procedures described in this section may affect performance, only perform these activities with the assistance of Oracle Support.

Enabling Debugging for Oracle Clusterware Resources

You can enable debugging for Oracle Clusterware resources by issuing crsctl set log and crsctl set trace commands, using the following syntax:

crsctl set {log | trace} resource “resource_name=debugging_level” 

Run the crsctl set command as the root user, and supply the following information:

Note:

You must run this crsctl set log or crsctl set trace command as the root user.

To obtain a list of resources that can be used for debugging, run the crsctl status resource command.

Example 1    

To generate a debugging log for the VIP resource on node1, issue the following command:

crsctl set log resource "ora.node1.vip:1"
Example 2    

To generate a trace file for a SCAN listener, use the following command:

crsctl set trace resource "ora.LISTENER_SCAN1.lsnr=3”