Grab your copy of The Ultimate DBA Planner  
Skip to content
  • Home
  • About Me
  • Course and Programs
  • Blog
  • Resources
  • Contact

Grid Infrastructure 12c2 With Oracle Restart

Welcome! Welcome! Welcome!

Installation and configuration of the different oracle database components are very common DBA tasks. One of the components called Oracle Automatic Storage Management (oracle ASM) is a widely used storage layer for the oracle databases. Learning how install, administer and manage ASM will facilitate your day to day administrative tasks and free up time for you to dedicate to more challenging projects.

You will learn how to install and configure Oracle Grid Infrastructure for a standalone server and this installs Oracle ASM. This installation supports volume management, file system, and automatic restart capabilities.

This training shows you step-by-step, how to:

  • Install and configure Oracle Restart
  • Install, configure and manage ASM
  • Monitor, start and stop oracle instances, ASM instances, and the listener using Oracle Restart
  • Create and manage ASM disk groups
  • Create and manage database services
  • Use command line and GUI utilities such as crsctl, srvctl asmcmd, asmca to manage asm instances, database instances, disk groups and the high availability stack.

The Completion Level of Your Training.

0.00%

Start Here

About Author

Oracle Clusterware Architecture

Oracle Clusterware is the technology which unifies servers in a server farm to form a cluster. A cluster is defined as a group of independent, yet inter-connected servers which cooperate as a single system.
Oracle Clusterware is the software in this environment which coordinates the management of these servers and the applications running on them. Oracle Clusterware is a generic clustering solution tested and certified to run on all major platforms and operating systems.
Oracle Clusterware was originally introduced with Oracle Database 10g Release 1 as the underlying, generic clustering software required for running the multi-instance RDBMS, Oracle Real Application Clusters (RAC). Oracle Clusterware is shipped with Oracle Grid Infrastructure, which is a suite of software packages which includes Oracle Automatic Storage Management (ASM) for databases, Oracle Automatic Storage Cloud File System (ACFS), a POSIX compliant general purpose cluster file system, Oracle Database Quality of Service Management.

Oracle Clusterware is a generic, general purpose clustering solution for all applications.

Oracle Clusterware is a complete, enterprise class clustering solution. It is a free. To get support for upgrades or patches, a valid support license for any other Oracle product such as Oracle Linux, Oracle Solaris, or any other supported Oracle application is required.

 

Oracle Stack Management
Oracle Clusterware provides a rich management framework to integrate and manage all applications. The core of this framework is a robust policy engine for resource placement as well as start and stop dependencies between resources. This enables Oracle Clusterware to manage workload and availability through the entire stack. The ability to automate and securely manage the start, stop and placement of database and application resources for planned maintenance and workload performance is an essential ingredient for successful consolidation.

Oracle Flex Cluster 12c
Oracle Clusterware, in the original design, is a tightly coupled clustering solution which requires shared storage and shared network between all servers in the cluster. This is a requirement when Oracle Clusterware is installed for Oracle databases - RAC and single instance. This tightly coupled cluster is
required to preserve data integrity of multi-instance, shared cache clustered databases. Oracle 12c introduces an innovative clustering solution - Oracle Flex Cluster which relaxes the tightly coupled nature of Oracle Clusterware and permits the collocation of applications and the RDBMS in a common Oracle Flex Cluster. In the Oracle Flex Cluster, the database tier, composed of 'HUB' servers, preserves the tightly coupled configuration, while the application tier, composed of 'LEAF' servers, is loosely coupled and does not require shared storage and peer-to-peer communication with other
servers in the cluster.

The collocation of applications and the database in a common cluster offers far greater availability and ease of management between application components and the database, where start, stop ordered dependencies, and placement may be defined and automated. Specifically, applications may depend on components outside of the respective application management domain. Customers either execute the start up of these various components manually, or, they maintain cumbersome scripts in an attempt to automate.

application and database tiers allowing the application to pull up the database or, if the application tier is down, the database startup would start the application components on the correct servers in the correct order. The entire process, application tier start up with correct startup order and placement and database/application tier pull-up - is fully automated.

Next

Over Of Grid Infrastructure

Oracle Grid Infrastructure for a standalone server, also known as Oracle Restart, provides system support for a single-instance Oracle Database. This support includes volume management, file system, and automatic restart capabilities. If you plan to use Oracle Automatic Storage Management (Oracle ASM), then you must install Oracle Restart before installing your database. Oracle Grid Infrastructure for a standalone server includes Oracle Restart and Oracle Automatic Storage Management. Oracle combined the two infrastructure products into a single set of binaries that is installed into an Oracle Restart home.

Oracle Automatic Storage Management is a volume manager and a file system for Oracle database files that supports single-instance Oracle Database and Oracle Real Application Clusters (Oracle RAC) configurations. Oracle Automatic Storage Management also supports a general purpose file system for your application needs, including Oracle Database binaries. Oracle Automatic Storage Management is Oracle's recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices.

 

  • You can neither install Oracle Restart on an Oracle Grid Infrastructure cluster member node, nor add an Oracle Restart server to an Oracle Grid Infrastructure cluster member node. Oracle Restart supports single-instance databases on one server, while Oracle Grid Infrastructure for a Cluster supports single-instance or Oracle RAC databases on a cluster.
  • If you want to use Oracle ASM or Oracle Restart, then you must install Oracle Grid Infrastructure for a standalone server before you install and create the database. Otherwise, you must manually register the database with Oracle Restart.
  • Oracle Restart is used in single-instance (nonclustered) environments only.

Oracle Restart improves the availability of your Oracle database by providing the following:

  • When there is a hardware or a software failure, Oracle Restart automatically starts all Oracle components, including the Oracle database instance, Oracle Net Listener, database services, and Oracle ASM.
  • Oracle Restart starts components in the proper order when the database host is restarted.
  • Oracle Restart runs periodic checks to monitor the status of Oracle components. If a check operation fails for a component, then the component is shut down and restarted.

Next

Oracle ASM Architecture

http://www.oracle.com/technetwork/articles/database/asm-odb12c-enhancements-2206102.html

Oracle ASM is a volume manager and a file system for Oracle Database files that supports single-instance Oracle Database and Oracle Real Application Clusters (Oracle RAC) configurations. Oracle ASM is Oracle's recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices.

Oracle ASM uses disk groups to store data files; an Oracle ASM disk group is a collection of disks that Oracle ASM manages as a unit. Within a disk group, Oracle ASM exposes a file system interface for Oracle Database files. The content of files that are stored in a disk group is evenly distributed to eliminate hot spots and to provide uniform performance across the disks. The performance is comparable to the performance of raw devices.

You can add or remove disks from a disk group while a database continues to access files from the disk group. When you add or remove disks from a disk group, Oracle ASM automatically redistributes the file contents and eliminates the need for downtime when redistributing the content. For information about administering disk groups, see Administering Oracle ASM Disk Groups.

The Oracle ASM volume manager functionality provides flexible server-based mirroring options. The Oracle ASM normal and high redundancy disk groups enable two-way and three-way mirroring respectively. You can use external redundancy to enable a Redundant Array of Independent Disks (RAID) storage subsystem to perform the mirroring protection function.

Oracle ASM also uses the Oracle Managed Files (OMF) feature to simplify database file management. OMF automatically creates files in designated locations. OMF also names files and removes them while relinquishing space when tablespaces or files are deleted.

Oracle ASM reduces the administrative overhead for managing database storage by consolidating data storage into a small number of disk groups. The smaller number of disk groups consolidates the storage for multiple databases and provides for improved I/O performance.

Oracle ASM files can coexist with other storage management options such as raw disks and third-party file systems. This capability simplifies the integration of Oracle ASM into pre-existing environments.

Oracle ASM has easy to use management interfaces such as SQL*Plus, the Oracle ASM Command Line Utility (ASMCMD) command-line interface, and Oracle ASM Configuration Assistant (ASMCA). For information about Oracle ASM Configuration Assistant, see Managing Oracle ASM With ASMCA . For information about the ASMCMD command-line interface, see Managing Oracle ASM with ASMCMD .

https://docs.oracle.com/database/121/OSTMG/GUID-B20F761E-5217-4F49-BCB8-D200EEE5B51E.htm#OSTMG03601

 

About Oracle ASM Instances

An Oracle ASM instance is built on the same technology as an Oracle Database instance. An Oracle ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because Oracle ASM performs fewer tasks than a database, an Oracle ASM SGA is much smaller than a database SGA. In addition, Oracle ASM has a minimal performance effect on a server. Oracle ASM instances mount disk groups to make Oracle ASM files available to database instances; Oracle ASM instances do not mount databases. For information about managing an Oracle ASM instance, see Administering Oracle ASM Instances.

Oracle ASM is installed in the Oracle Grid Infrastructure home before Oracle Database is installed in a separate Oracle home. Oracle ASM and database instances require shared access to the disks in a disk group. Oracle ASM instances manage the metadata of the disk group and provide file layout information to the database instances.

Oracle ASM metadata is the information that Oracle ASM uses to control a disk group and the metadata resides within the disk group. Oracle ASM metadata includes the following information:

  • The disks that belong to a disk group
  • The amount of space that is available in a disk group
  • The file names of the files in a disk group
  • The location of disk group data file extents
  • A redo log that records information about atomically changing metadata blocks
  • Oracle ADVM volume information

Oracle ASM instances can be clustered using Oracle Clusterware; there is one Oracle ASM instance for each cluster node. If there are several database instances for different databases on the same node, then the database instances share the same single Oracle ASM instance on that node.

If the Oracle ASM instance on a node in a Standard Oracle ASM cluster fails, then all of the database instances on that node also fail. However, in an Oracle Flex ASM configuration, Oracle 12c database instances would not fail as they would be able to access another Oracle ASM instance remotely on another node. For information about Oracle Flex ASM, refer to "Managing Oracle Flex ASM".

Unlike a file system driver failure, an Oracle ASM instance failure does not require restarting the operating system. In an Oracle RAC environment, the Oracle ASM and database instances on the surviving nodes automatically recover from an Oracle ASM instance failure on a node.

Figure 1-1 shows a single node configuration with one Oracle ASM instance and multiple database instances. The Oracle ASM instance manages the metadata and provides space allocation for the Oracle ASM files. When a database instance creates or opens an Oracle ASM file, it communicates those requests to the Oracle ASM instance. In response, the Oracle ASM instance provides file extent map information to the database instance.

In Figure 1-1, there are two disk groups: one disk group has four disks and the other has two disks. The database can access both disk groups. The configuration in Figure 1-1 shows multiple database instances, but only one Oracle ASM instance is needed to serve the multiple database instances.

Figure 1-1 Oracle ASM for Single-Instance Oracle Databases

Description of Figure 1-1 follows
Description of "Figure 1-1 Oracle ASM for Single-Instance Oracle Databases "

Figure 1-2 shows an Oracle ASM cluster in an Oracle RAC environment where Oracle ASM provides a clustered pool of storage. There is one Oracle ASM instance for each node serving multiple Oracle RAC or single-instance databases in the cluster. All of the databases are consolidated and share the same two Oracle ASM disk groups.

Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC

Description of Figure 1-2 follows
Description of "Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC"

A clustered storage pool can be shared by multiple single-instance Oracle Databases as shown in Figure 1-3. In this case, multiple databases share common disk groups. A shared Oracle ASM storage pool is achieved by using Oracle Clusterware. However, in such environments an Oracle RAC license is not required.

To share a disk group among multiple nodes, you must install Oracle Clusterware on all of the nodes, regardless of whether you install Oracle RAC on the nodes. Oracle ASM instances that are on separate nodes do not need to be part of an Oracle ASM cluster. However, if the Oracle ASM instances are not part of an Oracle ASM cluster, they cannot communicate with each other. Multiple nodes that are not part of an Oracle ASM cluster cannot share a disk group.

Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases

Description of Figure 1-3 follows
Description of "Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases"

About Oracle ASM Instances

An Oracle ASM instance is built on the same technology as an Oracle Database instance. An Oracle ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because Oracle ASM performs fewer tasks than a database, an Oracle ASM SGA is much smaller than a database SGA. In addition, Oracle ASM has a minimal performance effect on a server. Oracle ASM instances mount disk groups to make Oracle ASM files available to database instances; Oracle ASM instances do not mount databases. For information about managing an Oracle ASM instance, see Administering Oracle ASM Instances.

Oracle ASM is installed in the Oracle Grid Infrastructure home before Oracle Database is installed in a separate Oracle home. Oracle ASM and database instances require shared access to the disks in a disk group. Oracle ASM instances manage the metadata of the disk group and provide file layout information to the database instances.

Oracle ASM metadata is the information that Oracle ASM uses to control a disk group and the metadata resides within the disk group. Oracle ASM metadata includes the following information:

  • The disks that belong to a disk group
  • The amount of space that is available in a disk group
  • The file names of the files in a disk group
  • The location of disk group data file extents
  • A redo log that records information about atomically changing metadata blocks
  • Oracle ADVM volume information

Oracle ASM instances can be clustered using Oracle Clusterware; there is one Oracle ASM instance for each cluster node. If there are several database instances for different databases on the same node, then the database instances share the same single Oracle ASM instance on that node.

If the Oracle ASM instance on a node in a Standard Oracle ASM cluster fails, then all of the database instances on that node also fail. However, in an Oracle Flex ASM configuration, Oracle 12c database instances would not fail as they would be able to access another Oracle ASM instance remotely on another node. For information about Oracle Flex ASM, refer to "Managing Oracle Flex ASM".

Unlike a file system driver failure, an Oracle ASM instance failure does not require restarting the operating system. In an Oracle RAC environment, the Oracle ASM and database instances on the surviving nodes automatically recover from an Oracle ASM instance failure on a node.

Figure 1-1 shows a single node configuration with one Oracle ASM instance and multiple database instances. The Oracle ASM instance manages the metadata and provides space allocation for the Oracle ASM files. When a database instance creates or opens an Oracle ASM file, it communicates those requests to the Oracle ASM instance. In response, the Oracle ASM instance provides file extent map information to the database instance.

In Figure 1-1, there are two disk groups: one disk group has four disks and the other has two disks. The database can access both disk groups. The configuration in Figure 1-1 shows multiple database instances, but only one Oracle ASM instance is needed to serve the multiple database instances.

Figure 1-1 Oracle ASM for Single-Instance Oracle Databases

Description of Figure 1-1 follows
Description of "Figure 1-1 Oracle ASM for Single-Instance Oracle Databases "

Figure 1-2 shows an Oracle ASM cluster in an Oracle RAC environment where Oracle ASM provides a clustered pool of storage. There is one Oracle ASM instance for each node serving multiple Oracle RAC or single-instance databases in the cluster. All of the databases are consolidated and share the same two Oracle ASM disk groups.

Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC

Description of Figure 1-2 follows
Description of "Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC"

A clustered storage pool can be shared by multiple single-instance Oracle Databases as shown in Figure 1-3. In this case, multiple databases share common disk groups. A shared Oracle ASM storage pool is achieved by using Oracle Clusterware. However, in such environments an Oracle RAC license is not required.

To share a disk group among multiple nodes, you must install Oracle Clusterware on all of the nodes, regardless of whether you install Oracle RAC on the nodes. Oracle ASM instances that are on separate nodes do not need to be part of an Oracle ASM cluster. However, if the Oracle ASM instances are not part of an Oracle ASM cluster, they cannot communicate with each other. Multiple nodes that are not part of an Oracle ASM cluster cannot share a disk group.

Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases

Description of Figure 1-3 follows
Description of "Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases"

About Oracle ASM Instances

An Oracle ASM instance is built on the same technology as an Oracle Database instance. An Oracle ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because Oracle ASM performs fewer tasks than a database, an Oracle ASM SGA is much smaller than a database SGA. In addition, Oracle ASM has a minimal performance effect on a server. Oracle ASM instances mount disk groups to make Oracle ASM files available to database instances; Oracle ASM instances do not mount databases. For information about managing an Oracle ASM instance, see Administering Oracle ASM Instances.

Oracle ASM is installed in the Oracle Grid Infrastructure home before Oracle Database is installed in a separate Oracle home. Oracle ASM and database instances require shared access to the disks in a disk group. Oracle ASM instances manage the metadata of the disk group and provide file layout information to the database instances.

Oracle ASM metadata is the information that Oracle ASM uses to control a disk group and the metadata resides within the disk group. Oracle ASM metadata includes the following information:

  • The disks that belong to a disk group
  • The amount of space that is available in a disk group
  • The file names of the files in a disk group
  • The location of disk group data file extents
  • A redo log that records information about atomically changing metadata blocks
  • Oracle ADVM volume information

Oracle ASM instances can be clustered using Oracle Clusterware; there is one Oracle ASM instance for each cluster node. If there are several database instances for different databases on the same node, then the database instances share the same single Oracle ASM instance on that node.

If the Oracle ASM instance on a node in a Standard Oracle ASM cluster fails, then all of the database instances on that node also fail. However, in an Oracle Flex ASM configuration, Oracle 12c database instances would not fail as they would be able to access another Oracle ASM instance remotely on another node. For information about Oracle Flex ASM, refer to "Managing Oracle Flex ASM".

Unlike a file system driver failure, an Oracle ASM instance failure does not require restarting the operating system. In an Oracle RAC environment, the Oracle ASM and database instances on the surviving nodes automatically recover from an Oracle ASM instance failure on a node.

Figure 1-1 shows a single node configuration with one Oracle ASM instance and multiple database instances. The Oracle ASM instance manages the metadata and provides space allocation for the Oracle ASM files. When a database instance creates or opens an Oracle ASM file, it communicates those requests to the Oracle ASM instance. In response, the Oracle ASM instance provides file extent map information to the database instance.

In Figure 1-1, there are two disk groups: one disk group has four disks and the other has two disks. The database can access both disk groups. The configuration in Figure 1-1 shows multiple database instances, but only one Oracle ASM instance is needed to serve the multiple database instances.

Figure 1-1 Oracle ASM for Single-Instance Oracle Databases

Description of Figure 1-1 follows
Description of "Figure 1-1 Oracle ASM for Single-Instance Oracle Databases "

Figure 1-2 shows an Oracle ASM cluster in an Oracle RAC environment where Oracle ASM provides a clustered pool of storage. There is one Oracle ASM instance for each node serving multiple Oracle RAC or single-instance databases in the cluster. All of the databases are consolidated and share the same two Oracle ASM disk groups.

Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC

Description of Figure 1-2 follows
Description of "Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC"

A clustered storage pool can be shared by multiple single-instance Oracle Databases as shown in Figure 1-3. In this case, multiple databases share common disk groups. A shared Oracle ASM storage pool is achieved by using Oracle Clusterware. However, in such environments an Oracle RAC license is not required.

To share a disk group among multiple nodes, you must install Oracle Clusterware on all of the nodes, regardless of whether you install Oracle RAC on the nodes. Oracle ASM instances that are on separate nodes do not need to be part of an Oracle ASM cluster. However, if the Oracle ASM instances are not part of an Oracle ASM cluster, they cannot communicate with each other. Multiple nodes that are not part of an Oracle ASM cluster cannot share a disk group.

Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases

Description of Figure 1-3 follows
Description of "Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases"

About Oracle ASM Instances

An Oracle ASM instance is built on the same technology as an Oracle Database instance. An Oracle ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because Oracle ASM performs fewer tasks than a database, an Oracle ASM SGA is much smaller than a database SGA. In addition, Oracle ASM has a minimal performance effect on a server. Oracle ASM instances mount disk groups to make Oracle ASM files available to database instances; Oracle ASM instances do not mount databases. For information about managing an Oracle ASM instance, see Administering Oracle ASM Instances.

Oracle ASM is installed in the Oracle Grid Infrastructure home before Oracle Database is installed in a separate Oracle home. Oracle ASM and database instances require shared access to the disks in a disk group. Oracle ASM instances manage the metadata of the disk group and provide file layout information to the database instances.

Oracle ASM metadata is the information that Oracle ASM uses to control a disk group and the metadata resides within the disk group. Oracle ASM metadata includes the following information:

  • The disks that belong to a disk group
  • The amount of space that is available in a disk group
  • The file names of the files in a disk group
  • The location of disk group data file extents
  • A redo log that records information about atomically changing metadata blocks
  • Oracle ADVM volume information

Oracle ASM instances can be clustered using Oracle Clusterware; there is one Oracle ASM instance for each cluster node. If there are several database instances for different databases on the same node, then the database instances share the same single Oracle ASM instance on that node.

If the Oracle ASM instance on a node in a Standard Oracle ASM cluster fails, then all of the database instances on that node also fail. However, in an Oracle Flex ASM configuration, Oracle 12c database instances would not fail as they would be able to access another Oracle ASM instance remotely on another node. For information about Oracle Flex ASM, refer to "Managing Oracle Flex ASM".

Unlike a file system driver failure, an Oracle ASM instance failure does not require restarting the operating system. In an Oracle RAC environment, the Oracle ASM and database instances on the surviving nodes automatically recover from an Oracle ASM instance failure on a node.

Figure 1-1 shows a single node configuration with one Oracle ASM instance and multiple database instances. The Oracle ASM instance manages the metadata and provides space allocation for the Oracle ASM files. When a database instance creates or opens an Oracle ASM file, it communicates those requests to the Oracle ASM instance. In response, the Oracle ASM instance provides file extent map information to the database instance.

In Figure 1-1, there are two disk groups: one disk group has four disks and the other has two disks. The database can access both disk groups. The configuration in Figure 1-1 shows multiple database instances, but only one Oracle ASM instance is needed to serve the multiple database instances.

Figure 1-1 Oracle ASM for Single-Instance Oracle Databases

Description of Figure 1-1 follows
Description of "Figure 1-1 Oracle ASM for Single-Instance Oracle Databases "

Figure 1-2 shows an Oracle ASM cluster in an Oracle RAC environment where Oracle ASM provides a clustered pool of storage. There is one Oracle ASM instance for each node serving multiple Oracle RAC or single-instance databases in the cluster. All of the databases are consolidated and share the same two Oracle ASM disk groups.

Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC

Description of Figure 1-2 follows
Description of "Figure 1-2 Oracle ASM Cluster Configuration with Oracle RAC"

A clustered storage pool can be shared by multiple single-instance Oracle Databases as shown in Figure 1-3. In this case, multiple databases share common disk groups. A shared Oracle ASM storage pool is achieved by using Oracle Clusterware. However, in such environments an Oracle RAC license is not required.

To share a disk group among multiple nodes, you must install Oracle Clusterware on all of the nodes, regardless of whether you install Oracle RAC on the nodes. Oracle ASM instances that are on separate nodes do not need to be part of an Oracle ASM cluster. However, if the Oracle ASM instances are not part of an Oracle ASM cluster, they cannot communicate with each other. Multiple nodes that are not part of an Oracle ASM cluster cannot share a disk group.

Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases

Description of Figure 1-3 follows
Description of "Figure 1-3 Oracle ASM Cluster with Single-Instance Oracle Databases"

https://docs.oracle.com/database/121/OSTMG/GUID-34A732CD-CC55-4A25-982A-209FDF6134BE.htm#OSTMG94053
https://docs.oracle.com/database/121/OSTMG/GUID-34A732CD-CC55-4A25-982A-209FDF6134BE.htm#OSTMG94053

Next

Grid Infrastructure And Oracle Database Installation

Pre-installation Tasks

Installing Grid Infrastructure 12c2 With Oracle Restart - Demo

Install Oracle 12c2 Software - Demo

Create An Oracle Database On ASM - Demo

Oracle Grid Infrastructure Postinstallation Tasks

Download and apply required patches for your software release

You are required to complete some configuration tasks after Oracle Grid Infrastructure is installed. In addition, Oracle recommends that you complete additional tasks immediately after installation. You must also complete product-specific configuration tasks before you use those products.

  • Downloading and Installing Patch Updates
    Download and install patch updates for your Oracle software after you complete installation.
Check the My Oracle Support website for required patch updates for your installation.
  1. Use a web browser to view the My Oracle Support website:

    https://support.oracle.com

  2. Log in to My Oracle Support website.

    Note:

    If you are not a My Oracle Support registered user, then click Register for My Oracle Support and register.

  3. On the main My Oracle Support page, click Patches & Updates.
  4. In the Patch Search region, select Product or Family (Advanced).
  5. On the Product or Family (Advanced) display, provide information about the product, release, and platform for which you want to obtain patches, and click Search.
    The Patch Search pane opens, displaying the results of your search.
  6. Select the patch number and click ReadMe.

    The README page is displayed. It contains information about the patch set and how to apply the patches to your installation.

  7. Use the unzip utility provided with the software to uncompress the Oracle patch updates that you downloaded from My Oracle Support. The unzip utility is located in the $ORACLE_HOME/bin directory.

Next

Tuning Semaphore Parameters

Oracle recommends that you refer to the operating system documentation for more information about setting semaphore parameters.

  1. Calculate the minimum total semaphore requirements using the following formula:2 * sum (process parameters of all database instances on the system) + overhead for background processes + system and other application requirements
  2. Set semmns (total semaphores systemwide) to this total.
  3. Set semmsl (semaphores for each set) to 250.
  4. Set semmni (total semaphores sets) to semmns divided by semmsl, rounded up to the nearest multiple of 1024.

Next

Creating a Backup of the root.sh Script

Be sure to back up the root.sh script after you complete the installation.

If you install other products in the same Oracle home directory subsequent to this installation, then Oracle Universal Installer updates the contents of the existing root.sh script during the installation. If you require information contained in the original root.sh script, then you can recover it from the backed up root.sh file.

Next

Downloading and Installing the ORAchk Health Check Tool

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwlin/creating-a-backup-of-the-root-sh-script.html

Download and install the ORAchk utility to perform proactive heath checks for the Oracle software stack.

ORAchk replaces the RACCheck utility. ORAchk extends health check coverage to the entire Oracle software stack, and identifies and addresses top issues reported by Oracle users. ORAchk proactively scans for known problems with Oracle products and deployments, including the following:

  • Standalone Oracle Database
  • Oracle Grid Infrastructure
  • Oracle Real Application Clusters
  • Maximum Availability Architecture (MAA) Validation
  • Upgrade Readiness Validations
  • Oracle Golden Gate

Oracle is continuing to expand checks, based on customer requests.

 

Oracle recommends that you download and run the latest version of ORAchk from My Oracle Support. For information about downloading, configuring and running ORAchk utility, refer to My Oracle Support note 1268927.2:

https://support.oracle.com/epmos/faces/DocContentDisplay?id=1268927.2&parent=DOCUMENTATION&sourceId=USERGUIDE

Next

Creating a Fast Recovery Area

During an Oracle Restart installation, you can create only one disk group. During an Oracle Clusterware installation, you can create multiple disk groups. If you plan to add an Oracle Database for a standalone server or an Oracle RAC database, then you should create the fast recovery area for database files.

About the Fast Recovery Area and the Fast Recovery Area Disk Group

The fast recovery area is a unified storage location for all Oracle Database files related to recovery. Enabling rapid backups for recent data can reduce requests to system administrators to retrieve backup tapes for recovery operations.

Database administrators can define the DB_RECOVERY_FILE_DEST parameter to the path for the fast recovery area to enable on disk backups and rapid recovery of data. When you enable fast recovery in the init.ora file, Oracle Database writes all RMAN backups, archive logs, control file automatic backups, and database copies to the fast recovery area. RMAN automatically manages files in the fast recovery area by deleting obsolete backups and archiving files no longer required for recovery.

Oracle recommends that you create a fast recovery area disk group. Oracle Clusterware files and Oracle Database files can be placed on the same disk group, and you can also place fast recovery files in the same disk group. However, Oracle recommends that you create a separate fast recovery disk group to reduce storage device contention.

The fast recovery area is enabled by setting the DB_RECOVERY_FILE_DEST parameter. The size of the fast recovery area is set with DB_RECOVERY_FILE_DEST_SIZE. As a general rule, the larger the fast recovery area, the more useful it becomes. For ease of use, Oracle recommends that you create a fast recovery area disk group on storage devices that can contain at least three days of recovery information. Ideally, the fast recovery area is large enough to hold a copy of all of your data files and control files, the online redo logs, and the archived redo log files needed to recover your database using the data file backups kept under your retention policy.

Multiple databases can use the same fast recovery area. For example, assume you have created a fast recovery area disk group on disks with 150 GB of storage, shared by 3 different databases. You can set the size of the fast recovery for each database depending on the importance of each database. For example, if database1 is your least important database, database2 is of greater importance, and database3 is of greatest importance, then you can set different DB_RECOVERY_FILE_DEST_SIZE settings for each database to meet your retention target for each database: 30 GB for database1, 50 GB for database2, and 70 GB for database3.

Creating the Fast Recovery Area Disk Group

Procedure to create the fast recovery area disk group.

  1. Go to the Grid_home/bin directory, and start Oracle ASM Configuration Assistant (ASMCA).

    For example:

    $ cd /u01/app/oracle/product/12.2.0/grid/bin
    $ ./asmca

    ASMCA opens at the Disk Groups tab.

  2. Click Create to create a new disk group.
    The Create Disk Groups window opens.
  3. Provide configuration information for the fast recovery area as prompted:

    In the Disk Group Name field, enter a descriptive name for the fast recovery area group. For example: FRA.

    In the Redundancy section, select the level of redundancy you want to use. For example: Normal

    In the Select Member Disks field, select eligible disks you want to add to the fast recovery area, and click OK.

    The Diskgroup Creation window opens and provides disk group creation status.

  4. When the Fast Recovery Area disk group creation is complete, click OK, and then click Exit.

Next

Setting Resource Limits for Oracle Clusterware and Associated Databases and Applications

Check and adjust the resource limits after you have installed Grid Infrastructure s in the Grid_home/crs/install/s_crsconfig_nodename_env.txt file.

The resource limits apply to all Oracle Clusterware processes and Oracle databases managed by Oracle Clusterware. For example, to set a higher number of processes limit, edit the file and set the CRS_LIMIT_NPROC parameter to a high value.
---
#Do not modify this file except as documented above or under the
#direction of Oracle Support Services.
#########################################################################
TZ=PST8PDT
NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
CRS_LIMIT_STACK=2048
CRS_LIMIT_OPENFILE=65536
CRS_LIMIT_NPROC=65536
TNS_ADMIN=

Next

Using the Correct LSNRCTL Commands

The listener should be running from the grid home and will be administered from there. The lsnrctl or srvctl commands can be used to  administer the listener.

Be sure to  set your $ORACLE_HOME environment variable to the path for the Oracle Grid Infrastructure home (Grid home).

If you have multiple oracle releases running on the same server, be sure the listener is running from the home of the higher release because the listener running from Oracle home locations for previous releases, will not work with the new release.

Next

Overview of ASM

Explain the Automatic Storage Management (ASM) architecture

Describe the components of ASM

Administering ASM Instances

It explains how to configure Oracle ASM instance parameters and how to set Oracle Database parameters for use with Oracle ASM. The chapter also describes Oracle ASM upgrading, patching, and authentication for Oracle ASM instance access. You can also use procedures in this chapter to migrate a database to use Oracle ASM.

Administering an Oracle ASM instance is similar to administering an Oracle Database instance, but the process requires fewer procedures. You can use Oracle ASM Command Line Utility (ASMCMD) command-line interface, Oracle ASM Configuration Assistant (ASMCA), and SQL*Plus to perform Oracle ASM instance administration tasks.

This chapter contains the following topics:

 

Next

Explain and apply initialization parameters for ASM instances

Manage ASM instances and associated processes

Monitor ASM instances using the V$ASM dynamic performance views

Common ASM Views

 

Viewing disk group attributes with V$ASM_ATTRIBUTE

SELECT SUBSTR(dg.name,1,12) AS diskgroup, SUBSTR(a.name,1,24) AS name,

SUBSTR(a.value,1,24) AS value, read_only FROM V$ASM_DISKGROUP dg,

V$ASM_ATTRIBUTE a WHERE dg.name = 'DATA' AND dg.group_number = a.group_number

AND a.name NOT LIKE '%template%';

 

Viewing the compatibility of a disk group with V$ASM_DISKGROUP

SELECT name AS diskgroup, substr(compatibility,1,12) AS asm_compat,

substr(database_compatibility,1,12) AS db_compat FROM V$ASM_DISKGROUP;

 

 

Viewing disks in disk groups with V$ASM_DISK

SELECT SUBSTR(dg.name,1,16) AS diskgroup, SUBSTR(d.name,1,16) AS asmdisk,

d.mount_status, d.state, SUBSTR(d.failgroup,1,16) AS failgroup

FROM V$ASM_DISKGROUP dg, V$ASM_DISK d WHERE dg.group_number = d.group_number;

DISKGROUP ASMDISK MOUNT_S STATE FAILGROUP

 

Viewing disk group clients with V$ASM_CLIENT

SELECT dg.name AS diskgroup, SUBSTR(c.instance_name,1,12) AS instance,

SUBSTR(c.db_name,1,12) AS dbname, SUBSTR(c.SOFTWARE_VERSION,1,12) AS software,

SUBSTR(c.COMPATIBLE_VERSION,1,12) AS compatible

FROM V$ASM_DISKGROUP dg, V$ASM_CLIENT c

WHERE dg.group_number = c.group_number;

 

Viewing Oracle ASM File Access Control information with V$ASM_USER

SELECT dg.name AS diskgroup, u.group_number, u.user_number, u.os_id, u.os_name

FROM V$ASM_DISKGROUP dg, V$ASM_USER u

WHERE dg.group_number = u.group_number AND dg.name = 'DATA';

 

Viewing File Access Control information with V$ASM_USERGROUP

SELECT dg.name AS diskgroup, ug.group_number, ug.owner_number, u.os_name,

ug.usergroup_number, ug.name FROM V$ASM_DISKGROUP dg, V$ASM_USER u, V$ASM_USERGROUP ug

WHERE dg.group_number = ug.group_number AND dg.name = 'DATA'

AND ug.owner_number = u.user_number;

 

Viewing File Access Control information with V$ASM_USERGROUP_MEMBER

SELECT dg.name AS diskgroup, um.group_number, um.member_number, u.os_name,

um.usergroup_number, ug.name FROM V$ASM_DISKGROUP dg, V$ASM_USER u, V$ASM_USERGROUP_MEMBER um,

V$ASM_USERGROUP ug WHERE dg.group_number = um.group_number AND

dg.group_number = ug.group_number AND dg.group_number = u.group_number AND dg.name = 'DATA'

AND um.member_number = u.user_number AND um.usergroup_number = ug.usergroup_number;

 

 

Viewing Oracle ASM File Access Control information with V$ASM_FILE

SELECT dg.name AS diskgroup, a.name, f.permissions, f.user_number, u.os_name,

f.usergroup_number, ug.name

FROM V$ASM_DISKGROUP dg, V$ASM_USER u, V$ASM_USERGROUP ug, V$ASM_FILE f, V$ASM_ALIAS a

WHERE dg.name = 'FRA' AND dg.group_number = u.group_number AND

u.group_number = ug.group_number AND ug.group_number = f.group_number AND

f.group_number = a.group_number AND

f.usergroup_number = ug.usergroup_number AND f.user_number = u.user_number AND

f.file_number = a.file_number;

 

 

Viewing Intelligent Data Placement information with V$ASM_FILE

SELECT dg.name AS diskgroup, f.file_number, f.primary_region, f.mirror_region, f.hot_reads,

f.hot_writes, f.cold_reads, f.cold_writes

FROM V$ASM_DISKGROUP dg, V$ASM_FILE f

WHERE dg.group_number = f.group_number and dg.name = 'DATA';

 

 

Viewing Intelligent Data Placement information with V$ASM_TEMPLATE

SELECT dg.name AS diskgroup, t.name, t.stripe, t.redundancy, t.primary_region, t.mirror_region

FROM V$ASM_DISKGROUP dg, V$ASM_TEMPLATE t

WHERE dg.group_number = t.group_number and dg.name = 'DATA' ORDER BY t.name;

 

 

 

Next

Administering ASM Disk Groups

Create and delete ASM disk groups

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/ostmg/diskgroup-compatibility.html#GUID-AE540604-92D9-4CFE-A40E-BF4486163772

This information includes how to create, alter, drop, mount, and dismount Oracle ASM disk groups. The database instances that use Oracle ASM can continue operating while you administer disk groups.

The examples in this chapter use SQL statements. These examples assume that SQL*Plus is run from the Oracle grid home where Oracle ASM is installed and the Oracle environmental variables are set to this home. The examples also assume that the Oracle ASM instance is running.

You can use the CREATE DISKGROUP SQL statement to create a disk group.

This section contains the following topics:

  • Using the CREATE DISKGROUP SQL Statement
  • Creating Disk Groups for Data and Fast Recovery Area
  • Creating Disk Groups for a New Oracle Installation
  • Specifying the Logical and Physical Sector Size
  • Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups

Using the CREATE DISKGROUP SQL Statement

You can use CREATE DISKGROUP SQL statement to create disk groups.

When creating a disk group, you:

  • Assign a unique name to the disk group.The specified disk group name is not case sensitive and is always converted to uppercase when stored internally.

    Oracle does not recommend using identifiers for Oracle Database object names that must be quoted. While the use of quoted identifiers may be valid as names in a SQL statement, such as CREATE DISKGROUP "1DATA", the names may not be valid when using other tools that manage the object. For more information about naming Oracle Database objects, refer to Oracle Database SQL Language Reference.

  • Specify the redundancy level of the disk group.For Oracle ASM to mirror files, specify a redundancy level such as NORMAL REDUNDANCY (two-way mirroring by default for most file types), HIGH REDUNDANCY (three-way mirroring for all files), FLEX REDUNDANCY, or EXTENDED REDUNDANCY.Specify EXTERNAL REDUNDANCY if you do not want mirroring by Oracle ASM. For example, you might choose EXTERNAL REDUNDANCY to use storage array protection features.After a disk group is created with NORMAL or HIGH redundancy, you can migrate the disk group to a FLEX redundancy disk group with the CONVERT REDUNDANCY TO FLEX clause of the ALTER DISKGROUP SQL statement. You cannot migrate an EXTERNAL disk group to a FLEX redundancy disk group. When migrating to a flex disk group, the disk group must have a minimum of three failure groups and must be mounted in restricted mode (MOUNTED RESTRICTED) for the duration of the migration.To change the redundancy level for NORMAL, HIGH, or EXTERNAL disk groups to a NORMAL, HIGH, or EXTERNAL, you must create another disk group with the appropriate redundancy and then move the files to the new disk group.For FLEX and EXTENDED redundancy disk groups, the disk group redundancy cannot be changed. However, the redundancy of the files in the disk group can be changed by modifying the REDUNDANCY property of the respective file group.
  • Specify the disks that are to be formatted as Oracle ASM disks belonging to the disk group.The disks can be specified using operating system dependent wildcard characters in search strings that Oracle ASM then uses to find the disks. You can specify names for the disks with the NAME clause or use the system-generated names.
  • Optionally specify the disks as belonging to specific failure groups.You must create failure groups of equal size to maintain space balance and even distribution of mirror data.
  • Optionally specify the type of failure group, such as QUORUM or REGULAR.
  • Optionally specify disk group attributes, such as software compatibility or allocation unit size.

All disks in the disk group must be of equal size. Oracle ASM programmatically determines the size of each disk. If for some reason the size cannot be determined, or to restrict the amount of space used on a disk, you can specify a SIZE clause for a disk; however, the same size value must be specified for every disk in the disk group.

Oracle ASM creates operating system–independent names for the disks in a disk group that you can use to reference the disks in other SQL statements. Optionally, you can provide your own name for a disk using the NAME clause. Disk names are available in the V$ASM_DISK view.

You can use the ASMCMD stamp command to provision disks for Oracle ASM before creating a disk group that uses them. If a disk is provisioned, then the disk name, failure group, and site information are specified at the time the disk is provisioned and do not need to be specified when the disk group is created.

Note:

A disk cannot belong to multiple disk groups.

The Oracle ASM instance ensures that any disk in a newly created disk group is addressable and is not currently a member of another disk group. You must use FORCE only when adding a disk that was dropped with FORCE. If a disk is dropped with NOFORCE, then you can add it with NOFORCE. For example, a disk might have failed and was dropped from its disk group. After the disk is repaired, it is no longer part of any disk group, but Oracle ASM still recognizes that the disk had been a member of a disk group. You must use the FORCE flag to include the disk in a new disk group. In addition, the disk must be addressable. Otherwise, the operation fails.

Note:

Use caution when using the FORCE option to add a previously used disk to a disk group; you might cause another disk group to become unusable.

The CREATE DISKGROUP statement mounts the disk group for the first time, and adds the disk group name to the ASM_DISKGROUPS initialization parameter if a server parameter file is being used. If a text initialization parameter file is being used and you want the disk group to be automatically mounted at instance startup, then you must remember to add the disk group name to the ASM_DISKGROUPS initialization parameter before you shut down and restart the Oracle ASM instance. You can also create disk groups with Oracle ASM Configuration Assistant (ASMCA) and the ASMCMD mkdg command.

See Also:

  • Managing Oracle ASM Flex Disk Groups for information about flex disk groups and file groups
  • Mirroring, Redundancy, and Failure Group Options and Understanding Oracle ASM Concepts for information about redundancy levels and failure groups
  • Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups for information about QUORUM and REGULARfailure groups
  • stamp for information about the ASMCMD stamp command
  • Managing Disk Groups with ASMCA for information about creating disk groups with Oracle ASM Configuration Assistant (ASMCA)
  • mkdg for information about creating disk groups with the ASMCMD mkdg command
  • Oracle Database SQL Language Reference for information about the CREATE DISKGROUP SQL statement

Creating Disk Groups for Data and Fast Recovery Area

You can create a disk group for data and another disk group for the fast recovery area.

The SQL statement in Example 4-1 creates a disk group named data with normal redundancy consisting of two failure groups controller1 or controller2 with four disks in each failure group. The data disk group is typically used to store database data files.

The example assumes that the ASM_DISKSTRING initialization parameter is set to the '/devices/*' string. Oracle ASM disk discovery identifies diska1 through diska4 and diskb1 through diskb4 in the /devices directory.

In Example 4-1, the NAME clauses enable you to explicitly assign names to the disks rather than the default system-generated names. The system-generated names are in the form diskgroup_nnnn, where nnnn is the disk number for the disk in the disk group.

When creating the disk group in Example 4-1, the values of following disk group attributes were explicitly set:

  • AU_SIZESpecifies the size of the allocation unit for the disk group.You can view the value of the AU_SIZE disk group attribute in the ALLOCATION_UNIT_SIZE column of the V$ASM_DISKGROUP view.
  • COMPATIBLE.ASMDetermines the minimum software version for any Oracle ASM instance that uses a disk group.
  • COMPATIBLE.RDBMSDetermines the minimum software version for any database instance that uses a disk group.
  • COMPATIBLE.ADVMDetermines whether the disk group can contain Oracle ADVM volumes.

In Example 4-2, the fra disk group (typically created for the fast recovery area) is created with the default disk group attribute values. Names are not specified for the Oracle ASM disks and failure groups are not explicitly specified. This example assumes that diskc1through diskc9 are present in the /devices directory.

Example 4-1 Creating the DATA disk group

CREATE DISKGROUP data NORMAL REDUNDANCY
  FAILGROUP controller1 DISK
    '/devices/diska1' NAME diska1,
    '/devices/diska2' NAME diska2,
    '/devices/diska3' NAME diska3,
    '/devices/diska4' NAME diska4
  FAILGROUP controller2 DISK
    '/devices/diskb1' NAME diskb1,
    '/devices/diskb2' NAME diskb2,
    '/devices/diskb3' NAME diskb3,
    '/devices/diskb4' NAME diskb4
  ATTRIBUTE 'au_size'='4M',
    'compatible.asm' = '11.2', 
    'compatible.rdbms' = '11.2',
    'compatible.advm' = '11.2';

Example 4-2 Creating the FRA disk group

CREATE DISKGROUP fra NORMAL REDUNDANCY
  DISK '/devices/diskc*';

See Also:

  • Administering Oracle ASM Filter Driver for information about the disk name format when using Oracle ASM Filter Driver
  • About Oracle ASM Allocation Units for information about allocation units
  • COMPATIBLE.ASM for information about the COMPATIBLE.ASM attribute
  • COMPATIBLE.RDBMS for information about the COMPATIBLE.RDBMS attribute
  • COMPATIBLE.ADVM for information about the COMPATIBLE.ADVM attribute

Creating Disk Groups for a New Oracle Installation

This topic describes the basic procedure for creating disk groups during a new installation of Oracle Grid Infrastructure standalone (Oracle Restart) option and Oracle Database.

The procedure described in this topic for a new installation of Oracle Grid Infrastructure standalone (Oracle Restart) assumes that a disk group is configured for storing the database data files and a disk group is configured for storing the fast recovery area files.

Note:

In Oracle Grid Infrastructure for cluster configurations, the Oracle Cluster Registry (OCR) and voting files should be stored on their own disk group. However, if only two disk groups are created for the Oracle ASM installation, then store the OCR and voting files in the disk group that contains the database data files.

  1. Install Oracle Restart with OUI, following the screen prompts.During the installation, create a disk group (data) for storing database data files and control files.This OUI disk group creation process is similar to creating a disk group with Oracle ASM Configuration Assistant (ASMCA). Detailed information about installation with Oracle Universal Installer (OUI) and database creation with Database Configuration Assistant (DBCA) is available in the installation guides for your specific operating system.
  2. After the Oracle Grid Infrastructure is installed, use ASMCA to create a disk group (fra) for storing the fast recovery area files.You can also create the fra disk group with SQL*Plus or ASMCMD commands run from the Oracle Grid Infrastructure home.
  3. Install the Oracle Database software with OUI, following the screen prompts.
  4. After the database software has been installed, run DBCA to create a database, following the screen prompts.During the creation of the database, make the appropriate selections to use Oracle ASM for storage of data files and fast recovery area files. When prompted:
    • Store database data files in the data disk group
    • Store fast recovery area files in the fra disk group

See Also:

  • Managing Disk Groups with ASMCA for information about using ASMCA to create or alter disk groups
  • Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups for information about storing Oracle Cluster Registry (OCR) and voting files
  • Using the CREATE DISKGROUP SQL Statement for information about creating a disk group with SQL*Plus
  • mkdg for information about creating a disk group with ASMCMD
  • Oracle Database Backup and Recovery User’s Guide for information about configuring the fast recovery area
  • Oracle Database Administrator’s Guide for information about specifying a fast recovery area
  • Oracle Grid Infrastructure Installation and Upgrade Guide for your operating system for detailed information about installation of Oracle Grid Infrastructure and Oracle Restart
  • Oracle Database Installation Guide for your operating system for detailed information about installation of an Oracle Database

Specifying the Logical and Physical Sector Size

You can use the optional LOGICAL_SECTOR_SIZE and SECTOR_SIZE disk group attributes with the CREATE DISKGROUP and ALTER DISKGROUP SQL statements to specify a logical sector size and physical sector size for a disk group.

Note:

To specify the logical and physical sector size, the disks must support sector size emulation.

The SECTOR_SIZE disk group attribute can be set to 512, 4096, or 4K if the disks support those values. The default value is platform dependent. The COMPATIBLE.ASM and COMPATIBLE.RDBMS disk group attributes must be set to 11.2 or higher to enable the setting of a value for the sector size during disk group creation. The COMPATIBLE.ASM disk group attribute must be set to 12.2 or higher to alter the sector size.

The LOGICAL_SECTOR_SIZE disk group attribute can explicitly set the logical sector size of the disk group instead of the size that is estimated from the disks that join the disk group. The LOGICAL_SECTOR_SIZE disk group attribute can be set to 512, 4096, or 4K. The value specifies the smallest possible I/O that the disk group can accept, and also limits what types of disks can join the disk group. The COMPATIBLE.ASM disk group attribute must be set to 12.2 or higher to set the logical sector size during creation of a disk group or alter the size of a disk group that has been created.

Table 4-1 lists the possible valid combinations of the logical sector size and sector size disk group attributes during disk group creation for disk sizes and types. The first column describes the user-specified values for logical sector size and sector size attributes during disk group creation. NS indicates that the no value was specified.

The top row of the table describes the combination of the disks used. A 512 native sector size disk has sector size equal to logical sector size equal to 512. The 512 native and 512 emulated heading describes the combination of 512 native disks and 512 emulated disk. The 512 emulated disk has a 4 k physical sector size and a 512 logical sector size. The values in each of the table cells represents the final value of sector sizes of the disk group. Error indicates that the disk group creation fails and an error message is displayed.

Table 4-1 Possible combinations of sector size and logical sector size by disk size and type

SECTOR_SIZE/LOGICAL_SECTOR_SIZE specified at disk group creation 512 native disks 512 emulated disks 4K native disks 512 native disks + 512 emulated disks 512 emulated disks + 4K native disks
4K / 4K Error 4K / 4K 4K / 4K Error 4K / 4K
NS / 4K Error 4K / 4K 4K / 4K Error 4K / 4K
4K / 512 Error 4K / 512 Error Error Error
512 / 512 512 / 512 512 / 512 Error 512 / 512 Error
512 / NS 512 / 512 512 / 512 Error 512 / 512 Error
4K / NS Error 4K / 512 4K / 4K Error 4K / 4K
NS / 512 512 / 512 512 / 512 Error 512 / 512 Error
NS / NS 512 / 512 512 / 512 4K / 4K 512 / 512 4K / 4K

You can determine the logical sector and sector size values that have either been assumed or explicitly set for a successful disk group creation by querying V$ASM views or running ASMCMD commands. The LOGICAL_SECTOR_SIZE and SECTOR_SIZE columns are included in the V$ASM_DISKGROUP and V$ASM_ATTRIBUTE views to display the values. These columns represent the logical sector size and sector size values of the disk group in bytes. The ASMCMD lsdg also displays the values of the logical sector size and sector size for the disk group. In addition, the disk group attributes are displayed with the V$ASM_ATTRIBUTE view and the ASMCMD lsattr command. For example:

SQL> SELECT name, value FROM V$ASM_ATTRIBUTE 
     WHERE (name = 'sector_size' OR name = 'logical_sector_size') AND group_number = 1;
NAME                          VALUE
----------------------------- ---------------------------
sector_size                   4096
logical_sector_size           512

SQL> SELECT logical_sector_size, sector_size FROM V$ASM_DISKGROUP 
     WHERE group_number = 1;
LOGICAL_SECTOR_SIZE SECTOR_SIZE
------------------- -----------
                512        4096

As shown in Example 4-3, you can use the LOGICAL_SECTOR_SIZE and SECTOR_SIZE disk group attributes with the CREATEDISKGROUP and ALTER DISKGROUP SQL statements to specify the logical and physical sector size of the Oracle ASM disk group.

The following notes apply to the logical sector size and sector size disk group attributes.

  • During the migration process from 512 bytes to 4096 bytes, password files stored on an Oracle ASM disk group do not need to be migrated or recreated. The password files are a special case and retain their 512 byte block size, even after the new sector sizes are 4096 bytes.
  • If the value of the LOGICAL_SECTOR_SIZE column is 512, while the value in the SECTOR_SIZE column is 4096, then the disk group supports 512 sector size emulation. This means that I/O operations can be both 512 or 4096 in size. For example, we can have redo log files with a file block size of 512 bytes in the disk group that can be both read and written to, as well as creating new redo log files with a file block size of 4096 bytes.
  • The physical sector size (SECTOR_SIZE) cannot be smaller than the logical sector size (LOGICAL_SECTOR_SIZE) in an Oracle ASM disk group.
  • Not all disks support all of the possible SECTOR_SIZE values. The sector size attribute setting must be compatible with the physical hardware.

Example 4-3 Specifying logical and sector sizes for disks in a disk group

CREATE DISKGROUP data NORMAL REDUNDANCY
  FAILGROUP controller1 DISK
    '/devices/diska1',
    '/devices/diska2',
    '/devices/diska3',
    '/devices/diska4'
  FAILGROUP controller2 DISK
    '/devices/diskb1',
    '/devices/diskb2',
    '/devices/diskb3',
    '/devices/diskb4'
  QUORUM FAILGROUP quorum_failgrp DISK '/devices/diskc1'
  ATTRIBUTE 'compatible.asm' = '12.2', 'compatible.rdbms' = '12.2',
            'sector_size'='4096', 'logical_sector_size'='512';

ALTER DISKGROUP data2  
  SET ATTRIBUTE 'compatible.asm' = '12.2', 'compatible.rdbms' = '12.2';

ALTER DISKGROUP data2
  SET ATTRIBUTE 'sector_size'='4096', 'logical_sector_size'='4096';

See Also:

  • Oracle Database SQL Language Reference for information about the disk group attributes and the CREATE DISKGROUP SQL statement
  • Oracle Database SQL Language Reference for information about the BLOCKSIZE keyword
  • Oracle Database Reference for details about the V$ASM_ATTRIBUTE , V$ASM_DISK, and V$ASM_DISKGROUP views
  • ASMCMD Disk Group Management Commands for information about ASMCMD disk group management commands

Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups

You can store Oracle Cluster Registry (OCR) and voting files in Oracle ASM disk groups.

You can also store a backup of the OCR file in a disk group. Voting files and OCR are two important components of Oracle Clusterware. Voting files manage information about node membership. OCR manages cluster and Oracle Real Application Clusters (Oracle RAC) database configuration information.

A quorum failure group is a special type of failure group that does not contain user data. Quorum failure groups are used for storing Oracle ASM metadata. A quorum failure group may also contain voting files if those files are stored in a disk group that contains a quorum failure group. Additionally, Oracle ASM uses a quorum failure group to help determine if the disk group can be mounted in the event of the loss of one or more failure groups.

Because disks in quorum failure groups do not contain user data, a quorum failure group is not considered when determining redundancy requirements in respect to storing user data.

You can manage and monitor OCR and voting files with CRSCTL and ocrconfig command-line tools, CREATE and ALTERDISKGROUP SQL statements, and V$ASM views.

The CRSCTL and ocrconfig commands enable the placement of OCR storage and Cluster Synchronization Services (CSS) voting files inside the disk groups managed by Oracle ASM.

The QUORUM and REGULAR keywords in CREATE and ALTER DISKGROUP SQL statements enable the specification of an additional qualifier for failure groups or disks when creating or altering a disk group. Note that QUORUM disks (or disks in QUORUMfailure groups) cannot contain user data, while REGULAR disks (or disks in non-quorum failure groups) do not have this restriction.

You can use these keywords before the keyword FAILGROUP if a failure group is being explicitly specified. If the failure group is implicitly implied, you can use these keywords (QUORUM/REGULAR) before the keyword DISK. When failure groups are explicitly specified, it is an error to specify these keywords (QUORUM/REGULAR) immediately before the keyword DISK. REGULAR is the default failure group type.

When performing operations on existing disks or failure groups, the qualifier specified in the SQL must match the qualifier that was specified when the disks or failure groups were added to the disk group.

Example 4-4 shows the creation of a disk group with a QUORUM failure group. For Oracle Clusterware files a minimum of three disk devices or three failure groups is required with a normal redundancy disk group. A QUORUM failure group is not considered when determining redundancy requirements in respect to storing user data. The COMPATIBLE.ASM disk group compatibility attribute must be set to 11.2 or greater to store OCR or voting files in a disk group.

The FAILGROUP_TYPE column in the V$ASM_DISK or V$ASM_DISK_STAT views specifies the failure group type. The value for this column is REGULAR for regular failure groups and QUORUM for quorum failure groups. The VOTING_FILE column in the V$ASM_DISK or V$ASM_DISK_STAT views specifies whether a disk contains a voting file. The value for this column is either Y if the disk contains a voting file or N if not. The value of USABLE_FILE_MB in V$ASM_DISKGROUP or V$ASM_DISKGROUP_STATdoes not consider any free space that is present in QUORUM disks because that space is not available for client data files.

Example 4-4 Using the QUORUM keyword when creating a failure group

CREATE DISKGROUP mgmt_dg NORMAL REDUNDANCY
   FAILGROUP fg1 DISK '/devices/diskg1'
   FAILGROUP fg2 DISK '/devices/diskg2'
   QUORUM FAILGROUP fg3 DISK '/devices/diskg3'
   ATTRIBUTE 'compatible.asm' = '12.2.0.0.0';

See Also:

  • Oracle ASM Failure Groups for information about failure groups
  • Views Containing Oracle ASM Disk Group Information for information about V$ASM views
  • Oracle Grid Infrastructure Installation and Upgrade Guide for information about configuring voting files and Oracle Cluster Registry (OCR)
  • Oracle Clusterware Administration and Deployment Guide for information about managing Oracle Cluster Registry and voting files
  • Oracle Database SQL Language Reference for information about the CREATE DISKGROUP and ALTER DISKGROUP SQL statements
  • Oracle Database Reference for details about the V$ASM* dynamic performance views

Altering Disk Groups

You can alter a disk group with SQL*Plus, ASMCA, or ASMCMD commands.

You can use the ALTER DISKGROUP SQL statement to alter a disk group configuration. You can also alter a disk group configuration with Oracle ASM Configuration Assistant (ASMCA) and the ASMCMD chdg command.

You can add, resize, or drop disks while the database remains online. Whenever possible, multiple operations in a single ALTERDISKGROUP statement are recommended. Grouping operations in a single ALTER DISKGROUP statement can reduce rebalancing operations.

Oracle ASM automatically rebalances when the configuration of a disk group changes. By default, the ALTER DISKGROUP statement does not wait until the operation is complete before returning. Query the V$ASM_OPERATION view to monitor the status of this operation.

Use the REBALANCE WAIT clause to cause the ALTER DISKGROUP statement processing to wait until the rebalance operation is complete before returning. This is especially useful in scripts. The statement also accepts a REBALANCE NOWAIT clause that invokes the default behavior of conducting the rebalance operation asynchronously in the background.

You can interrupt a rebalance running in wait mode by typing CTRL+C on most platforms. This causes the statement to return immediately with the message ORA-01013: user requested cancel of current operation, and then to continue the operation asynchronously. Typing CTRL+C does not cancel the rebalance operation or any disk add, drop, or resize operations.

To control the speed and resource consumption of the rebalance operation, you can include the REBALANCE POWER clause in statements that add, drop, or resize disks.

The following topics are discussed:

  • Managing Oracle ADVM Volumes in a Disk Group
  • Adding Disks to a Disk Group
  • Using the ALTER DISKGROUP SQL Statement to Add Disks to a Disk Group
  • Replacing Disks in Disk Groups
  • Renaming Disks in Disk Groups
  • Dropping Disks from Disk Groups
  • Intelligent Data Placement
  • Resizing Disks in Disk Groups
  • Undropping Disks in Disk Groups
  • Manually Rebalancing Disk Groups
  • Tuning Rebalance Operations
  • Scrubbing Disk Groups

See Also:

  • Managing Disk Groups with ASMCA for information about altering a disk group configuration with Oracle ASM Configuration Assistant (ASMCA)
  • chdg for information about altering a disk group configuration with ASMCMD chdg
  • Manually Rebalancing Disk Groups for more information about the REBALANCE POWER clause
  • Oracle Database SQL Language Reference for information about the ALTER DISKGROUP SQL statement

 

Managing Oracle ADVM Volumes in a Disk Group

You can create an Oracle ASM Dynamic Volume Manager (Oracle ADVM) volume in a disk group.

The volume device associated with the dynamic volume can be used to host an Oracle ACFS file system.

The compatibility attributes COMPATIBLE.ASM and COMPATIBLE.ADVM must be set to 11.2 or higher for the disk group.

The ALTER DISKGROUP VOLUME SQL statements enable you to manage Oracle ADVM volumes, including the functionality to add, modify, resize, disable, enable, and drop volumes. The following are examples of the ALTER DISKGROUP VOLUME statement.

If the volume is hosting an Oracle ACFS file system, then you cannot resize that volume with the SQL ALTER DISKGROUP statement. You must use the acfsutil size command instead.

Example 4-5 Managing volumes with ALTER DISKGROUP VOLUME statements

SQL> ALTER DISKGROUP data ADD VOLUME volume1 SIZE 10G;
Diskgroup altered.

SQL> ALTER DISKGROUP data RESIZE VOLUME volume1 SIZE 15G;
Diskgroup altered.

SQL> ALTER DISKGROUP data DISABLE VOLUME volume1;
Diskgroup altered.

SQL> ALTER DISKGROUP data ENABLE VOLUME volume1;
Diskgroup altered.

SQL> ALTER DISKGROUP ALL DISABLE VOLUME ALL;
Diskgroup altered.

SQL> ALTER DISKGROUP data DROP VOLUME volume1;
Diskgroup altered.

See Also:

  • Disk Group Compatibility Attributes for information about disk group compatibility attributes
  • acfsutil size for information about the resizing a volume with acfsutil size
  • Overview of Oracle ASM Dynamic Volume Manager for information about Oracle ADVM
  • Managing Oracle ADVM with ASMCMD for information about managing Oracle ADVM volumes with ASMCMD
  • ASMCA GUI Tool for Managing Oracle ACFS and Oracle ADVM for information about managing Oracle ADVM volumes with ASMCA
  • Oracle Database SQL Language Reference for information about the ALTER DISKGROUP SQL statement

 

Adding Disks to a Disk Group

You can use the ADD clause of the ALTER DISKGROUP statement to add a disk or a failure group to a disk group.

You can use the same syntax with the ALTER DISKGROUP statement that you use to add a disk or failure group with the CREATEDISKGROUP statement. After you add new disks, the new disks gradually begin to accommodate their share of the workload as rebalancing progresses.

When adding a disk, the disk must be the same size as the other disks in the disk group.

See Also:

  • Example 4-1 for an example of the CREATE DISKGROUP SQL statement
  • Using the ALTER DISKGROUP SQL Statement to Add Disks to a Disk Group for an example of using SQL statements to add disks to a disk group
  • Managing Disk Groups with ASMCA for information about adding disks to a disk group with ASMCA
  • Oracle Database SQL Language Reference for information about the ALTER DISKGROUP SQL statement

 

Using the ALTER DISKGROUP SQL Statement to Add Disks to a Disk Group

The SQL statements presented in the following example demonstrate the interactions of disk discovery with the ADD DISK operation.

Assume that disk discovery identifies the following disks in directory /devices:

/devices/diska1 -- member of data1
/devices/diska2 -- member of data1
/devices/diska3 -- member of data1
/devices/diska4 -- member of data1
/devices/diska5 -- candidate disk
/devices/diska6 -- candidate disk
/devices/diska7 -- candidate disk
/devices/diska8 -- candidate disk

/devices/diskb1 -- member of data1
/devices/diskb2 -- member of data1
/devices/diskb3 -- member of data1
/devices/diskb4 -- member of data2

/devices/diskc1 -- member of data2
/devices/diskc2 -- member of data2
/devices/diskc3 -- member of data3
/devices/diskc4 -- candidate disk

/devices/diskd1 -- candidate disk
/devices/diskd2 -- candidate disk
/devices/diskd3 -- candidate disk
/devices/diskd4 -- candidate disk
/devices/diskd5 -- candidate disk
/devices/diskd6 -- candidate disk
/devices/diskd7 -- candidate disk
/devices/diskd8 -- candidate disk

You can query the V$ASM_DISK view to display the status of Oracle ASM disks. See "Views Containing Oracle ASM Disk Group Information".

The following statement would fail because /devices/diska1 through /devices/diska4 currently belong to the disk group data1.

ALTER DISKGROUP data1 ADD DISK
     '/devices/diska*';

The following statement successfully adds disks /devices/diska5 through /devices/diska8 to data1. Because no FAILGROUP clauses are included in the ALTER DISKGROUP statement, each disk is assigned to its own failure group. The NAMEclauses assign names to the disks, otherwise they would have been assigned system-generated names.

ALTER DISKGROUP data1 ADD DISK
     '/devices/diska5' NAME diska5,
     '/devices/diska6' NAME diska6,
     '/devices/diska7' NAME diska7,
     '/devices/diska8' NAME diska8;

The following statement would fail because the search string matches disks that are contained in other disk groups. Specifically, /devices/diska4 belongs to disk group data1 and /devices/diskb4 belongs to disk group data2.

ALTER DISKGROUP data1 ADD DISK
     '/devices/disk*4';

The following statement would successfully add /devices/diskd1 through /devices/diskd8 to disk group data1. This statement runs with a rebalance power of 5, and does not return until the rebalance operation is complete.

ALTER DISKGROUP data1 ADD DISK
      '/devices/diskd*'
       REBALANCE POWER 5 WAIT;

If /devices/diskc3 was previously a member of a disk group that no longer exists, then you could use the FORCE option to add the disk as a member of another disk group. For example, the following use of the FORCE clause enables /devices/diskc3 to be added to data2, even though it is a current member of data3. For this statement to succeed, data3 cannot be mounted.

ALTER DISKGROUP data2 ADD DISK
     '/devices/diskc3' FORCE;

 

Replacing Disks in Disk Groups

A disk or multiple disks in a disk group can be replaced, rather than dropped and added back.

The single replace operation is more efficient than dropping and adding disks. This operation is especially useful when disks are missing or damaged.

For example, you can issue the following statement to replace the diskc7 disk with another disk identified by the /devices/diskc18 path.

SQL> ALTER DISKGROUP data2 REPLACE DISK diskc7 WITH '/devices/diskc18' POWER 3;

The power option operates the same as the power option for the ALTER DISKGROUP REBALANCE statement, except that the power option cannot be set to 0.

The ALTER DISKGROUP SQL statement with the REPLACE clause includes a WAIT or NOWAIT option, plus the FORCE option.

Note:

  • Manually Rebalancing Disk Groups for information about the power option in rebalancing a disk group
  • ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initialization parameter

 

Renaming Disks in Disk Groups

You can rename a disk in a disk group with the ALTER DISKGROUP RENAME DISK SQL statement.

Note:

You can only use the RENAME DISK operation when the disk group that contains the disk is in the MOUNT RESTRICTEDstate. If any disks in the disk group are offline, then the RENAME operation fails. If the new disk name exists, then the RENAME operation fails. You must have SYSASM privileges to rename a disk.

In one SQL statement, you can rename one or multiple disks, or rename all disks in a disk group using the RENAME DISKS ALLclause.

For example, you can rename disks as follows:

SQL> ALTER DISKGROUP fra2 MOUNT RESTRICTED;

SQL> ALTER DISKGROUP fra2 RENAME DISK 'FRA1_0001' TO 'FRA2_0001', 
       'FRA1_0002' TO 'FRA2_0002';

For NORMAL, HIGH, and FLEX redundancy disk groups, you can associate a site name using ALTER DISKGROUP RENAME DISKwith the SITE clause. For example:

SQL> ALTER DISKGROUP data1 RENAME DISK 'DATA1_0001' SITE SITE1;

For information about data sites, extended disk groups, and preferred read for disks, refer to About Oracle ASM Extended Disk Groupsand PREFERRED_READ.ENABLED. For information about the ASMCMD stamp command, refer to stamp.

For an EXTERNAL redundancy disk group, you can use ALTER DISKGROUP RENAME DISK with the FAILGROUP clause to specify a failure group for a disk. For example:

SQL> ALTER DISKGROUP external1 RENAME DISK 'EXTERNAL1_0001' FAILGROUP FG_EXT1_0001;

The SITE and FAILGROUP clauses cannot be used together in the same SQL ALTER DISKGROUP RENAME statement.

The ALTER DISKGROUP diskgroupname RENAME DISKS ALL statement can be run after the renamedg utility to change the names of the disks in the renamed disk group. For information about renamedg, refer to Renaming Disks Groups.

When you run the ALTER DISKGROUP diskgroupname RENAME DISKS ALL statement, any disk name that is not in the format diskgroupname_number is renamed to that format. Disk names that are already in the diskgroupname_number format are not changed.

Note:

If a disk is labeled by any subsystem; such as ASMLIB, ASMFD, EXADATA, or ASMTOOL; then that label becomes the disk name by design. The ALTER DISKGROUP RENAME DISKS SQL statement on these subsystems has no effect and the disk is not renamed.

 

Dropping Disks from Disk Groups

You can drop disks from a disk group with the DROP DISK clause of the ALTER DISKGROUP statement.

You can also drop all of the disks in specified failure groups using the DROP DISKS IN FAILGROUP clause.

When a disk is dropped, the disk group is rebalanced by moving all of the file extents from the dropped disk to other disks in the disk group. A drop disk operation might fail if not enough space is available on the other disks. The best approach is to perform both the add and drop operation with the same ALTER DISKGROUP statement. This has the benefit of rebalancing data extents only one time and ensuring that there is enough space for the rebalance operation to succeed.

Caution:

The ALTER DISKGROUP...DROP DISK SQL statement returns to SQL prompt before the drop and rebalance operations are complete. Do not reuse, remove, or disconnect the dropped disk until the HEADER_STATUS column for this disk in the V$ASM_DISK view changes to FORMER. You can query the V$ASM_OPERATION view to determine the amount of time remaining for the drop/rebalance operation to complete.

If you specify the FORCE clause for the drop operation, the disk is dropped even if Oracle ASM cannot read or write to the disk. You cannot use the FORCE flag when dropping a disk from an external redundancy disk group.

Caution:

A DROP FORCE operation leaves data at reduced redundancy until the subsequent rebalance operation completes. This increases your exposure to data loss if there is a subsequent disk failure during rebalancing. Use DROP FORCE with caution.

The statements in Example 4-6 demonstrate how to drop disks from the disk group data1. The first example drops diska5 from disk group data1. The second example drops diska5 from disk group data1, and also illustrates how multiple actions are possible with one ALTER DISKGROUP statement.

Example 4-6 Dropping disks from disk groups

ALTER DISKGROUP data1 DROP DISK diska5;

ALTER DISKGROUP data1 DROP DISK diska5
     ADD FAILGROUP failgrp1 DISK '/devices/diska9' NAME diska9;

See Also:

  • Managing Disk Groups with ASMCA for information about dropping disks from a disk group with ASMCA
  • Using the ALTER DISKGROUP SQL Statement to Add Disks to a Disk Group for an example of the ALTER DISKGROUPstatement
  • Oracle Database Reference for information about the V$ASM_OPERATION view
  • Oracle Database SQL Language Reference for information about the ALTER DISKGROUP SQL statement

 

Intelligent Data Placement

Note:

The Intelligent Data Placement (IDP) feature has been deprecated in Oracle ASM 12c Release 2 (12.2) and may be desupported in a future release.

Intelligent Data Placement enables you to specify disk regions on Oracle ASM disks for best performance. Using the disk region settings, you can ensure that frequently accessed data is placed on the outermost (hot) tracks which have greater speed and higher bandwidth. In addition, files with similar access patterns are located physically close, reducing latency. Intelligent Data Placement also enables the placement of primary and mirror extents into different hot or cold regions.

Intelligent Data Placement settings can be specified for a file or in disk group templates. The disk region settings can be modified after the disk group has been created. The disk region setting can improve I/O performance by placing more frequently accessed data in regions furthest from the spindle, while reducing your cost by increasing the usable space on a disk.

Intelligent Data Placement works best for the following:

  • Databases with data files that are accessed at different rates. A database that accesses all data files in the same way is unlikely to benefit from Intelligent Data Placement.
  • Disk groups that are more than 25% full. If the disk group is only 25% full, the management overhead is unlikely to be worth any benefit.
  • Disks that have better performance at the beginning of the media relative to the end. Because Intelligent Data Placement leverages the geometry of the disk, it is well suited to JBOD (just a bunch of disks). In contrast, a storage array with LUNs composed of concatenated volumes masks the geometry from Oracle ASM.

The COMPATIBLE.ASM and COMPATIBLE.RDBMS disk group attributes must be set to 11.2 or higher to use Intelligent Data Placement.

Intelligent Data Placement can be managed with the ALTER DISKGROUP ADD or MODIFY TEMPLATE SQL statements and the ALTER DISKGROUP MODIFY FILE SQL statement.

  • The ALTER DISKGROUP TEMPLATE SQL statement includes a disk region clause for setting hot/mirrorhot or cold/mirrorcold regions in a template:
    ALTER DISKGROUP data ADD TEMPLATE datafile_hot
      ATTRIBUTE ( 
        HOT
        MIRRORHOT);
    
  • The ALTER DISKGROUP MODIFY FILE SQL statement that sets disk region attributes for hot/mirrorhot or cold/mirrorcold regions:
    ALTER DISKGROUP data MODIFY FILE '+data/orcl/datafile/users.259.679156903'
      ATTRIBUTE ( 
        HOT
        MIRRORHOT);
    

    When you modify the disk region settings for a file, this action applies to new extensions of the file, but existing file contents are not affected until a rebalance operation. To apply the new Intelligent Data Placement policy for existing file contents, you can manually initiate a rebalance. A rebalance operation uses the last specified policy for the file extents.

Oracle ASM Configuration Assistant (ASMCA) supports Intelligent Data Placement with template creation during disk group alterations.

See Also:

  • Manually Rebalancing Disk Groups for information about rebalance operations
  • Managing Disk Groups with ASMCA for information about disk group alterations with ASMCA
  • Viewing Disk Region Information and iostat for information about displaying information about Intelligent Data Placement regions

 

Resizing Disks in Disk Groups

The RESIZE clause of ALTER DISKGROUP enables you to resize disks in a disk group.

When resizing disks in a disk group, all the disks must be of equal size.

If you do not specify a new size in the SIZE clause, then Oracle ASM uses the size of the disks as returned by the operating system. The new size is written to the Oracle ASM disk header and if the size is increasing, then the new space is immediately available for allocation. If the size is decreasing, rebalancing must relocate file extents beyond the new size limit to available space below the limit. If the rebalance operation can successfully relocate all extents, then the new size is made permanent, otherwise the rebalance fails.

The following example resizes all of the disks in the disk group data1. If the new size is greater than the capacity of a disk, then the statement fails.

Example 4-7 Resizing disks in disk groups

ALTER DISKGROUP data1 RESIZE ALL SIZE 100G;

 

Undropping Disks in Disk Groups

The UNDROP DISKS clause of the ALTER DISKGROUP statement enables you to cancel all pending drops of disks within disk groups.

If a drop disk operation has completed, then this statement cannot be used to restore it. This statement cannot be used to restore disks that are being dropped as the result of a DROP DISKGROUP statement, or for disks that are being dropped using the FORCEclause.

The following example cancels the dropping of disks from disk group data1:

Example 4-8 Undropping disks in disk groups

ALTER DISKGROUP data1 UNDROP DISKS;

Note:

  • Oracle Database SQL Language Reference for information about the DROP DISKGROUP SQL statement
  • Oracle Database SQL Language Reference for information about the ALTER DISKGROUP SQL statement

 

Manually Rebalancing Disk Groups

You can manually rebalance the files in a disk group using the REBALANCE clause of the ALTER DISKGROUP statement.

Manual rebalancing would normally not be required because Oracle ASM automatically rebalances disk groups when their configuration changes, including changes to file groups. However, you might want to do a manual rebalance operation to control the speed of what would otherwise be an automatic rebalance operation.

The POWER clause of the ALTER DISKGROUP REBALANCE statement specifies the degree of parallelism, and the speed of the rebalance operation. A higher value increases the speed of the rebalance operation. It can be set to a minimum value of 0 which stops a rebalancing operation until the statement is either implicitly or explicitly rerun.

The default rebalance power is set by the ASM_POWER_LIMIT initialization parameter. The range of values for the POWER clause is the same for the ASM_POWER_LIMIT initialization parameter.

The power level of an ongoing rebalance operation can be changed by entering the rebalance statement using the MODIFY POWERclause. For example, the following SQL statement modifies the power setting to 10 of an ongoing rebalance.

ALTER DISKGROUP data2 REBALANCE MODIFY POWER 10;

The the following SQL statement modifies the power setting to the default value.

ALTER DISKGROUP data2 REBALANCE MODIFY POWER;

When you rebalance a disk group, you have the option choosing the following phase options using the WITH or WITHOUT keywords, except where noted:

  • RESTOREThe RESTORE phase includes RESYNC, RESILVER, and REBUILD operations. The RESTORE phase is always run by default and cannot be excluded.
    • RESYNCThis operation synchronizes the stale extents on the disks that are being brought online.
    • RESILVERThis operation is specific only to Exadata systems. During this phase, data is copied from one mirror to the mirror with stale data.
    • REBUILDThis operation restores the redundancy of forcing disks only. Forcing disks are those disks that have been dropped with the force option.
  • BALANCEThis phase restores redundancy of all the disks in the disk group, including file groups, and also balances extents on Oracle ASM disks.
  • PREPAREThis phase completes the work corresponding to the prepare SQL operation. This phase is enabled only for FLEX or EXTENDED redundancy disk groups. COMPATIBLE.ASM must be set to 12.2 or higher.
  • COMPACTThis phase defragments and compacts extents across Oracle ASM disks.

The rebalance operation executes the phases in the optimal order. If none of the phases are specified with the ALTER DISKGROUP...REBALANCE SQL statement, then the behavior remains the same as the rebalance operation previous to the Oracle ASM 12.2 release during which all rebalance phases are run.

The following examples show the use of the phase options with ALTER DISKGROUP...REBALANCE:

ALTER DISKGROUP data2 REBALANCE WITH BALANCE COMPACT;

ALTER DISKGROUP data3 REBALANCE WITHOUT BALANCE;

The ALTER DISKGROUP...REBALANCE command returns immediately by default so that you can run other commands while the rebalance operation takes place asynchronously in the background. You can query the V$ASM_OPERATION view for the status of the rebalance operation. When not all rebalance phases are run, the V$ASM_OPERATION view displays an ORA-59000 error at the end of the rebalance.

To cause the ALTER DISKGROUP...REBALANCE command to wait until the rebalance operation is complete before returning, add the WAIT keyword to the REBALANCE clause. The wait functionality is especially useful in scripts. The command also accepts a NOWAIT keyword, which invokes the default behavior of conducting the rebalance operation asynchronously. You can interrupt a rebalance running in wait mode by typing CTRL+C on most platforms. This causes the command to return immediately with the message ORA-01013: user requested cancel of current operation, and then continues the rebalance operation asynchronously.

Additional rules for the rebalance operation include the following:

  • An ongoing rebalance command is restarted if the storage configuration changes either when you alter the configuration, or if the configuration changes due to a failure or an outage. Furthermore, if the new rebalance fails because of a user error, then a manual rebalance may be required.
  • The ALTER DISKGROUP...REBALANCE statement runs on a single node even if you are using Oracle Real Application Clusters (Oracle RAC).
  • Oracle ASM can perform one disk group rebalance at a time on a given instance. If you have initiated multiple rebalances on different disk groups on a single node, then Oracle processes these operations in parallel on additional nodes if available; otherwise the rebalances are performed serially on the single node. You can explicitly initiate rebalances on different disk groups on different nodes in parallel.
  • Rebalancing continues across a failure of the Oracle ASM instance performing the rebalance.
  • The REBALANCE clause (with its associated POWER and WAIT/NOWAIT keywords) can also be used in ALTER DISKGROUPcommands that add, drop, or resize disks.

    Note:

    Oracle restarts the processing of an ongoing rebalance operation if the storage configuration changes. If the next rebalance operation fails because of a user error, then a manual rebalance may be required.

The following example manually rebalances the disk group data2. The command does not return until the rebalance operation is complete. All supported phases of the rebalance operation are executed. Note that specifying RESTORE is not necessary as that phase is always run during a rebalance.

Example 4-9 Manually rebalancing a disk group

ALTER DISKGROUP data2 REBALANCE RESTORE POWER 5 WAIT;

See Also:

  • ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initialization parameter
  • Tuning Rebalance Operations for information about rebalancing operations
  • Oracle Database SQL Language Reference for information about the ALTER DISKGROUP SQL statement

 

Tuning Rebalance Operations

If the POWER clause is not specified in an ALTER DISKGROUP statement, or when rebalance is implicitly run by adding or dropping a disk, then the rebalance power defaults to the value of the ASM_POWER_LIMIT initialization parameter. You can adjust the value of this parameter dynamically. The range of values for the POWER clause is the same for the ASM_POWER_LIMIT initialization parameter.

The higher the power limit, the more quickly a rebalance operation can complete. Rebalancing takes longer with lower power values, but consumes fewer processing and I/O resources which are shared by other applications, such as the database.

Oracle ASM tries to keep a rebalance I/O for each unit of power. Each I/O requires PGA memory for the extent involved in the relocation.

The default value of 1 minimizes disruption to other applications. The appropriate value is dependent on your hardware configuration, performance requirements, and availability requirements. Oracle ASM always adjusts the power to fit available memory.

When the COMPATIBLE.ASM disk group is set to 11.2.0.2 or higher, the rebalance operation may be run as one process using asynchronous I/O. You can check the Oracle ASM alert log for details on the rebalance process.

If a rebalance is in progress because a disk is manually or automatically dropped, then increasing the power of the rebalance shortens the time frame during which redundant copies of that data on the dropped disk are reconstructed on other disks.

You can also affect rebalance behavior with the CONTENT.CHECK and THIN_PROVISIONED disk group attributes.

The EXPLAIN WORK SQL statement determines the amount of work for a rebalance operation and the resulting calculations are displayed in the V$ASM_ESTIMATE view.

For example:

EXPLAIN WORK FOR ALTER DISKGROUP data DROP DISK data_0000;
Explained.

SELECT est_work FROM V$ASM_ESTIMATE;
EST_WORK
--------
    4211

EXPLAIN WORK SET STATEMENT_ID='online' FOR ALTER DISKGROUP data 
  ONLINE disk data_000;
Explained.

SELECT est_work FROM V$ASM_ESTIMATE WHERE STATEMENT_ID='online';
EST_WORK
--------
     421

The V$ASM_ESTIMATE view provides information for adjusting ASM_POWER_LIMIT and the resulting power of rebalance operations. The EST_WORK column provides an estimate of the number of allocation units that have to be moved by the rebalance operation to complete.

The PASS column of V$ASM_OPERATION is updated for resync and rebalance operations. The contents of the column can be RESYNC, REBALANCE, or COMPACT. For example, the following SQL query shows values in the PASS column during a rebalance operation.

SQL> SELECT GROUP_NUMBER, PASS, STATE FROM V$ASM_OPERATION;

GROUP_NUMBER PASS      STAT
------------ --------- ----
           2 RESYNC    WAIT
           2 REBALANCE WAIT
           2 COMPACT   WAIT

See Also:

  • ASM_POWER_LIMIT for information about the ASM_POWER_LIMIT initialization parameter
  • Summary of Disk Group Attributes for information about disk group attributes
  • Manually Rebalancing Disk Groupsfor more information about rebalancing disk groups

 

Scrubbing Disk Groups

Oracle ASM disk scrubbing improves availability and reliability by searching for data that may be less likely to be read. Disk scrubbing checks logical data corruptions and repairs them automatically in normal and high redundancy disks groups. The scrubbing process repairs logical corruptions using the mirror disks. Disk scrubbing can be combined with disk group rebalancing to reduce I/O resources. The disk scrubbing process has minimal impact to the regular I/O in production systems.

You can perform scrubbing on a disk group, a specified disk, or a specified file of a disk group with the ALTER DISKGROUP SQL statement. For example, the following SQL statements show various options used when running the ALTER DISKGROUPdisk_group SCRUB SQL statement.

SQL> ALTER DISKGROUP data SCRUB POWER LOW;

SQL> ALTER DISKGROUP data SCRUB FILE '+DATA/ORCL/DATAFILE/example.266.806582193' 
       REPAIR POWER HIGH FORCE;

SQL> ALTER DISKGROUP data SCRUB DISK DATA_0005 REPAIR POWER HIGH FORCE;

When using ALTER DISKGROUP with the SCRUB option, the following items apply:

  • The optional REPAIR option automatically repairs disk corruptions. If the REPAIR option is not specified, then the SCRUBoption only checks and reports logical corruptions of the specified target.
  • The optional POWER value can be set to AUTO, LOW, HIGH, or MAX. If the POWER option is not specified, the power value defaults to AUTO and the power adjusts to the optimum level for the system.
  • If the optional WAIT option is specified, the command returns after the scrubbing operation has completed. If the WAIT option is not specified, the scrubbing operation is added into the scrubbing queue and the command returns immediately.
  • If the optional FORCE option is specified, the command is processed even if the system I/O load is high or scrubbing has been disabled internally at the system level.

The scrubbing process is visible in the fields of the V$ASM_OPERATION view while the scrubbing process is running.

Oracle ASM Disk Discovery

Disk discovery is the mechanism used to find the operating system names for disks Oracle ASM can access.

This mechanism finds all the disks that comprise a disk group to be mounted, the disks an administrator wants to add to a disk group, or the disks the administrator might consider adding to a disk group. This section contains the following topics:

  • How A Disk is Discovered
  • Disk Discovery Rules
  • Improving Disk Discovery Time

See Also:

ASM_DISKSTRING for additional information about disk discovery and the ASM_DISKSTRING initialization parameter

 

How A Disk is Discovered

When an Oracle ASM instance is initialized, Oracle ASM discovers and examines the contents of all of the disks that are in the paths that you designated with values in the ASM_DISKSTRING initialization parameter.

Disk discovery also occurs when you:

  • Run the following SQL statements
    • Mount a disk group with ALTER DISKGROUP MOUNT
    • Online a disk with ALTER DISKGROUP ONLINE DISK
    • Add a disk to a disk group with CREATE or ALTER DISKGROUP...ADD DISK
    • Resize a disk in a disk group with ALTER DISKGROUP...RESIZE DISK
    • Query with SELECT FROM V$ASM_DISKGROUP or V$ASM_DISK views
  • Run Oracle ASM Configuration Assistant (ASMCA) operations or ASMCMD commands that perform the same operations as the SQL statements previously listed

After Oracle ASM successfully discovers a disk, the disk appears in the V$ASM_DISK view. Disks that belong to a disk group, that is, disks that have a disk group name in the disk header, show a header status of MEMBER. Disks that were discovered, but that have not yet been assigned to a disk group, have a status of either CANDIDATE or PROVISIONED. Disks that previously belonged to a disk group and were dropped cleanly from the disk group have a status of FORMER.

The PROVISIONED status implies that an additional platform-specific action has been taken by an administrator to make the disk available for Oracle ASM. For example, on Windows computers, the administrator might have used asmtool or asmtoolg to stamp the disk with a header. For example, on Linux computers, the administrator might have used Oracle ASM Filter Driver or ASMLIB to prepare the disk for Oracle ASM.

Example 4-10 shows a SQL query on V$ASM_DISK that displays the header status of a group of disks.

Example 4-10 Querying V$ASM_DISK for header status

SQL> SELECT name, header_status, path FROM V$ASM_DISK 
     WHERE path LIKE '/devices/disk0%';

NAME      HEADER_STATUS PATH
--------- ------------- ---------------------
          FORMER        /devices/disk02
          FORMER        /devices/disk01
          CANDIDATE     /devices/disk07
DISK06    MEMBER        /devices/disk06
DISK05    MEMBER        /devices/disk05
DISK04    MEMBER        /devices/disk04
DISK03    MEMBER        /devices/disk03
7 rows selected.

See Also:

Oracle Database Reference for information about the header status of an Oracle ASM disk that is displayed in the V$ASM_DISK view

 

Disk Discovery Rules

The rules for discovering Oracle ASM disks are as follows:

  • Oracle ASM can discover up to 10,000 disks. That is, if more than 10,000 disks match the ASM_DISKSTRING initialization parameter, then Oracle ASM discovers only the first 10,000.
  • Oracle ASM only discovers disk partitions. Oracle ASM does not discover partitions that include the partition table.
  • From the perspective of the installation, candidate disks are those that have the CANDIDATE, PROVISIONED, or FORMERheader status. These disks with a CANDIDATE, PROVISIONED, or FORMER status can be added to Oracle ASM disk groups without using the FORCE flag.
  • When adding a disk, the FORCE option must be used if Oracle ASM recognizes that the disk was managed by Oracle. Such a disk appears in the V$ASM_DISK view with a status of FOREIGN. In this case, you can only add the disk to a disk group by using the FORCE keyword.
  • MEMBER disks can usually be added to a disk group by specifying the FORCE flag, if the disks are not part of a currently mounted disk group.

In addition, Oracle ASM identifies the following configuration errors during discovery:

  • Multiple paths to the same diskIn this case, if the disk is part of a disk group, then disk group mount fails. If the disk is being added to a disk group with the ADD DISK or CREATE DISKGROUP command, then the command fails. To correct the error, adjust the ASM_DISKSTRINGvalue so that Oracle ASM does not discover multiple paths to the same disk. Or if you are using multipathing software, then ensure that you include only the pseudo-device name in the ASM_DISKSTRING value. See "Oracle ASM and Multipathing".
  • Multiple Oracle ASM disks with the same disk headerThis can be caused by having copied one disk onto another. In this case, the disk group mount operation fails.

 

Improving Disk Discovery Time

The value for the ASM_DISKSTRING initialization parameter is an operating system–dependent value that Oracle ASM uses to limit the set of paths that the discovery process uses to search for disks. When a new disk is added to a disk group, each Oracle ASM instance that has the disk group mounted must be able to discover the new disk using its ASM_DISKSTRING.

In many cases, the default value (NULL) is sufficient. Using a more restrictive value might reduce the time required for Oracle ASM to perform discovery, and thus improve disk group mount time or the time for adding a disk to a disk group. Oracle may dynamically change the ASM_DISKSTRING before adding a disk so that the new disk is discovered through this parameter.

The default value of ASM_DISKSTRING might not find all disks in all situations. If your site is using Oracle ASM Filter Driver or a third-party vendor, then you may have discovery string conventions that you must use for ASM_DISKSTRING.

In addition, if your installation uses multipathing software, then the software might place pseudo-devices in a path that is different from the operating system default.

See Also:

  • Administering Oracle ASM Filter Driver for information about Oracle ASM Filter Driver
  • Oracle ASM and Multipathingand your multipathing vendor documentation for information about multipathing
  • Previous
  • Next

Managing Capacity in Disk Groups

When Oracle ASM provides redundancy, such as when you create a disk group with NORMAL or HIGH redundancy, you must have sufficient capacity in each disk group to manage a re-creation of data that is lost after a failure of one or two failure groups. After one or more disks fail, the process of restoring redundancy for all data requires space from the surviving disks in the disk group. If not enough space remains, then some files might end up with reduced redundancy.

Reduced redundancy means that one or more extents in the file are not mirrored at the expected level. For example, a reduced redundancy file in a high redundancy disk group has at least one file extent with two or fewer total copies of the extent instead of three. For unprotected files, data extents could be completely missing. Other causes of reduced redundancy files are disks running out of space or an insufficient number of failure groups.

The following guidelines help ensure that you have sufficient space to restore full redundancy for all disk group data after the failure of one or more disks.

  • Normal redundancy disk group - It is best to have enough free space in your disk group to tolerate the loss of all disks in one failure group. The amount of free space should be equivalent to the size of the largest failure group.
  • High redundancy disk group - It is best to have enough free space to cope with the loss of all disks in two failure groups. The amount of free space should be equivalent to the sum of the sizes of the two largest failure groups.

    Note:

    When you lose multiple disks from multiple failure groups, then you could lose both the primary and the redundant copies of your data. In addition, if you do not have enough capacity to restore redundancy, then Oracle ASM can continue to operate. However, if another disk fails, then the system may not be able to tolerate additional failures.

The V$ASM_DISKGROUP view contains the following columns that contain information to help you manage capacity:

Note:

The values in the REQUIRED_MIRROR_FREE_MB and USABLE_FILE_MB columns of the V$ASM_DISKGROUP view are 0 if the disk group type is FLEX or EXTEND. The 0 value in this case means no value is given, not a zero amount in the REQUIRED_MIRROR_FREE_MB and USABLE_FILE_MB columns.

  • REQUIRED_MIRROR_FREE_MB indicates the amount of space that must be available in a disk group to restore full redundancy after the worst failure that can be tolerated by the disk group without adding additional storage. This requirement ensures that there are sufficient failure groups to restore redundancy. Also, this worst failure refers to a permanent failure where the disks must be dropped, not the case where the disks go offline and then back online.The amount of space displayed in this column takes the effects of mirroring into account. The value is computed as follows:
    • A normal redundancy disk group with more than two REGULAR failure groupsThe value is the total raw space for all of the disks in the largest failure group. The largest failure group is the one with the largest total raw capacity. For example, if each disk is in its own failure group, then the value would be the size of the largest capacity disk.
    • A high redundancy disk group with more than three REGULAR failure groupsThe value is the total raw space for all of the disks in the two largest failure groups.

    See Also:

    Oracle Exadata documentation for information about calculating REQUIRED_MIRROR_FREE_MB on Oracle Exadata systems.

    Oracle Database Appliance documentation for information about calculating REQUIRED_MIRROR_FREE_MB on Oracle Database Appliance systems.

  • USABLE_FILE_MB indicates the amount of free space, adjusted for mirroring, that is available for new files to restore redundancy after a disk failure. USABLE_FILE_MB is computed by subtracting REQUIRED_MIRROR_FREE_MB from the total free space in the disk group and then adjusting the value for mirroring. For example, in a normal redundancy disk group where by default the mirrored files use disk space equal to twice their size, if 4 GB of actual usable file space remains, then USABLE_FILE_MB equals roughly 2 GB. You can then add a file that is up to 2 GB. For information about negative values of USABLE_FILE_MB, refer to "Negative Values of USABLE_FILE_MB".
  • TOTAL_MB is the total usable capacity of a disk group in megabytes. The calculations for data in this column take the disk header overhead into consideration. The disk header overhead depends on the number of Oracle ASM disks and Oracle ASM files. This value is typically about 1% of the total raw storage capacity. For example, if the total LUN capacity provisioned for Oracle ASM is 100 GB, then the value in the TOTAL_MB column would be about 99 GB.
  • FREE_MB is the unused capacity of the disk group in megabytes, without considering any data imbalance. There may be situations where the value in the FREE_MB column shows unused capacity but because one Oracle ASM disk is full, database writes fail because of the imbalance in the disk group. Ensure that you initiate a manual rebalance to force even data distribution which results in an accurate presentation of the values in the FREE_MB column.With fine grain striping using 128 KB, the storage is preallocated to be eight times the AU size. The data file size may appear slightly larger on Oracle ASM than on a local file system because of the preallocation.When you use Oracle ASM normal or high redundancy, the disk space utilization becomes more complex to measure because it depends on several variables.

    Note:

    The values in the TOTAL_MB and FREE_MB columns best describe space usage when you do not configure Oracle ASM mirroring, that is, when you use external redundancy.

The results from the following query show capacity metrics for a normal redundancy disk group that consists of six 1 GB (1024 MB) disks, each in its own failure group:

SQL> SELECT name, type, total_mb, free_mb, required_mirror_free_mb, 
     usable_file_mb FROM V$ASM_DISKGROUP;

NAME         TYPE     TOTAL_MB    FREE_MB REQUIRED_MIRROR_FREE_MB USABLE_FILE_MB
------------ ------ ---------- ---------- ----------------------- --------------
DATA         NORMAL       6144       3768                    1024           1372

The REQUIRED_MIRROR_FREE_MB column shows that 1 GB of extra capacity must be available to restore full redundancy after one or more disks fail. The first three numeric columns in the query results are raw numbers. That is, they do not take redundancy into account. Only the last column is adjusted for normal redundancy. In the query output example for the data disk group, the calculation is as follows:

(FREE_MB - REQUIRED_MIRROR_FREE_MB) / 2 = USABLE_FILE_MB

(3768 - 1024) / 2 = 2744 / 2 = 1372

 

Negative Values of USABLE_FILE_MB

Due to the relationship between FREE_MB, REQUIRED_MIRROR_FREE_MB, and USABLE_FILE_MB, USABLE_FILE_MB can become negative. Although this is not necessarily a critical situation, it does mean that:

  • Depending on the value of FREE_MB, you may not be able to create new files.
  • The next failure might result in files with reduced redundancy.

If USABLE_FILE_MB becomes negative, it is strongly recommended that you add more space to the disk group as soon as possible.

  • Previous
  • Next

Oracle ASM Mirroring and Disk Group Redundancy

This section contains the following topics:

  • Mirroring, Redundancy, and Failure Group Options
  • Oracle ASM Recovery from Read and Write I/O Errors
  • Oracle ASM Fast Mirror Resync
  • Preferred Read Failure Groups

 

Mirroring, Redundancy, and Failure Group Options

If you specify mirroring for a file, then Oracle ASM automatically stores redundant copies of the file extents in separate failure groups. Failure groups apply to normal, high, flex, and extended redundancy disk groups. You can define the failure groups for each disk group when you create or alter the disk group.

There are multiple types of disk groups based on the Oracle ASM redundancy level. Table 4-2 lists the types with their supported and default mirroring levels. The default mirroring levels indicate the mirroring level with which each file is created unless a different mirroring level is designated.

Table 4-2 Mirroring options for Oracle ASM disk group types

Disk Group Type Supported Mirroring Levels Default Mirroring Level
External redundancy Unprotected (none) Unprotected
Normal redundancy Two-way, three-way, unprotected (none) Two-way
High redundancy Three-way Three-way
Flex redundancy Two-way, three-way, unprotected (none) Two-way (newly-created)
Extended redundancy Two-way, three-way, unprotected (none) Two-way

For normal and high disk group types, the redundancy level controls how many disk failures are tolerated without dismounting the disk group or losing data. Each file is allocated based on its own redundancy, but the default comes from the disk group.

For the flex group type, the number of failures tolerated before dismount demands on the number of failure groups. For five or more failure groups, two disk failures are tolerated. For three or four failure groups, one disk failure is tolerated.

For the extended disk group type, each site is similar to a flex disk group. If the site has five failure groups or more, two disk failures with in a site can be tolerated before the site becomes compromised. If the site has three or four failure groups, the site can tolerate one disk failure before the site is compromised. When two sites are compromised, the disk group dismounts. An extended disk group requires a minimum of three failure groups for each data site.

For flex and extended disk groups, mirroring describes the availability of the files within a disk group, not the disk group itself. For example: If a file is unprotected in a flex disk group that has five failure groups, then after one failure the disk group is still mounted, but the file becomes unavailable.

The redundancy levels are:

  • External redundancyOracle ASM does not provide mirroring redundancy and relies on the storage system to provide RAID functionality. Any write error causes a forced dismount of the disk group. All disks must be located to successfully mount the disk group.
  • Normal redundancyOracle ASM provides two-way mirroring by default, which means that all files are mirrored so that there are two copies of every extent. A loss of one Oracle ASM disk is tolerated. You can optionally choose three-way or unprotected mirroring.A file specified with HIGH redundancy (three-way mirroring) in a NORMAL redundancy disk group provides additional protection from a bad disk sector in one disk, plus the failure of another disk. However, this scenario does not protect against the failure of two disks.
  • High redundancyOracle ASM provides three-way (triple) mirroring by default. A loss of two Oracle ASM disks in different failure groups is tolerated.
  • Flex redundancyOracle ASM provides two-way mirroring by default for newly-created flex disk groups. For migrated flex disk groups, the default values are obtained from the template values in the normal or high redundancy disk groups before migration. For migration from normal redundancy, if the template defaults were not changed, then the flex defaults are two-way mirroring. For migration from high redundancy, if the template defaults were not changed, then the flex defaults are three-way mirroring.
  • Extended redundancyOracle ASM provides two-way mirroring by default. The redundancy setting describes redundancy within a data site. For example: If there is a two-way mirrored file in a two-data-site extended disk group, then there are four copies of the file, two in each data site.

Oracle ASM file groups in a flex or extended disk group can have different redundancy levels.

If there are not enough online failure groups to satisfy the file mirroring (redundancy attribute value) specified in the disk group file type template, Oracle ASM allocates as many mirrors copies as possible and subsequently allocates the remaining mirrors when sufficient online failure groups are available.

Failure groups enable the mirroring of metadata and user data. System reliability can diminish if your environment has an insufficient number of failure groups.

This section contains these topics:

  • Oracle ASM Failure Groups
  • How Oracle ASM Manages Disk Failures
  • Guidelines for Using Failure Groups
  • Failure Group Frequently Asked Questions

See Also:

  • Managing Oracle ASM Flex Disk Groups for information about Oracle ASM flex disk groups, extended disk groups, and file groups
  • Managing Disk Group Templates for information about specifying Oracle ASM disk group templates

 

Oracle ASM Failure Groups

Failure groups are used to store mirror copies of data. When Oracle ASM allocates an extent for a normal redundancy file, Oracle ASM allocates a primary copy and a secondary copy. Oracle ASM chooses the disk on which to store the secondary copy so that it is in a different failure group than the primary copy. Each copy is on a disk in a different failure group so that the simultaneous failure of all disks in a failure group does not result in data loss.

A failure group is a subset of the disks in a disk group, which could fail at the same time because they share hardware. The failure of common hardware must be tolerated. Four drives that are in a single removable tray of a large JBOD (Just a Bunch of Disks) array should be in the same failure group because the tray could be removed making all four drives fail at the same time. Drives in the same cabinet could be in multiple failure groups if the cabinet has redundant power and cooling so that it is not necessary to protect against failure of the entire cabinet. However, Oracle ASM mirroring is not intended to protect against a fire in the computer room that destroys the entire cabinet.

There are always failure groups even if they are not explicitly created. If you do not specify a failure group for a disk, then Oracle automatically creates a new failure group containing just that disk, except for disk groups containing disks on Oracle Exadata cells.

A normal redundancy disk group must contain at least two failure groups. A high redundancy disk group must contain at least three failure groups. However, Oracle recommends using more failure groups. A small number of failure groups, or failure groups of uneven capacity, can create allocation problems that prevent full use of all of the available storage.

Oracle recommends a minimum of three failure groups for normal redundancy disk groups and five failure groups for high redundancy disk groups to maintain the necessary number of copies of the Partner Status Table (PST) and to ensure robustness with respect to storage hardware failures.

In the event of a system failure, three failure groups in a normal redundancy disk group allow a comparison among three PSTs to accurately determine the most up to date and correct version of the PST, which could not be done with a comparison between only two PSTs. Similarly with a high redundancy disk group, if two failure groups are offline, then Oracle ASM would be able to make a comparison among the three remaining PSTs.

If configuring an extra failure group presents a problem with storage capacity management, then a quorum failure group can be used as the extra failure group to store a copy of the PST. A quorum failure group does not require the same capacity as the other failure groups.

Failure groups can be specified as regular or quorum failure groups. For information about quorum failure groups, see "Storing Oracle Cluster Registry and Voting Files in Oracle ASM Disk Groups".

See Also:

Oracle Exadata documentation for information about Oracle Exadata failure groups

 

How Oracle ASM Manages Disk Failures

Depending on the redundancy level of a disk group and how you define failure groups, the failure of one or more disks could result in either of the following:

  • The disks are first taken offline and then automatically dropped. In this case, the disk group remains mounted and serviceable. In addition, because of mirroring, all of the disk group data remains accessible. After the disk drop operation, Oracle ASM performs a rebalance to restore full redundancy for the data on the failed disks.
  • The entire disk group is automatically dismounted, which means loss of data accessibility.

 

Guidelines for Using Failure Groups

The following are guidelines for using failure groups:

  • Each disk in a disk group can belong to only one failure group.
  • Failure groups should all be of the same size. Failure groups of different sizes may lead to reduced availability.
  • Oracle ASM requires at least two failure groups to create a normal redundancy disk group and at least three failure groups to create a high redundancy disk group.

 

Failure Group Frequently Asked Questions

This section discusses frequently asked questions about failure group under the following topics:

  • How Many Failure Groups Should I Create?
  • How are Multiple Failure Groups Recovered after Simultaneous Failures?
  • When Should External, Normal, or High Redundancy Be Used?

How Many Failure Groups Should I Create?

Choosing the number of failure groups to create depends on the types of failures that must be tolerated without data loss. For small numbers of disks, such as fewer than 20, it is usually best to use the default failure group creation that puts every disk in its own failure group.

Using the default failure group creation for small numbers of disks is also applicable for large numbers of disks where your main concern is disk failure. For example, a disk group might be configured from several small modular disk arrays. If the system must continue operating when an entire modular array fails, then a failure group should consist of all of the disks in one module. If one module fails, then all of the data on that module is relocated to other modules to restore redundancy. Disks should be placed in the same failure group if they depend on a common piece of hardware whose failure must be tolerated with no loss of availability.

How are Multiple Failure Groups Recovered after Simultaneous Failures?

A simultaneous failure can occur if there is a failure of a piece of hardware used by multiple failure groups. This type of failure usually forces a dismount of the disk group if all disks are unavailable.

When Should External, Normal, or High Redundancy Be Used?

Oracle ASM mirroring runs on the database server and Oracle recommends to off load this processing to the storage hardware RAID controller by using external redundancy. You can use normal redundancy in the following scenarios:

  • Storage system does not have RAID controller
  • Mirroring across storage arrays
  • Extended cluster configurations

In general, Oracle ASM mirroring is the Oracle alternative to third party logical volume managers. Oracle ASM mirroring eliminates the deployment of additional layers of software complexity in your Oracle Database environment.

 

Oracle ASM Recovery from Read and Write I/O Errors

Read errors can be the result of a loss of access to the entire disk or media corruptions on an otherwise a healthy disk. Oracle ASM tries to recover from read errors on corrupted sectors on a disk. When a read error by the database or Oracle ASM triggers the Oracle ASM instance to attempt bad block remapping, Oracle ASM reads a good copy of the extent and copies it to the disk that had the read error.

  • If the write to the same location succeeds, then the underlying allocation unit (sector) is deemed healthy. This might be because the underlying disk did its own bad block reallocation.
  • If the write fails, Oracle ASM attempts to write the extent to a new allocation unit on the same disk. If this write succeeds, the original allocation unit is marked as unusable. If the write fails, the disk is taken offline.

One unique benefit on Oracle ASM based mirroring is that the database instance is aware of the mirroring. For many types of logical corruptions such as a bad checksum or incorrect System Change Number (SCN), the database instance proceeds through the mirror side looking for valid content and proceeds without errors. If the process in the database that encountered the read can obtain the appropriate locks to ensure data consistency, it writes the correct data to all mirror sides.

When encountering a write error, a database instance sends the Oracle ASM instance a disk offline message.

  • If database can successfully complete a write to at least one extent copy and receive acknowledgment of the offline disk from Oracle ASM, the write is considered successful.
  • If the write to all mirror side fails, database takes the appropriate actions in response to a write error such as taking the tablespace offline.

When the Oracle ASM instance receives a write error message from a database instance or when an Oracle ASM instance encounters a write error itself, the Oracle ASM instance attempts to take the disk offline. Oracle ASM consults the Partner Status Table (PST) to see whether any of the disk's partners are offline. If too many partners are offline, Oracle ASM forces the dismounting of the disk group. Otherwise, Oracle ASM takes the disk offline.

The ASMCMD remap command was introduced to address situations where a range of bad sectors exists on a disk and must be corrected before Oracle ASM or database I/O. For information about the remap command, see "remap".

 

Oracle ASM Fast Mirror Resync

Restoring the redundancy of an Oracle ASM disk group after a transient disk path failure can be time consuming. This is especially true if the recovery process requires rebuilding an entire Oracle ASM disk group. Oracle ASM fast mirror resync significantly reduces the time to resynchronize a failed disk in such situations. When you replace the failed disk, Oracle ASM can quickly resynchronize the Oracle ASM disk extents.

Note:

To use this feature, the disk group compatibility attributes must be set to 11.1 or higher.

Any problems that make a failure group temporarily unavailable are considered transient failures that can be recovered by the Oracle ASM fast mirror resync feature. For example, transient failures can be caused by disk path malfunctions, such as cable failures, host bus adapter failures, controller failures, or disk power supply interruptions.

Oracle ASM fast resync keeps track of pending changes to extents on an offline disk during an outage. The extents are resynced when the disk is brought back online.

By default, Oracle ASM drops a disk in 3.6 hours after it is taken offline. You can set the DISK_REPAIR_TIME disk group attribute to delay the drop operation by specifying a time interval to repair the disk and bring it back online. The time can be specified in units of minutes (m or M) or hours (h or H). If you omit the unit, then the default unit is hours. The DISK_REPAIR_TIME disk group attribute can only be set with the ALTER DISKGROUP SQL statement and is only applicable to normal and high redundancy disk groups.

If the attribute is not set explicitly, then the default value (3.6h) applies to disks that have been set to OFFLINE mode without an explicit DROP AFTER clause. Disks taken offline due to I/O errors do not have a DROP AFTER clause.

The default DISK_REPAIR_TIME attribute value is an estimate that should be adequate for most environments. However, ensure that the attribute value is set to the amount of time that you think is necessary in your environment to fix any transient disk error, and during which you are able to tolerate reduced data redundancy.

The elapsed time (since the disk was set to OFFLINE mode) is incremented only when the disk group containing the offline disks is mounted. The REPAIR_TIMER column of V$ASM_DISK shows the amount of time left (in seconds) before an offline disk is dropped. After the specified time has elapsed, Oracle ASM drops the disk. You can override this attribute with the ALTERDISKGROUP OFFLINE DISK statement and the DROP AFTER clause.

Note:

If a disk is offlined by Oracle ASM because of an I/O (write) error or is explicitly offlined using the ALTER DISKGROUP... OFFLINE statement without the DROP AFTER clause, then the value specified for the DISK_REPAIR_TIME attribute for the disk group is used.

Altering the DISK_REPAIR_TIME attribute has no effect on offline disks. The new value is used for any disks that go offline after the attribute is updated. You can confirm this behavior by viewing the Oracle ASM alert log.

If an offline disk is taken offline for a second time, then the elapsed time is reset and restarted. If another time is specified with the DROP AFTER clause for this disk, the first value is overridden and the new value applies. A disk that is in OFFLINE mode cannot be dropped with an ALTER DISKGROUP DROP DISK statement; an error is returned if attempted. If for some reason the disk must be dropped (such as the disk cannot be repaired) before the repair time has expired, a disk can be dropped immediately by issuing a second OFFLINE statement with a DROP AFTER clause specifying 0h or 0m.

You can use ALTER DISKGROUP to set the DISK_REPAIR_TIME attribute to a specified hour or minute value, such as 4.5 hours or 270 minutes. For example:

ALTER DISKGROUP data SET ATTRIBUTE 'disk_repair_time' = '4.5h'
ALTER DISKGROUP data SET ATTRIBUTE 'disk_repair_time' = '270m'

After you repair the disk, run the SQL statement ALTER DISKGROUP ONLINE DISK. This statement brings a repaired disk group back online to enable writes so that no new writes are missed. This statement also starts a procedure to copy of all of the extents that are marked as stale on their redundant copies.

If a disk goes offline when the Oracle ASM instance is in rolling upgrade mode, the disk remains offline until the rolling upgrade has ended and the timer for dropping the disk is stopped until the Oracle ASM cluster is out of rolling upgrade mode. Examples of taking disks offline and bringing them online follow.

The following example takes disk DATA_001 offline and drops it after five minutes.

ALTER DISKGROUP data OFFLINE DISK DATA_001 DROP AFTER 5m;

The next example takes the disk DATA_001 offline and drops it after the time period designated by DISK_REPAIR_TIME elapses:

ALTER DISKGROUP data OFFLINE DISK DATA_001;

This example takes all of the disks in failure group FG2 offline and drops them after the time period designated by DISK_REPAIR_TIME elapses. If you used a DROP AFTER clause, then the disks would be dropped after the specified time:

ALTER DISKGROUP data OFFLINE DISKS IN FAILGROUP FG2;

The next example brings all of the disks in failure group FG2 online:

ALTER DISKGROUP data ONLINE DISKS IN FAILGROUP FG2;

This example brings only disk DATA_001 online:

ALTER DISKGROUP data ONLINE DISK DATA_001;

This example brings all of the disks in disk group DATA online:

ALTER DISKGROUP data ONLINE ALL;

Querying the V$ASM_OPERATION view while you run ALTER DISKGROUP ONLINE statements displays the name and state of the current operation that you are performing. For example, the following SQL query shows values in the PASS column during an online operation.

SQL> SELECT GROUP_NUMBER, PASS, STATE FROM V$ASM_OPERATION;
 
GROUP_NUMBER PASS      STAT
------------ --------- ----
           1 RESYNC    RUN
           1 REBALANCE WAIT
           1 COMPACT   WAIT

An offline operation does not generate a display in a V$ASM_OPERATION view query.

You can set the FAILGROUP_REPAIR_TIME and CONTENT.TYPE disk group attributes. The FAILGROUP_REPAIR_TIME disk group attribute specifies a default repair time for the failure groups in the disk group. The CONTENT.TYPE disk group attribute specifies the type of data expected to be stored in a disk group. You can set these attributes with ASMCA, ASMCMD mkdg, or SQL CREATE and ALTER DISKGROUP statements.

The ASMCMD lsop command shows the resync time estimate. There are separate rows in the V$ASM_OPERATION table for different phases of rebalance: disk resync, rebalance, and data compaction.

The ASMCMD online command has a power option to specify the power for the online operation. The SQL ALTER DISKGROUPREPLACE DISK statement also has the power option.

The ASMCMD chdg command provides the replace option in addition to the add and drop tags. The ASMCMD mkdg command has an additional time parameter (-t) to specify the time to offline a failure group.

See Also:

  • Disk Group Compatibility for information about disk group compatibility
  • Managing Disk Group Attributes for information about disk group attributes
  • Oracle Grid Infrastructure Installation and Upgrade Guide and Upgrading and Patching Oracle ASM for information about upgrading Oracle ASM
  • Oracle Database SQL Language Reference for information about ALTER DISKGROUP
  • Oracle Database SQL Language Reference for information about CREATE DISKGROUP

 

Preferred Read Failure Groups

When you configure Oracle ASM failure groups, it might be more efficient for a node to read from an extent that is closest to the node, even if that extent is a secondary extent. In other words, you can configure Oracle ASM to read from a secondary extent if that extent is closer to the node instead of Oracle ASM reading from the primary copy which might be farther from the node. Using the preferred read failure groups feature is most useful in extended clusters.

To use this feature, Oracle recommends that you configure at least one mirrored extent copy from a disk that is local to a node in an extended cluster. However, a failure group that is preferred for one instance might be remote to another instance in the same Oracle RAC database. The parameter setting for preferred read failure groups is instance specific.

Note:

In an Oracle extended cluster, which contains nodes that span multiple physically separated sites, the PREFERRED_READ.ENABLED disk group attribute controls whether preferred read functionality is enabled for a disk group. If preferred read functionality is enabled, then this functionality enables an instance to determine and read from disks at the same site as itself, which can improve performance. Whether or not PREFERRED_READ.ENABLED has been enabled, preferred read can be set at the failure group level on an Oracle ASM instance or a client instance in a cluster with the ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter, which is available for backward compatibility.

Configuring and Administering Preferred Read Failure Groups

To configure this feature, set the ASM_PREFERRED_READ_FAILURE_GROUPS initialization parameter to specify a list of failure group names as preferred read disks.

Set the parameter where diskgroup is the name of the disk group and failuregroup is the name of the failure group, separating these variables with a period. Oracle ASM ignores the name of a failure group that you use in this parameter setting if the failure group does not exist in the named disk group. You can append multiple values using commas as a separator as follows:

ASM_PREFERRED_READ_FAILURE_GROUPS = diskgroup.failuregroup,...

In an extended cluster, the failure groups that you specify with settings for the ASM_PREFERRED_READ_FAILURE_GROUPSparameter should only contain disks that are local to the instance. For normal redundancy disk groups, there should be only one failure group on each site of the extended cluster.

If there are multiple mirrored copies and you have set a value for the ASM_PREFERRED_READ_FAILURE_GROUPS parameter, then Oracle ASM first reads the copy that resides on a preferred read disk. If that read fails, then Oracle ASM attempts to read from the next mirrored copy that might not be on a preferred read disk.

Having multiple failure groups on one site can cause the loss of access to the disk group by the other sites if the site containing multiple failure groups fails. In addition, by having multiple failure groups on a site, an extent might not be mirrored to another site. This can diminish the read performance of the failure group on the other site.

For example, for a normal redundancy disk group, if a site contains two failure groups of a disk group, then Oracle ASM might put both mirror copies of an extent on the same site. In this configuration, Oracle ASM cannot protect against data loss from a site failure.

You should configure at most two failure groups on a site for a high redundancy disk group. If there are three sites in an extended cluster, for the same reason previously mentioned, then you should only create one failure group.

For a two-site extended cluster, a normal redundancy disk group only has two failure groups. In this case, you can only specify one failure group as a preferred read failure group for each instance.

You can use views to identify preferred read failure groups, such as the V$ASM_DISK view that shows whether a disk is a preferred read disk by the value in the PREFERRED_READ column. You can also use V$ASM_DISK to verify whether local disks in an extended cluster are preferred read disks. Use the Oracle ASM disk I/O statistics to verify that read operations are using the preferred read disks that you configured.

If a disk group is not optimally configured for an extended cluster, then Oracle ASM records warning messages in the alert logs. To identify specific performance issues with Oracle ASM preferred read failure groups, use the V$ASM_DISK_IOSTAT view. This view displays disk I/O statistics for each Oracle ASM client. You can also query the V$ASM_DISK_IOSTAT view on a database instance. However, this query only shows the I/O statistics for the database instance. In general, optimal preferred read extended cluster configurations balance performance with disk group availability.

Both the Oracle ASM clients and Oracle ASM require Oracle Database 11g Release 1 (11.1) or higher to use preferred read failure groups.

Note:

If you do not specify failure groups for a disk group, each disk in the disk group belongs to its own failure group. Oracle does not recommend that you configure multiple preferred read failure groups in a disk group for an Oracle ASM instance. For any given instance, if you specify multiple failure groups in the same disk group as preferred read, a warning message is written to the alert log.

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/ostmg/asm-files-directories-templates.html#GUID-CAA9B6DA-5F5F-49B9-9A9D-7C3D265FA0D7

 

 

Next

Set the attributes of an existing ASM disk group

Perform ongoing maintenance tasks on ASM disk groups

Explain key performance and scalability considerations for ASM disk groups

Administering ASM Files, Directories and Templates

Use client tools to access ASM files

Describe the format of a fully qualified ASM file name

Explain how ASM files, directories and aliases are created and managed

Describe and manage disk group templates

Administering Oracle CloudFS

Perform day to day Clusterware administration tasks

Perform Oracle Cluster Registry (OCR) backup and recovery

Perform day to day Clusterware administration tasks
Perform Oracle Cluster Registry (OCR) backup and recovery
Manage network settings
Explain the scope and capabilities of what-if command evaluation
Policy-Based Cluster Management

Next

Patching Grid Infrastructure

Explain the types of patches and upgrades available

Plan for rolling patches and rolling upgrades
Compare software versions with the active version
Install a patchset with the Oracle Universal Installer (OUI)
Install a patch with the opatch utility
Troubleshooting Oracle Clusterware

Next

Patching Grid Infrastructure 12c2 and Database - Demo

Command Line Client Tools To Adminster Clusterware

Server Control (SRVCTL) Command

Use the Server Control (SRVCTL) utility to manage various components and applications in your cluster.

SRVCTL is installed on each node in a cluster by default. To use SRVCTL, log in to the operating system of a node and enter the SRVCTL command and its parameters in case-sensitive syntax.

The version of SRVCTL must be the same as the version of the object (listeners, Oracle ASM instances, Oracle RAC databases and their instances, and services) being managed. To ensure the versions are the same release, run SRVCTL commands from the Oracle home of the database or object you are managing.

• SRVCTL does not support concurrent executions of commands on the same object. Therefore, run only one SRVCTL command at a time for each database, service, or other object.
• When specifying a comma-delimited list as part of a SRVCTL command, there should not be any spaces between the items in the list. For example: srvctl add database -serverpool "serverpool1,serverpool3"

You can enclose a comma delimited list in double quotation marks in a Linux or UNIX environment but they
will be ignored.
• If you are entering a SRVCTL command, and you want to continue the input on a new line, then you can use the operating system continuation character. In Linux, this is the backslash (\) symbol.

• A SRVCTL command that produces no output is a successful command. Not all SRVCTL commands return a message when it completes, successfully. However,if a SRVCTL command fails, then it always returns an error message.
• You can use the -eval parameter with several SRVCTL commands. This parameter, when you use it, enables you to simulate running a command without making any changes to the system. SRVCTL returns output that informs you what will happen if you run a particular command. For example, to know what might happen if you relocate a server:

The -eval parameter is available with the following commands:
– srvctl add database
– srvctl add service
– srvctl add srvpool
– srvctl modify database
– srvctl modify service
– srvctl modify srvpool
– srvctl relocate server
– srvctl relocate service
– srvctl remove srvpool
– srvctl start database
– srvctl start service
– srvctl stop database
– srvctl stop service

Before Oracle Database 12c, the SRVCTL command-line interface used single letter parameters. However, this imposes a limit on the number of unique parameters available for use with SRVCTL commands. SRVCTL command parameters introduced in Oracle Database 12c are full words instead of single letters, such as -multicastport and -subdomain.
To support backward compatibility, you can use a mix of single-letter parameters and
new keyword parameters. New parameters introduced with keywords can be used with
single letter parameters.

To see help for all SRVCTL commands, from the command line enter:
srvctl -help
To see the command syntax and a list of parameters for each SRVCTL command,
from the command line enter:
srvctl command (or verb) object (or noun) -help
When you request online help for a command using -help, SRVCTL prints the full words for each parameter. You can obtain the single-letter equivalents, where applicable, by adding the -compatible parameter after the -help parameter. For
example:
$ srvctl config database -help -compatible

The preceding command prints usage information for the srvctl config database command, listing all parameters as full words followed by their single-letter equivalents in parentheses, where applicable.

To see the SRVCTL version number enter:
$ srvctl -version

manage databases and log in as the Oracle Grid Infrastructure software owner (for example, ora_asm) to manage the Oracle ASM instances.
Users who are members of the OSDBA operating system group can start and stop the database. To stop and start an Oracle ASM instance, you must be a member of the OSASM operating system group.

To create or register objects such as listeners, Oracle Notification Services, and
services, you must be logged in to the operating system as the software owner of the
Oracle home. The objects you create or register for that Oracle home will run under
the user account of the owner of the Oracle home. Databases run as the database
installation owner of the home from which they run.

• Use SRVCTL to manage Oracle-supplied resources such as listener, instances,
disk groups, and networks, and CRSCTL for managing Oracle Clusterware and its
resources.
Note:
Oracle strongly discourages directly manipulating Oracle-supplied resources
(resources whose names begin with ora) using CRSCTL. This could adversely
impact the cluster configuration.
• Although you may be able to cancel running SRVCTL commands by pressing the
Control-C keys, you may corrupt your configuration data by doing this.
You are strongly advised not to attempt to terminate SRVCTL in this manner.

Use the full keyword for each parameter instead. To support older tools and scripts
that still use single-character parameters, the current version of SRVCTL supports
both single-character parameters and full keyword parameters.
The command reference in this appendix shows the keywords for each SRVCTL
command. Table G-2 lists the deprecated single-character parameters.
Appendix G
Additional SRVCTL Topics
Command Deprecated Parameters
srvctl modify asm -node node_name
srvctl modify instance -z
Instead, use the -node option with the value set to ""
srvctl modify gns [-ip ip_address] [-advertise host_name -address address]
[-delete host_name -address address] [-createalias name -
alias alias] [-deletealias alias]
Use the srvctl update gns command instead.
srvctl * oc4j The oc4j noun has been deprecated and replaced with
qosmserver. SRVCTL still accepts the oc4j noun until it is
desupported.
srvctl add service The PRECONNECToption with the -tafpolicy parameter is
deprecated.
srvctl modify service The -failovermethod {NONE | BASIC} is deprecated.
The PRECONNECToption with the -tafpolicy parameter is
deprecated.
G.8 SRVCTL Command Reference
This section lists and describes all SRVCTL commands that are run from the Oracle
Grid Infrastructure home.
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for
SRVCTL command usage information
G.8.1 srvctl add asm
Adds a record for an Oracle ASM instance to the entire cluster.
This command must be run only one time from the Oracle Grid Infrastructure home.
Syntax
srvctl add asm [-listener listener_name] [-pwfile password_file_path
[-flex [-count {number_of_instances | ALL}] | -proxy [-spfile
server_parameter_file_path]]
Appendix G
SRVCTL Command Reference
G-13
Parameters
Table G-4 srvctl add asm Command Parameters
Parameter Description
-listener listener_name Enter the name of a listener. If you do not
specify this parameter, then the listener name
defaults to LISTENER.
-pwfile password_file_path Enter the full path to the location of the
password file on Oracle ASM.
-flex [-count {number_of_instances |
ALL}] |
-proxy [-spfile
server_parameter_file_path]
Specify that the Oracle ASM instances are
configured as Oracle Flex ASM instances. You
can optionally specify the number of Oracle
ASM instances to create or that an Oracle
ASM instance should be created on all nodes.
Alternatively, you can specify the -proxy
parameter to configure the Oracle ASM
Dynamic Volume Manager proxy instance
resource. Optionally, you can specify the path
to the server parameter file.
Usage Notes
To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL binary
in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have Oracle
RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the
database home to manage Oracle ASM.
Example
To add a clusterware resource for Oracle ASM to every node in the cluster, use the
following command:
$ srvctl add asm
G.8.2 srvctl config asm
Displays the configuration for all Oracle ASM instances.
Syntax
srvctl config asm [-proxy] [-detail]
Parameters
Table G-5 srvctl config asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether the
Oracle ASM configuration to display is a proxy instance.
-detail Optionally, you can use this parameter to print detailed
configuration information.
Appendix G
SRVCTL Command Reference
G-14
Usage Notes
• Use this command only with Oracle Clusterware.
• To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL
binary in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have
Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL
binary in the database home to manage Oracle ASM.
Example
This command returns output similar to the following:
$ srvctl config asm
ASM Home: /u01/app/12.1.0/grid
ASM Listener: LISTENER
ASM instance count: 3
Password file:
G.8.3 srvctl disable asm
Disables the Oracle ASM proxy resource.
Oracle ASM will restart if it contains Oracle Clusterware data or if the node restarts
and it was running before the node failed. The srvctl disable asm command also
prevents the srvctl start asm command from starting Oracle ASM instances.
Disabling the Oracle ASM proxy resource prevents the databases and disk groups
from starting because they depend on the Oracle ASM proxy resource.
Syntax
srvctl disable asm [-proxy] [-node node_name]
Parameters
Table G-6 srvctl disable asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
disabling a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
disable Oracle ASM.
Usage Notes
• To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL
binary in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have
Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL
binary in the database home to manage Oracle ASM.
• Oracle ASM is part of the Oracle Clusterware stack and when OCR and voting
files are stored on Oracle ASM, then Oracle ASM starts when OHASD starts the
Oracle Clusterware stack. The srvctl disable asm command does not prevent the
Oracle ASM instance managed by OHASD from starting. Oracle ASM, therefore,
starts as needed by the Oracle Clusterware stack.
Appendix G
SRVCTL Command Reference
G-15
The srvctl disable asm command prevents the Oracle ASM Oracle Clusterware
proxy resource, and any resources that depend on it, from starting. So, the
command prevents Oracle Clusterware-managed objects, such as databases, disk
groups, and file systems that depend on Oracle ASM, from starting. For example,
the srvctl start database | diskgroup | filesystem command fails to start any of
those objects on nodes where the Oracle ASM Oracle Clusterware proxy resource
is disabled. The command also prevents the srvctl start asm command from
starting Oracle ASM on remote nodes.
Example
The following example disables Oracle ASM on a node named crmnode1:
$ srvctl disable asm -node crmnode1
G.8.4 srvctl enable asm
Enables an Oracle ASM instance.
Syntax
srvctl enable asm [-proxy] [-node node_name]
Parameters
Table G-7 srvctl enable asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
enabling a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
enable Oracle ASM.
Usage Notes
To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL binary
in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have Oracle
RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the
database home to manage Oracle ASM.
Example
An example of this command is:
$ srvctl enable asm -node crmnode1
G.8.5 srvctl getenv asm
Displays the values for environment variables associated with Oracle ASM.
Syntax
srvctl getenv asm [-envs "name_list"]
Appendix G
SRVCTL Command Reference
G-16
Usage Notes
• If you choose not use the -env parameter, then the values of all environment
variables associated with Oracle ASM are displayed.
• You can specify a comma-delimited list of the names of environment variables for
which you want to retrieve the values.
Example
The following example displays the current values for all the environment variables
used by Oracle ASM:
$ srvctl getenv asm
G.8.6 srvctl modify asm
Modifies the listener used by Oracle ASM, the disk group discovery string used by
Oracle ASM, or the SPFILE used by Oracle ASM for a noncluster database or a
cluster database.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl modify asm [-listener listener_name] [-pwfile password_file_path]
[-count {number_of_instances | ALL}] [-diskstring asm_diskstring]
[-spfile spfile_path_name [-proxy] [-force]]
Parameters
Parameter Description
-listener
listener_name
Specify the name of the listener with which Oracle ASM registers.
-pwfile
password_file_path
Specify the full path to the location of the password file for Oracle
ASM.
-count
{number_of_instances |
ALL}
Specify the number of Oracle ASM instances to create, or that an
Oracle ASM instance should be created on all nodes.
-diskstring
asm_diskstring
Specify a new Oracle ASM disk group discovery string.
-spfile
spfile_path_name
Specify the path to the new spfile to be used by Oracle ASM.
-proxy Use this parameter to specify an Oracle ASM proxy instance.
–force Use this parameter to force modification of Oracle ASM.
Appendix G
SRVCTL Command Reference
G-17
Example
An example of this command to modify the configuration of Oracle ASM is:
$ srvctl modify asm -listener lsnr1
G.8.7 srvctl predict asm
Predicts the consequences of Oracle ASM failure.
Syntax
srvctl predict asm [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify a particular node on which you want to predict the
consequences of an Oracle ASM failure.
• You can choose verbose output.
Example
An example of this command to predict the consequences of an Oracle ASM failure on
a particular node:
$ srvctl predict asm -node crmnode2
G.8.8 srvctl relocate asm
Relocates an Oracle Flex ASM instance from one Hub Node of an Oracle Flex Cluster
to another.
Syntax
srvctl relocate asm -currentnode current_node [-targetnode target_node] [-force]
Parameters
Table G-8 srvctl relocate asm Parameters
Parameter Description
-currentnode
current_node
Name of the node on which the Oracle Flex ASM instance currently
resides.
-targetnode
target_node
Name of the node to which you want to relocate the Oracle Flex
ASM instance.
-force Force the relocation of the Oracle Flex ASM instance.
Usage Notes
• You cannot use this command if there is only one Oracle Flex ASM instance
running.
• Because of bootstrap issues between Oracle ASM and Oracle Clusterware, on the
node where Oracle Clusterware uses Oracle ASM run either crsctl stop crs or
Appendix G
SRVCTL Command Reference
G-18
crsctl stop cluster to stop Cluster Ready Services on the node before you
relocate the Oracle ASM instance.
Example
An example of this command to relocate an Oracle Flex ASM instance from the
current node to a node named hubnode2 is:
$ srvctl relocate asm -currentnode hubnode1 -targetnode hubnode2
G.8.9 srvctl remove asm
Removes the Oracle ASM resource from Oracle Clusterware management.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl remove asm [-proxy] [-force]
Parameters
Table G-9 srvctl remove asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
removing a proxy Oracle ASM configuration.
-force Forcefully removes an Oracle ASM resource (ignores any
dependencies).
Example
An example of this command is:
$ srvctl remove asm -force
G.8.10 srvctl setenv asm
Sets Oracle ASM environment configurations.
Syntax
Use this command with one of the following syntaxes:
srvctl setenv asm -envs "name=value,[...]"
srvctl setenv asm -env "name=value"
Appendix G
SRVCTL Command Reference
G-19
Parameters
Table G-10 srvctl setenv asm Command Parameters
Parameter Description
-envs "name=value,
[...]"
Use this parameter to specify either a single name-value pair or a
comma-delimited list of multiple name-value pairs of environment
variables enclosed in double quotation marks ("").
-env "name=value" Use this parameter to enable a single environment variable to be
set to a value that contains commas or other special characters,
enclosed in double quotation marks ("").
Example
The following example sets the language environment configuration for Oracle ASM:
$ srvctl setenv asm -envs "LANG=en"
G.8.11 srvctl start asm
Starts an Oracle ASM instance.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl start asm [-proxy] [-node node_name [-startoption start_options]]
Parameters
Table G-11 srvctl start asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
starting a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
start Oracle ASM.
Note: You can use this parameter only with Oracle Clusterware.
Appendix G
SRVCTL Command Reference
G-20
Table G-11 (Cont.) srvctl start asm Command Parameters
Parameter Description
-startoption
start_options
Optionally, you can specify options to the startup command, such
as OPEN, MOUNT, or NOMOUNT
Note: For multi-word startup options, such as read only and read
write, separate the words with a space and enclose in double
quotation marks (""). For example, "read only".
See Also: SQL*Plus User's Guide and Reference for more
information about startup options
Examples
An example of this command to start an Oracle ASM instance on a single node of a
cluster is:
$ srvctl start asm -node crmnode1
An example to start an Oracle ASM instance on all nodes in the cluster, or for a
noncluster database, is:
$ srvctl start asm
G.8.12 srvctl status asm
Displays the status of an Oracle ASM instance.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl status asm [-proxy] [-node node_name] [-detail] [-verbose]
Parameters
Table G-12 srvctl status asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to display the
status for an Oracle ASM proxy instance.
-node node_name Optionally, you can specify a particular node. If you do
not specify this parameter, then SRVCTL displays the
status of all Oracle ASM instances.
-detail Print detailed status information.
Appendix G
SRVCTL Command Reference
G-21
Table G-12 (Cont.) srvctl status asm Command Parameters
Parameter Description
-verbose Displays verbose output.
Example
This command returns output similar to the following:
$ srvctl status asm -verbose
ASM is enabled
ASM is running on node2, node3, node4
ASM instance +ASM2 is running on node node2
Number of clients connected: 4
Names of clients: db002, db003, +IOS1, clicluster1:later3
ASM instance +ASM3 is running on node node3
Number of clients connected: 2
Names of clients: db001, +IOS2
ASM instance +ASM4 is running on node node4
Number of clients connected: 2
Names of clients: db004, db005
G.8.13 srvctl stop asm
Stops an Oracle ASM instance.
Syntax
srvctl stop asm [-proxy] [-node node_name] [-stopoption stop_options] [-force]
Parameters
Table G-13 srvctl stop asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
stopping a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
stop Oracle ASM.
If you do not specify this parameter, then SRVCTL stops the Oracle
ASM instance on every active node in the cluster.
Note: You can use this parameter only with Oracle Clusterware.
-stopoption
stop_options
Optionally, you can specify options to the shutdown command,
such as NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT.
See Also: SQL*Plus User's Guide and Reference for more
information about shutdown options
-force Optionally, you can use this parameter to stop disk groups, file
systems, and databases that depend on Oracle ASM.
Appendix G
SRVCTL Command Reference
G-22
Usage Notes
• To manage Oracle ASM on Oracle Database 12c installations, use SRVCTL in the
Oracle Grid Infrastructure home for a cluster (Grid home). If you have Oracle RAC
or Oracle Database installed, then you cannot use SRVCTL in the database home
to manage Oracle ASM.
• You cannot use this command when OCR is stored in Oracle ASM because it will
not stop Oracle ASM. To stop Oracle ASM you must shut down Oracle
Clusterware.
Example
An example of this command is:
$ srvctl stop asm -node crmnode1 -stopoption IMMEDIATE
G.8.14 srvctl unsetenv asm
Unsets the Oracle ASM environment configurations.
Syntax
srvctl unsetenv asm -envs "name_list"
Usage Notes
Use the -envs parameter to specify a comma-delimited list of the names of
environment variables enclosed in double quotation marks ("").
Example
The following example unsets the environment configuration for an Oracle ASM
environment variable:
$ srvctl unsetenv asm -envs "CLASSPATH"
G.8.15 srvctl add cvu
Adds the Cluster Verification Utility (CVU) to an Oracle Clusterware configuration.
Note:
This command is only available with Oracle Clusterware.
Syntax and Parameters
Use the srvctl add cvu command with the following syntax:
srvctl add cvu [-checkinterval time_in_minutes]
Appendix G
SRVCTL Command Reference
G-23
Usage Notes
• Optionally, you can change the interval between checks. By default, CVU runs
once every 6 hours and verifies the health of the cluster. The shortest interval you
can specify for CVU check is 10 minutes.
• Run this command while logged in as the Grid home user.
Example
To add CVU with a check interval of 6 hours, use the following command:
$ srvctl add cvu -checkinterval 360
G.8.16 srvctl config cvu
Displays the time interval, in minutes, between CVU checks.
Syntax and Parameters
Use the srvctl config cvu command with the following syntax:
srvctl config cvu
This command has no parameters.
Example
This command returns output similar to the following:
CVU is configured to run once every 360 minutes
G.8.17 srvctl disable cvu
Disables the Cluster Verification Utility (CVU) for Oracle Clusterware management (if
enabled).
Syntax
srvctl disable cvu [-node node_name]
Parameters
Optionally, you can specify the name of a particular node on which you want to disable
CVU. Otherwise, SRVCTL disables CVU on all nodes.
Example
An example of this command to disable CVU on a node named crmnode1 is:
$ srvctl disable cvu -node crmnode1
G.8.18 srvctl enable cvu
Enables the Cluster Verification Utility (CVU) for Oracle Clusterware management (if
disabled).
Appendix G
SRVCTL Command Reference
G-24
Syntax
srvctl enable cvu [-node node_name]
Parameters
Optionally, you can specify the name of a particular node on which you want to enable
CVU. Otherwise, SRVCTL enables CVU on all nodes.
Example
An example of this command to enable CVU on a node named crmnode1 is:
$ srvctl enable cvu -node crmnode1
G.8.19 srvctl modify cvu
Modifies the check interval for CVU.
Syntax
srvctl modify cvu [-checkinterval time_in_minutes]
Parameters
By default, CVU runs once every 360 minutes (six hours) and verifies the health of
cluster. If you change the interval, then the shortest interval you can specify for CVU
check is 10 minutes.
Example
An example of this command to modify CVU to have a check interval of 4 hours is:
$ srvctl modify cvu -checkinterval 240
G.8.20 srvctl relocate cvu
Temporarily relocates the CVU to another node in a cluster.
Syntax
srvctl relocate cvu [-node node_name]
Usage Notes
Optionally, you can specify a particular node to which you want to relocate CVU.
Example
An example of this command to temporarily relocate CVU from the local node to the
cluster node named crmnode2 is:
$ srvctl relocate cvu -node crmnode2
Appendix G
SRVCTL Command Reference
G-25
G.8.21 srvctl remove cvu
Removes CVU from an Oracle Clusterware configuration.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl remove cvu [-force]
Usage Notes
Use the -force parameter to remove a CVU resource that is running or starting.
G.8.22 srvctl start cvu
Starts the CVU resource on one node in a cluster. If you specify a node name, then
CVU starts on that node.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl start cvu [-node node_name]
Usage Notes
Optionally, you can specify a particular node to which you want to start CVU.
Otherwise, SRVCTL starts CVU on all nodes.
Example
An example of this command to start CVU on a single node of a cluster is:
$ srvctl start cvu -node crmnode1
Appendix G
SRVCTL Command Reference
G-26
G.8.23 srvctl status cvu
Displays the current state of the CVU resource on one node in a cluster. If you specify
a node name, then the command checks CVU status on that node.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status cvu [-node node_name]
Usage Notes
Optionally, you can specify a particular node where the CVU resource is running, if it is
not the local node.
Example
An example of this command to check the status of CVU on the node in the cluster
named crmnode1 is:
$ srvctl status cvu -node crmnode1
G.8.24 srvctl stop cvu
Stops the Cluster Verification Utility (CVU) that is either in the running or starting state.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl stop cvu [-force]
Usage Notes
Optionally, you can specify the -force parameter to stop CVU if it is a dependant
resource.
Example
An example of this command to stop CVU:
$ srvctl stop cvu
G.8.25 srvctl add exportfs
Creates an export file system configuration in Oracle Clusterware.
Appendix G
SRVCTL Command Reference
G-27
Syntax
srvctl add exportfs -name unique_name -id havip_name -path path_to_export
[-clients export_clients] [-options export_options] [-type NFS | SMB]
Parameters
Table G-14 svrctl add exportfs Command Parameters
Parameter Description
-name unique_name Enter a unique name for the export file system that you are
creating. This parameter is required.
-id havip_name Enter the number or name that identifies an existing HAVIP, that
you specified in the srvctl add havip command. This parameter
is required.
-path path_to_export Enter the path to the Oracle Automatic Storage Management
Cluster File System (Oracle ACFS) that you want to export. This
parameter is required.
-clients
export_clients -
options export_options
Optionally, enter a comma-delimited list of clients to which you
want the file system exported. You can enter net groups and
wildcards. For example:
-clients @netgroup1,
*.us.domain.com,
16.140.0.0, hostname1
Note: You can use the -clients parameter only for Linux systems.
Use the -options parameter for Solaris and AIX systems.
-type NFS | SMB Specify the export type (NFS for a network file system or SMB for
Oracle ACFS server message block). The default is NFS for Linux
and UNIX platforms, and SMB for Windows.
Usage Notes
You must run this command as root on Linux and UNIX platforms.
Example
To export with operating system defaults:
# srvctl add exportfs -name cifsExport -path "/acfs1" -options "browsable = yes,read
only = no,comment = acfs1"
To export read-only to certain clients:
# srvctl add exportfs -name export1 -id havip1 -path /u01/db1 -clients node1 -
options ro
G.8.26 srvctl config exportfs
Displays the configuration information for the export file system in Oracle Clusterware.
Syntax
srvctl config exportfs [-name unique_name | -id havip_name]
Appendix G
SRVCTL Command Reference
G-28
Parameters
Table G-15 srvctl config exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export for which you want to
display the configuration.
-id havip_name Enter the name of a HAVIP to display the configuration of all the
NFS exports attached to the specific HAVIP.
Example
If you specify the -name parameter, then this command returns output similar to the
following, whether you specify -name or -id:
$ srvctl config exportfs -id havip1
export file system kep1 is configured
Exported path: /scratch/ghnew/base/mymount3
Export options:
Export Type:
Exported clients:
export file system kexp2 is configured
Exported path: /scratch/ghnew/base/mymount3
Export options:
Export Type:
Exported clients:
G.8.27 srvctl disable exportfs
Disables an export file system managed by Oracle Clusterware.
Syntax
srvctl disable exportfs -name filesystem_name
Usage Notes
• This command takes only the unique name of the file system you want to disable.
• You must run this command as root user on Linux and UNIX platforms.
Example
The following example disables an export file system called export1:
# srvctl disable exportfs -name export1
G.8.28 srvctl enable exportfs
Enables an export file system configuration in Oracle Clusterware.
Syntax
srvctl enable exportfs -name filesystem_name
Appendix G
SRVCTL Command Reference
G-29
This command takes only the name of the file system you want to enable, which is a
required parameter.
Usage Notes
You must run this command as the root user on Linux and UNIX platforms.
Example
The following command example enables a file system named export1:
# srvctl enable exportfs -name export1
G.8.29 srvctl modify exportfs
Modifies an export file system configuration in Oracle Clusterware.
Syntax
srvctl modify exportfs -name unique_name [-path path_to_export]
[-clients node_list] [-options nfs_options_string]
Parameters
Table G-16 srvctl modify exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export file system to modify.
This parameter is required.
-path path_to_export You can modify the path to the Oracle Automatic Storage
Management Cluster File System (Oracle ACFS) where the export
is located.
-clients node_list You can modify the comma-delimited list of clients (hosts) to where
the file system is exported. You can enter net groups and
wildcards. For example:
-clients @netgroup1,*.us.domain.com,16.140.0.0, hostname1
Note: You can use the -clients parameter only for Linux systems.
Use the -options parameter for Solaris and AIX systems.
-options
nfs_client_string
Use this parameter to modify the export options for the export file
system.
Usage Notes
• You must run this command as root user on Linux and UNIX platforms.
• You must start and stop the NFS export before any changes you make take effect.
Example
The following command example modifies the path of an export file system named
exportfs1:
# srvctl modify exportfs -name exportfs1 -path /mnt/racdb1
Appendix G
SRVCTL Command Reference
G-30
G.8.30 srvctl remove exportfs
Removes the specified export file system configuration.
Syntax
srvctl remove exportfs -name exportfs_name [-force]
Parameters
Table G-17 srvctl remove exportfs Command Parameters
Parameter Description
-name exportfs_name Enter the unique name of the export file system you want to
remove.
-force Use this parameter to ignore any dependencies and forcibly
remove the export file system.
Usage Notes
• You must run this command as root user on Linux and UNIX platforms.
• If you do not use the -force parameter, then you must first stop the export file
system you want to remove before you remove it.
• If you use the -force parameter, then the resulting configuration can cause errors
when attempting to shut down the Oracle Clusterware stack.
Examples
To remove the stopped export file system named export1:
# srvctl remove exportfs -name export1
To remove a running export file system, leaving it exported:
# srvctl remove exportfs -name export1 -force
G.8.31 srvctl start exportfs
Starts an export file system configuration in Oracle Clusterware.
Syntax
srvctl start exportfs {-name unique_name | -id havip_name}
Parameters
Table G-18 srvctl start exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export you want to start.
-id havip_name The unique ID associated with the HAVIP resource.
Appendix G
SRVCTL Command Reference
G-31
Example
To start an export file system:
$ srvctl start exportfs -name export1
G.8.32 srvctl status exportfs
Displays the status of an export file system configuration.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status exportfs [-name unique_name | -id havip_name]
Parameters
Table G-19 srvctl status exportfs Command Parameters
Parameter Description
-name unique_name Optionally, you can specify the unique name of the NFS export for
which you want to display the status.
-id havip_name Alternatively, you can specify the name of an HAVIP resource and
display the status of all of the NFS exports associated with the
specified HAVIP resource.
Usage Notes
If you do not specify any parameters, then SRVCTL displays the status for all NFS
exports in the cluster.
Example
This command returns output similar to the following:
$ srvctl status exportfs
export file system export1 is enabled
export file system export1 is not exported
export file system export2 is enabled
export file system export2 is exported on node node1
G.8.33 srvctl stop exportfs
Stops an export file system configuration managed by Oracle Clusterware.
Syntax
srvctl stop exportfs {-name unique_name | -id havip_name} [-force]
Appendix G
SRVCTL Command Reference
G-32
Parameters
Table G-20 srvctl stop exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export you want to stop.
-id havip_name Alternatively, you can specify the name of an HAVIP. If you specify
this parameter, then SRVCTL stops all of the NFS exports
associated with the HAVIP resource you specify.
–force Stop the NFS export, ignoring errors.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl stop exportfs -name export1
G.8.34 srvctl add filesystem
Adds a device containing a file system (Oracle Automatic Storage Management
Cluster File System (Oracle ACFS) or other) to the Oracle Clusterware stack for
automount and high availability.
An Oracle ACFS file system resource is typically created for use with application
resource dependency lists. For example, if an Oracle ACFS file system is configured
for use as an Oracle Database home, then a resource created for the file system can
be included in the resource dependency list of the Oracle Database application. This
will cause the file system and stack to be automatically mounted because of the start
action of the database application.
Syntax
srvctl add filesystem -device volume_device -path mountpoint_path
[-volume volume_name] [-diskgroup disk_group_name]
[-node node_list | -serverpool server_pool_list] [-user user_list]
[-fstype {ACFS | EXT3 | EXT4}] [-fsoptions options] [-description description]
[-appid application_id] [-autostart {ALWAYS | NEVER | RESTORE}]
Note:
Oracle supports the EXT3 and EXT4 values for the -fstype parameter only for
Linux.
Appendix G
SRVCTL Command Reference
G-33
Parameters
Table G-21 srvctl add filesystem Command Parameters
Parameter Description
-device volume_device Specify the path to the file system volume device you want to add.
-path mountpoint_path Specify the mount point path that is used to set up dependencies
on other resources for nested mounts. This must be an absolute
path.
-volume volume_name Optionally, you can specify the name of the volume.
-diskgroup
disk_group_name
Optionally, you can specify the name of the Oracle ACFS disk
group to which you want to add the device.
-node node_list | -
serverpool
server_pool_list
Optionally, you can specify a comma-delimited list of nodes on
which to mount the file system device. If you specify a list of nodes
or a server pool, then SRVCTL creates a single-node file system
resource. Without any nodes or server pools, SRVCTL creates a
file system resource that runs on every cluster node.
Alternatively, you can specify a comma-delimited list of server
pools in which a file system will run. If you specify a list of server
pools, then you dynamically limit the number or type of nodes on
which a file system will run. This does not count as a cluster-wide
file system for later usage that may require a cluster-wide Oracle
ACFS resource, such as HANFS.
Note: Nodes and server pools are mutually exclusive.
-user user_list Optionally, you can specify a comma-delimited list of users
authorized to mount and unmount the file system.
If you specify no users, then only root can mount and unmount the
file system. If the file system is for Oracle Database software, then
specify the name of the Oracle home owner.
-fstype {ACFS | EXT3 |
EXT4}
Optionally, you can specify the type of file system to be mounted.
The default value is ACFS.
If the type of file system to be mounted is not ACFS, then it must be
a single-node file system, and you must specify -node or -
serverpool.
-fsoptions options Optionally, you can specify options used to mount the file system.
The options are file system and operating system dependent.
-description
description
Optionally, you can specify a description of the file system. This is
stored as an attribute for later viewing by an administrator.
-appid application_id Optionally, you can specify an application ID, which is a unique
identifier used to group file systems into logical groupings. You can
use this method to group file systems that may be different on
different nodes but are used by an application that must have a
dependency on the resource type, which is ora.id.fs.type.
-autostart {ALWAYS |
NEVER | RESTORE}
Optionally, you can specify the file system resource autostart
policy.
ALWAYS: The file system resource always automatically starts.
NEVER: The file system does not automatically start.
RESTORE: The file system is restored to its last state. This is the
default option.
Appendix G
SRVCTL Command Reference
G-34
Usage Notes
• Use this command only with Oracle Clusterware.
• You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms.
• This command must be run only one time from the Oracle Grid Infrastructure
home.
• To manage Oracle ACFS on Oracle Database 12c installations, use the SRVCTL
binary in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have
Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL
binary in the database home to manage Oracle ACFS.
Examples
To add the d1volume1-295 disk device in the disk group RAC_DATA as the Oracle ACFS
volume VOLUME1 with a mount point of /oracle/cluster1/acfs:
# srvctl add filesystem -device /dev/asm/d1volume1-295
-path /oracle/cluster1/acfs1
To add an Oracle ACFS file system on the dynamic volume device asm-test-55, with
this file system mounted on one of the specified nodes at a time:
# srvctl add filesystem -fstype ACFS -device asm-test-55 -path myacfs
-node node1,node2,node3
G.8.35 srvctl config filesystem
Displays the configuration for a specific file system resource.
Note:
Use this command only with Oracle Clusterware.
Syntax
srvctl config filesystem -device volume_device
Usage Notes
Use the -device parameter to specify the path to the file system resource for which you
want to display the configuration.
Examples
The following example lists the configuration of all file systems:
$ srvctl config filesystem
The following example displays the configuration for a specific device:
$ srvctl config filesystem -device /dev/asm/d1volume1-295
Appendix G
SRVCTL Command Reference
G-35
G.8.36 srvctl disable filesystem
Disables a specific Oracle Clusterware-managed file system volume.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl disable filesystem -device volume_device
Usage Notes
Specify the path to the file system volume you want to disable.
Example
An example of this command is:
# srvctl disable filesystem -device /dev/asm/racvol1
G.8.37 srvctl enable filesystem
Enables an Oracle ACFS volume or generic file system in Oracle Clusterware.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl enable filesystem -device volume_device
Usage Notes
Specify the path to the volume device you want to enable.
Example
An example of this command is:
# srvctl enable filesystem -device /dev/asm/racvol1
Appendix G
SRVCTL Command Reference
G-36
G.8.38 srvctl modify filesystem
Modifies the configuration of the file system resource.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl modify filesystem -device volume_device -user user_name
[-path mountpoint_path] [-node node_list | -serverpool
server_pool_list] [-fsoptions options] [-description description]
[-autostart {ALWAYS | NEVER | RESTORE}]
Parameters
Table G-22 srvctl modify filesystem Command Parameters
Parameter Description
-device volume_device Specify the path to the file system volume device you want to
modify.
-user user_name Specify the name of the user that is authorized to mount and
unmount the file system. If you do not specify this parameter, then
SRVCTL defaults to the user running the command.
-path mountpoint_path Modify the mount point path that is used to set up dependencies on
other resources for nested mounts. This must be an absolute path.
-node node_list | -
serverpool
server_pool_list
Modify a comma-delimited list of nodes on which to mount the file
system device. If you specify a list of nodes or a server pool, then
SRVCTL creates a single-node file system resource. Without any
nodes or server pools, SRVCTL creates a file system resource that
runs on every cluster node.
Alternatively, you can modify a comma-delimited list of server pools
in which a file system will run. If you specify a list of server pools,
then you dynamically limit the number or type of nodes on which a
file system will run. This does not count as a cluster-wide file
system for later usage that may require a cluster-wide Oracle
ACFS resource, such as HANFS.
Note: Nodes and server pools are mutually exclusive.
-fsoptions options Modify options used to mount the file system. The options are file
system and operating system dependent.
-description
description
Modify the description of the file system.
-autostart {ALWAYS |
NEVER | RESTORE}
Modify the file system resource autostart policy.
ALWAYS: The file system resource always automatically starts
NEVER: The file system does not automatically start
RESTORE: The file system is restored to its last state. This is the
default option.
Appendix G
SRVCTL Command Reference
G-37
Usage Notes
• You must run this command as root user on Linux and UNIX platforms.
• When performing online changes to the file system resource, the changes take
effect only after the resource is next (re)started.
Example
The following example changes the authorized user to sysad for the RACVOL1 volume:
# srvctl modify filesystem -device /dev/asm/racvol1 -user sysad
G.8.39 srvctl predict filesystem
Predicts the consequences of file system failure.
Syntax
srvctl predict filesystem -device volume_device_name [-verbose]
Usage Notes
• Specify the path name of the file system volume device.
• Optionally, you can choose verbose output.
Example
An example of this command is:
$ srvctl predict filesystem -device /dev/asm/volume1-123
G.8.40 srvctl remove filesystem
Removes a specific file system resource from the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl remove filesystem -device volume_device_name [-force]
Usage Notes
• Specify the path to the file system resource device you want to remove.
• Optionally, you can use the -force parameter to ignore any resource
dependencies and forcibly remove the resource from the cluster.
• You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms.
Appendix G
SRVCTL Command Reference
G-38
Examples
An example of this command is:
# srvctl remove filesystem -device /dev/asm/racvol1
G.8.41 srvctl start filesystem
Starts (mounts) the file system resource.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl start filesystem -device volume_device [-node node_name]
Parameters
Table G-23 srvctl start filesystem Command Parameters
Parameter Description
-device volume_device Specify the path of the file system resource device that you want to
start.
-node node_name Optionally, you can specify the name of the node on which the file
system resource should be started.
If you do not specify this parameter, then SRVCTL starts the file
system resource on all the available nodes in the cluster.
Usage Notes
You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms, or as a configured file system user.
See Also:
srvctl add filesystem for more information about configuring file system users
Examples
To start a file system on all configured nodes in the cluster:
$ srvctl start filesystem -device /dev/asm/data_db1-68
To start the file system on node1:
$ srvctl start filesystem -device /dev/asm/data_db1-68 -node node1
Appendix G
SRVCTL Command Reference
G-39
G.8.42 srvctl status filesystem
Displays the status of the file system resource.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status filesystem [-device volume_device] [-verbose]
Usage Notes
• Optionally, you can specify the path of the file system resource for which you want
to obtain the status. If you do not specify this parameter, then SRVCTL displays
the status of all file systems.
• Optionally, you can use the -verbose parameter to display detailed output.
Examples
This command displays output similar to the following, depending on whether you
specify a device name.
If you specify a device name:
$ srvctl status filesystem -device /dev/asm/racvol_1
ACFS file system is not mounted on node1
ACFS file system is not mounted on node2
If you do not specify a device name:
$ srvctl status filesystem
ACFS file system is not running
ACFS file system is running on node1,node3
Note:
In the preceding examples, the file system is Oracle ACFS. If you are using
other file systems, then they will display as EXT3 or EXT4.
Appendix G
SRVCTL Command Reference
G-40
G.8.43 srvctl stop filesystem
Stops (unmounts) the Oracle ACFS file system or generic file system.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl stop filesystem -device volume_device [-node node_name] [-force]
Parameters
Table G-24 srvctl stop filesystem Command Parameters
Parameter Description
-device volume_device Specify the path to the file system volume device that you want to
stop.
-node node_name Optionally, you can specify the name of a node. If you do not
specify this parameter, then SRVCTL stops the volume resource on
all active nodes in the cluster.
-force Optionally, you can use -force to stop the file system and also
stop any databases or other resources that depend on this file
system.
Usage Notes
You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms, or as a configured file system user.
See Also:
srvctl add filesystem for more information about configuring file system users
Example
An example of this command is:
# srvctl stop filesystem -device /dev/asm/racvol_1 -force
G.8.44 srvctl add gns
Adds the Grid Naming Service (GNS) to a cluster when you are using a DHCP public
network or creating a client cluster.
Appendix G
SRVCTL Command Reference
G-41
Syntax
Use the srvctl add gns command with one of the following syntax models:
To add GNS to a cluster that is not currently running GNS:
srvctl add gns [-domain domain_name] -vip {vip_name | ip_address} [-skip] [-verbose]
To change a cluster that is not running GNS to be a client cluster of another cluster
that is running GNS:
srvctl add gns -clientdata file_name
To add a secondary GNS to a cluster:
srvctl add gns -vip vip_name | ip_address -clientdata file_name
Parameters
Table G-25 srvctl add gns Command Parameters
Parameter Description
-domain domain_name The network subdomain that is used for Forward DNS Lookup of
cluster IP addresses. You can only use this parameter if you
specify -vip, and you must use this parameter if the cluster to
which you are adding GNS has a GNS zone delegation and you
are using DHCP. The cluster to which you add GNS using -vip
with the -domain parameters becomes a server cluster.
If you do not specify -domain, then SRVCTL adds GNS without a
domain.
-vip {vip_name |
ip_address}
Specify either the virtual IP (VIP) name or IP address on which
GNS listens for DNS requests. You cannot use -vip with -
clientdata.
Use the -domain parameter with -vip to make the cluster to which
you are adding GNS a server cluster.
-skip Specify this parameter to skip the reachability check of the VIP
address.
-clientdata
path_to_file
Specify the path to the file you created with the srvctl export gns
command that contains the GNS credentials. You must copy this
file to a node in the cluster you are adding before running the
srvctl add gns command.
The cluster to which you add GNS using -clientdata becomes
either a client cluster or a secondary GNS.
You can only use the -clientdata parameter with the -vip
parameter when you are adding a secondary GNS.
-verbose Verbose output.
Usage Notes
• You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms.
• When you are adding GNS to a cluster for the first time, use the -vip parameter
with the -domain parameter.
Appendix G
SRVCTL Command Reference
G-42
• When you are adding GNS to a cluster using the -clientdata parameter, you must
first export the GNS data to a file and manually copy the file to a node in the
cluster you are adding. Use the -clientdata parameter and run this command on
any node in the cluster.
• You can only specify the -vip and -clientdata parameters at the same time when
you are adding a secondary GNS.
Examples
To add GNS to a cluster, making it a server cluster:
# srvctl add gns -vip 192.168.16.17 -domain cluster.mycompany.com
To add GNS to a cluster, making it a client cluster:
# srvctl add gns -clientdata /tmp/gnsdata
G.8.45 srvctl config gns
Displays the configuration for the grid naming service (GNS).
Syntax
srvctl config gns [-detail] [-subdomain] [-multicastport] [-node node_name] [-port]
[-status]
[-version] [-query name] [-list] [-clusterguid] [-clustername] [-clustertype] [-
loglevel]
[-network] [-role] [-instances]
Parameters
Table G-26 srvctl config gns Command Parameters
Parameter Description
-detail Print detailed configuration information about the GNS.
-subdomain Display the subdomain served by GNS.
-multicastport Display the port on which the GNS daemon is listening for multicast
requests.
-node node_name Display the configuration information for GNS on the specified
node.
-port Display the port that the GNS daemon uses to communicate with
the DNS server.
-status Display the status of GNS.
-version Display the version of GNS.
-query name Query GNS for the records belonging to a specific name.
-list List all records in GNS.
-clusterguid Display the globally unique identifier of the cluster where GNS is
running.
-clustername Display the name of the cluster where GNS is running.
-clustertype Display the type of configuration of GNS on this cluster.
-loglevel Print the log level of the GNS.
Appendix G
SRVCTL Command Reference
G-43
Table G-26 (Cont.) srvctl config gns Command Parameters
Parameter Description
-network Display network on which GNS is listening.
-role Display the role of the GNS instance.
-instances Display the instance list.
G.8.46 srvctl disable gns
Disables GNS for a specific node, or all available nodes in the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl disable gns [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify the name of a node in the cluster on which you want to
disable GNS. If you do not specify this parameter, then SRVCTL disables GNS for
the entire cluster.
• Optionally, you can use the -verbose parameter to display detailed output.
Example
An example of this command to disable GNS on the node named crm7 is:
$ srvctl disable gns -node crm7
G.8.47 srvctl enable gns
Enables GNS on all nodes or a specific node.
Note:
This command can be used only with Oracle Clusterware.
Syntax
srvctl enable gns [-node node_name] [-verbose]
Appendix G
SRVCTL Command Reference
G-44
Usage Notes
• Optionally, you can specify the name of a node on which you want to enable GNS.
If you do not specify this parameter, then SRVCTL enables GNS on all nodes in
the cluster.
• Optionally, you can use the -verbose parameter to print detailed output.
Example
An example of this command is:
$ srvctl enable gns -node node1
G.8.48 srvctl export gns
Exports Grid Naming Service (GNS) instance data to a file that you can use when you
are either moving GNS from one server cluster to another or when you are creating a
client cluster.
SRVCTL extracts the data from OCR. Exported data includes:
• The credentials used to authorize users, which includes the VIP address on which
the server listens
• The names and DNS records kept in GNS
Syntax
srvctl export gns {-instance path_to_file | {-clientdata path_to_file -role {CLIENT|
SECONDARY} [-version]}}
Parameters
Table G-27 srvctl export gns Command Parameters
Parameter Description
-instance path_to_file Use this parameter to specify the file to which GNS instance data is
written, when you are moving GNS from one server cluster to
another.
-clientdata
path_to_file -role
{CLIENT|SECONDARY}
Use this parameter to specify the file to which GNS credentials data
is written, when you are adding a client cluster to create a file that
contains credentials that the client cluster accesses to perform
name management operations on the server cluster.
You must also use the -role parameter to specify a role for which
the client data will be exported.
-version Optionally, you can use this parameter to specify the version for
which the client data will be generated.
Example
The following command exports the GNS credentials data to a file named gns.txt:
$ srvctl export gns -clientdata /temp/gnsdata/gns.txt
Appendix G
SRVCTL Command Reference
G-45
G.8.49 srvctl import gns
The srvctl import gns command imports data from a file that you create when you run
the srvctl export gns command. Use this command when you want to locate GNS to
a different server cluster.
When you import GNS data, SRVCTL stores the credentials and places the record
data into OCR. If another GNS instance is running or data for another instance is
encountered during the import procedure, then an error occurs.
This command also makes the cluster in which you run it the server cluster.
Note:
This command is only available with Oracle Clusterware.
G.8.50 srvctl modify gns
Modifies the IP address, domain, or other configuration parameters used by the grid
naming service (GNS).
Syntax
Use the srvctl modify gns command with one of the following syntax models:
srvctl modify gns -loglevel log_level
or
srvctl modify gns [-resolve name] [-verify name]
[-parameter name:value[,name:value...]]
[-vip {vip_name | ip} [-skip]] [-clientdata file_name]
[-role {PRIMARY} [-force]] [-verbose]
Parameters
Table G-28 srvctl modify gns Command Parameters
Parameter Description
-loglevel log_level Specify the GNS diagnostic logging level (acceptable values are
1-6).
-resolve name Resolve the name you specify through GNS.
-verify name Check to see if the specified name is advertised through GNS.
-parameter
name:value[,name:value
...]
Set the value of one or more configuration parameters.
Appendix G
SRVCTL Command Reference
G-46
Table G-28 (Cont.) srvctl modify gns Command Parameters
Parameter Description
-vip {vip_name | ip}
[-skip]
Specify a VIP name or IP address on which GNS is to listen.
Note: You can modify this attribute using Online Resource Attribute
Modification.
Optionally, you can use the -skip parameter to skip the
reachability check of the VIP address.
-clientdata file_name Modifies the GNS client data with client data contained in the
specified file.
-role {PRIMARY} [-
force]
Convert a secondary GNS instance to primary.
Use the -force parameter to forcibly convert the secondary GNS
instance to primary.
Examples
An example of this command is:
$ srvctl modify gns -vip 192.0.2.15
G.8.51 srvctl relocate gns
Relocates GNS from its current hosting node to another node within the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl relocate gns [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify the name of a node to which you want to move GNS.
• Optionally, you can use the -verbose parameter to display verbose output.
• On Linux and UNIX systems, you must be logged in as root and on Windows, you
must be logged in as a user with Administrator privileges to run this command.
Example
An example of this command is:
# srvctl relocate gns -node node1
Appendix G
SRVCTL Command Reference
G-47
G.8.52 srvctl remove gns
Removes GNS from the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl remove gns [-force] [-verbose]
Usage Notes
• Optionally, you can use the -force parameter to forcibly remove GNS from the
cluster, regardless of any errors that might occur.
• Optionally, you can use the -verbose parameter to display verbose output.
Example
An example of this command is:
$ srvctl remove gns
G.8.53 srvctl start gns
Starts GNS on a specific node.
Syntax
srvctl start gns [-loglevel log_level] [-node node_name] [-verbose]
Parameters
Table G-29 srvctl start gns Command Parameters
Parameter Description
-loglevel log_level Optionally, you can specify the level of logging with which GNS
should run. Log levels vary between 1 (minimal tracing) and 6
(traces everything and is time consuming).
-node node_name Optionally, you can specify the name of a node in the cluster where
you want to start GNS.
-verbose Optionally, you can use this parameter to display verbose output.
Usage Notes
You can only run this command in the server cluster. If you attempt to run this
command in a client cluster, then an error occurs.
Appendix G
SRVCTL Command Reference
G-48
Example
An example of this command to start the GNS on the cluster node named crmnode1 is:
$ srvctl start gns -node crmnode1
G.8.54 srvctl status gns
Displays the current state of GNS.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status gns [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify a node on which GNS is running for which you want to
display the state.
• Optionally, you can use the -verbose parameter to display detailed output.
G.8.55 srvctl stop gns
Stops GNS in the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl stop gns [-node node_name] [-force] [-verbose]
Usage Notes
• Optionally, you can specify the name of a node on which GNS is running that you
want to stop.
• Optionally, you can use -force and -verbose to forcibly stop GNS and print detailed
output, respectively.
Example
An example of this command to stop GNS on the local node is:
$ srvctl stop gns
Appendix G
SRVCTL Command Reference
G-49
G.8.56 srvctl update gns
Modifies a Grid Naming Service (GNS) instance.
Note:
This command is only available with Oracle Clusterware.
Syntax
Use the srvctl update gns command with one of these syntax models:
srvctl update gns -advertise name -address ip_address [-timetolive time_to_live
]
[-verbose]
srvctl update gns -delete name [-address address] [-verbose]
srvctl update gns -alias alias -name name [-timetolive time_to_live] [-verbose]
srvctl update gns -deletealias alias [-verbose]
srvctl update gns -createsrv service -target target -protocol protocol
[-weight weight] [-priority priority] [-port port_number]
[-timetolive time_to_live] [-instance instance_name] [-verbose]
srvctl update gns -deletesrv service_name -target target -protocol protocol
[-verbose]
srvctl update gns -createtxt name -target target [-timetolive time_to_live]
[-namettl name_ttl] [-verbose]
srvctl update gns -deletetxt name -target target [-verbose]
srvctl update gns -createptr name -target target [-timetolive time_to_live]
[-namettl name_ttl] [-verbose]
srvctl update gns -deleteptr name -target target [-verbose]
Parameters
Table G-30 srvctl update gns Command Parameters
Parameter Description
-advertise name Use this parameter to advertise a name through GNS.
-address ip_address Specify the IP address for an advertised name.
-timetolive
time_to_live
Optionally, you can specify, in seconds, an amount of time for the
record to live.
-delete name Use this parameter to remove the advertisement of a name from
GNS.
-alias alias Use this parameter to create an alias for an advertised name.
Appendix G
SRVCTL Command Reference
G-50
Table G-30 (Cont.) srvctl update gns Command Parameters
Parameter Description
-name name You must specify a name to associate with the alias.
-deletealias alias Use this parameter to delete an alias.
-createsrv service Use this parameter to create a service that is described by the
record.
-target target Use this parameter to associate a name with the service.
-protocol protocol Use this parameter to specify which protocol is used to connect to
the service.
-weight weight Optionally, you can specify the weight of the record.
-priority priority Optionally, you can specify a priority of the record, with a value
ranging from 0 to 65535.
-port port_number Optionally, you can specify a port number used to connect to the
service, with a value ranging from 0 to 65535.
-instance
instance_name
Optionally, you can specify an instance name for the service.
-deletesrv
service_name
Use this parameter to specify the name of the service record you
want to delete.
-createtxt name Use this parameter to add a text (TXT) record using the specified
name.
-namettl name_ttl Optionally, you can specify the time, in seconds, to live for the
name.
-deletetxt name Use this parameter to delete a text (TXT) record for a specific
name.
-createptr name Use this parameter to add a pointer (PTR) record for a specific
name.
-deleteptr name Use this parameter to delete a pointer (PTR) record for a specific
name.
Usage Notes
You must be logged in as the root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms, to run this command.
Example
The following command advertises a name with GNS:
# srvctl update gns -advertise myname -address 192.168.1.45
G.8.57 srvctl add havip
Adds highly available VIPs (HAVIPs) (used for highly available NFS and SMB exports)
to a cluster.
Syntax
srvctl add havip -id havip_name -address {host_name | ip_address}
[-netnum network_number] [-description text] [-skip] [-homenode node_name]
Appendix G
SRVCTL Command Reference
G-51
Parameters
Table G-31 srvctl add havip Command Parameters
Parameter Description
-id havip_name Specify a unique ID for the HAVIP resource.
-address {host_name |
ip_address}
Specify either a host name or an IPv4 IP address for the HAVIP
you are going to create.
Note: You must configure the IPv4 IP address with a non-DHCP,
non-round robin DNS address.
-netnum network_number Optionally, you can specify a network resource upon which the
HAVIP depends. The default value for this parameter is 1.
-description text Optionally, you can specify a text description of the HAVIP.
-skip Optionally, you can specify this parameter to skip the reachability
check for the IP address.
-homenode node_name Optionally, you can specify a preferred node or an empty string to
clear the home node.
Example
An example of this command is:
# srvctl add havip -id myhavip -address 192.0.2.1 -netnum 2 -description
"My HA VIP" -skip -homenode myNode2
G.8.58 srvctl config havip
Displays configuration information for a specific highly available VIP (HAVIP) (used for
highly available NFS and SMB exports) or all HAVIP resources in a cluster.
Syntax
Use the srvctl config havip command with the following syntax:
srvctl config havip [-id havip_name]
Parameters
Table G-32 srvctl config havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to display. If you do not
specify this parameter, then SRVCTL displays the configuration information for all
HAVIPs known to Oracle Clusterware.
Example
This command returns output similar to the following:
$ srvctl config havip -id hrexports
VIP: /mjk-vm3-vip/10.149.237.196/10.149.236.0/255.255.252.0/eth0
Description: HR Exports
Appendix G
SRVCTL Command Reference
G-52
G.8.59 srvctl disable havip
Prevents a specific highly-available VIP (HAVIP) (used for highly-available NFS and
SMB exports) resource from running on a number of specified nodes.
Syntax
srvctl disable havip -id havip_name [-node node1,node2,...,noden]
Parameters
Table G-33 srvctl disable havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
disable.
-node
node1,node2,...,noden
Specify the name of a node or a comma-delimited list of node
names on which you do not want the HAVIP resource to run.
If you specify all but one node in the cluster, then the HAVIP will
not fail over.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl disable havip -id myhavip -node myNode1,myNode3
G.8.60 srvctl enable havip
Enables a specific highly-available VIP (HAVIP) (used for highly-available NFS and
SMB exports) to run on a number of specified nodes.
Syntax
srvctl enable havip -id havip_name [-node node_name]
Parameters
Table G-34 srvctl enable havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
enable.
-node node_name Specify the name of a node on which you want the HAVIP resource
to be able to run.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Appendix G
SRVCTL Command Reference
G-53
Examples
An example of this command is:
# srvctl enable havip -id myhavip -node myNode1
G.8.61 srvctl modify havip
Modifies a highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports).
Syntax
srvctl modify havip -id havip_name [-address {host_name | ip_address}
[-netnum network_number] [-skip]] [-description text] [-homenode node_name]
Parameters
Table G-35 srvctl modify havip Command Parameters
Parameter Description
-id havip_name Specify the unique name for the HAVIP resource you want to
modify.
-address {host_name |
ip_address
Specify either a host name or an IPv4 IP or IPv6 address for the
HAVIP you want to modify.
Note: You must configure the IPv4 IP address with a non-DHCP,
non-round robin DNS address.
-netnum network_number Optionally, you can change the network resource upon which the
HAVIP depends. The default value for this optional parameter is 1.
-skip Specify this parameter to skip checking the reachability of the IP
address.
-description text Specify a text description for the HAVIP.
-homenode node_name Optionally, you can specify a preferred node or an empty string to
clear the home node.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl modify havip -id myhavip -address 192.168.16.17 -netnum 2
G.8.62 srvctl relocate havip
Relocates a highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports) to another node in a cluster.
Syntax
srvctl relocate havip -id havip_name [-node node_name] [-force]
Appendix G
SRVCTL Command Reference
G-54
Parameters
Table G-36 srvctl relocate havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
relocate.
-node node_name Specify the name of the node to which you want to relocate the
HAVIP resource.
-force Optionally, you can force the relocation of the HAVIP resource.
Example
An example of this command is:
$ srvctl relocate havip -id myhavip -node node3
G.8.63 srvctl remove havip
Removes a highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports).
Syntax
srvctl remove havip -id havip_name [-force]
Parameters
Table G-37 srvctl remove havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
remove.
–force Use this parameter to forcibly remove the resource from the cluster
and ignore any dependencies.
Usage Notes
• You must first stop the HAVIP resource before you attempt to remove it.
• You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl remove havip -id myhavip -force
G.8.64 srvctl start havip
Starts a specific highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports) on a specific node.
Appendix G
SRVCTL Command Reference
G-55
Syntax
srvctl start havip -id havip_name [-node node_name]
Parameters
Table G-38 srvctl start havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to start.
-node node_name Optionally, you can use the -node parameter to specify the name of
the node on which the HAVIP resource starts.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl start havip -id myhavip -node myNode1
G.8.65 srvctl status havip
Displays the status of all highly-available VIPs (HAVIPs) (used for highly-available
NFS and SMB exports) in a cluster or one particular HAVIP.
Syntax
srvctl status havip [-id havip_name]
Usage Notes
Specify the unique name of the HAVIP resource you want to display. If you do not
specify this parameter, then SRVCTL displays the status of all HAVIPs known to
Oracle Clusterware.
Example
This command returns output similar to the following:
$ srvctl status havip
HAVIP ora.ha1.havip is enabled
HAVIP ora.ha1.havip is not running
G.8.66 srvctl stop havip
Stops the highly-available VIPs (HAVIPs) (used for highly-available NFS and SMB
exports) on a specific node.
Syntax
srvctl stop havip -id havip_name [-node node_name] [-force]
Appendix G
SRVCTL Command Reference
G-56
Parameters
Table G-39 srvctl stop havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource to stop.
-node node_name Optionally, you can specify the name of the node on which the
HAVIP resource to stop resides.
–force Use this parameter to forcibly stop the HAVIP.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Examples
An example of this command is:
# srvctl stop havip -id myhavip -node myNode1 -force
G.8.67 srvctl add ioserver
Adds an Oracle ASM IOServer configuration to the cluster.
When you configure, upgrade, or convert from a standard cluster to an Oracle Flex
Cluster you can create Oracle ASM IOServers on the Hub nodes in the cluster.
Syntax
srvctl add ioserver [-spfile spfile] [-count number_of_ioserver_instances| ALL] [-
listener listener_name]
Parameters
Table G-40 srvctl add ioserver Command Parameters
Parameter Description
-spfile spfile Specify the path to the server parameter file.
-count number_of_ioserver_instances| ALL Specify the number of Oracle ASM IOServer
instances you want to add or ALL to add
instances to all nodes.
-listener listener_name Specify the name of the listener.
Example
An example of this command is:
# srvctl add ioserver -count 2
Appendix G
SRVCTL Command Reference
G-57
G.8.68 srvctl config ioserver
Displays the configuration details of Oracle ASM IOServers.
Syntax
srvctl config ioserver
Usage Notes
This command has no parameters.
Example
This command displays output similar to the following:
$ srvctl config ioserver
ASM I/O Server instance count: 3
ASM I/O Server is enabled.
ASM I/O server is enabled on nodes:
ASM I/O server is disabled on nodes:
G.8.69 srvctl disable ioserver
Disables an Oracle ASM IOServer.
Syntax
srvctl disable ioserver -node node_name
Usage Notes
Use the -node parameter to specify the name of a Hub node on which you want to
disable an Oracle ASM IOServer.
G.8.70 srvctl enable ioserver
Enable an Oracle ASM IOServer on a specific node.
Syntax
srvctl enable ioserver [-node node_name]
Usage Notes
Use the -node parameter to specify the name of a Hub node on which you want to
enable an Oracle ASM IOServer.
G.8.71 srvctl getenv ioserver
Displays the values for environment variables associated with an Oracle ASM
IOServer.
Syntax
srvctl getenv ioserver [-envs "name_list"]
Appendix G
SRVCTL Command Reference
G-58
Usage Notes
Specify a comma-delimited list of the names of environment variables. If you do not
specify this parameter, then SRVCTL displays the values of all environment variables
associated with the database.
G.8.72 srvctl modify ioserver
Modifies an Oracle ASM IOServer configuration on a cluster.
Syntax
srvctl modify ioserver [-spfile spfile] [-count number_of_ioserver_instances | ALL]
[-listener listener_name] [-force]
Parameters
Table G-41 srvctl modify ioserver Command Parameters
Parameter Description
-spfile spfile Optionally, specify the path to the server parameter file path.
-count
number_of_ioserver_ins
tances | ALL
Optionally, specify a number of instances or ALL (to modify
instances on all nodes) that you want to modify. If you modify the
count, then, because this results in a change in cardinality of the
cluster resource, the changes take effect immediately.
-listener
listener_name
Optionally, specify the name of the listener.
-force Optionally, you can ignore any dependencies and force the
modification of the Oracle ASM IOServer.
G.8.73 srvctl relocate ioserver
Relocates an Oracle ASM IOServer instance from its current hosting node to another
node within the cluster.
Syntax
srvctl relocate ioserver -currentnode node_name [-targetnode node_name] [-force]
Parameters
Table G-42 srvctl relocate ioserver Command Parameters
Parameter Description
-currentnode node_name The name of the node on which the Oracle ASM IOServer instance
currently resides
-targetnode node_name The name of the node to which to relocate the IOServer instance
-force Optionally, you can force the relocation of the Oracle ASM
IOServer instance
Appendix G
SRVCTL Command Reference
G-59
Example
The following command relocates the Oracle ASM IOServer from a node called
crsNode2 to a node called crsNode5:
$ srvctl relocate ioserver -currentnode crsNode2 -targetnode crsNode5
G.8.74 srvctl remove ioserver
Use this command to remove an Oracle ASM IOServer instance from the cluster.
Syntax
srvctl remove ioserver [-force]
Usage Notes
Use the -force parameter to forcibly remove the Oracle ASM IOServer instance,
ignoring any dependencies.
G.8.75 srvctl setenv ioserver
Administers the environment configuration for an Oracle ASM IOServer.
Syntax
srvctl setenv ioserver {-envs "name=val[,name=val][...]" | -env "name=val"}
Parameters
Table G-43 srvctl setenv ioserver Command Parameters
Parameter Description
-envs "name=val,..." Comma-delimited list of name-value pairs of environment
variables enclosed in double quotation marks ("").
-env "name=val" Alternatively, use this parameter to set a single
environment variable to a value that contains commas or
other special characters, enclosed in double quotation
marks ("").
G.8.76 srvctl start ioserver
Starts Oracle ASM IOServers in the cluster.
You can also start an Oracle ASM IOServer on a particular Hub Node by specifying
the node name.
Syntax
srvctl start ioserver [-node node_name]
Appendix G
SRVCTL Command Reference
G-60
Usage Notes
If you choose to start an Oracle ASM IOServer on a particular Hub Node, then use the
-node parameter and specify the name of the node. If you do not specify a particular
Hub Node, then SRVCTL starts all Oracle ASM IOServers in the cluster.
Example
The following command starts an Oracle ASM IOServer on a Hub node named
mjkhub46:
$ srvctl start ioserver -node mjkhub46
G.8.77 srvctl status ioserver
Displays the status of Oracle ASM IOServers running in the cluster.
You can display the status of all Oracle ASM IOServers running a cluster, the status of
an Oracle ASM IOServer running on a particular Hub Node, or the information about
clients from a specific database.
Syntax
srvctl status ioserver [-node node_name] [-detail]
Parameters
Table G-44 srvctl status ioserver Parameters
Parameter Description
—node node_name Specify a particular Hub node to display the status of the Oracle
ASM IOServer resource instance running there. If you do not
specify a Hub node, then SRVCTL returns the status of all Oracle
ASM IOServer resource instances running in the cluster.
-detail Use this parameter to display more detailed information about the
status of the Oracle ASM IOServer.
Example
If you run the command with the -detail parameter, then SRVCTL displays output
similar to the following:
$ srvctl status ioserver -detail
ASM I/O Server is enabled
ASM I/O Server is running on nodes: mjk376, mjk377
ASM I/O Server instance +IOS1 running on node mjk376 is connected to ASM instance
+ASM2:
Number of clients connected: 2
Names of clients: later14, alus16, later12, alus9, db0010
ASM I/O Server instance +IOS2 running on node mjk377 is connected to ASM instance
+ASM3:
Number of clients connected: 3
Number of requests completed per sec: 110
Appendix G
SRVCTL Command Reference
G-61
Names of networks: eth1, eth2
Names of clients: later11, later3, later14, later15, later16, alus19, alus17, alus13
G.8.78 srvctl stop ioserver
Stops an Oracle ASM IOServer in the cluster.
Syntax
srvctl stop ioserver [-node node_name] [-force]
Usage Notes
• Use the -node parameter to stop an Oracle ASM IOServer on a particular Hub
Node. If you do not specify a particular Hub Node, then SRVCTL stops all of the
Oracle ASM IOServers in the cluster.
• Use the -force parameter to stop an Oracle ASM IOServer, regardless of any
dependencies.
G.8.79 srvctl unsetenv ioserver
Unsets the Oracle ASM IOServer environment configurations.
Syntax
srvctl unsetenv ioserver -envs "name_list"
Usage Notes
Use the -envs parameter to specify a comma-delimited list of the names of
environment variables enclosed in double quotation marks ("").
G.8.80 srvctl add mgmtdb
Adds a management database (CHM repository) resource to the cluster.
Syntax
srvctl add mgmtdb [-domain domain]
Usage Notes
Optionally, you can specify the domain for the database. If you have the DB_DOMAIN
database initialization parameter set, then you must provide a value for this parameter.
Example
To add a management database to the cluster:
$ srvctl add mgmtdb -domain example.com
Appendix G
SRVCTL Command Reference
G-62
G.8.81 srvctl config mgmtdb
Displays configuration information for the management database (CHM repository)
resource.
Note:
Use this command only with Oracle Clusterware.
Syntax
srvctl config mgmtdb [-verbose] [-all]
Usage Notes
• Optionally, use the -verbose parameter to print detailed output.
• Optionally, use the -all parameter to print detailed configuration information.
G.8.82 srvctl disable mgmtdb
Disables the management database (CHM repository) resource on the specified node.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl disable mgmtdb [-node node_name]
Usage Notes
Optionally, you can specify the name of a cluster node on which the managementUse the Server Control (SRVCTL) utility to manage various components and
applications in your cluster.
This appendix contains reference information for Server Control commands, including
utility usage information and a comprehensive listing of the SRVCTL commands.
G.1 SRVCTL Usage Information
SRVCTL is installed on each node in a cluster by default. To use SRVCTL, log in to
the operating system of a node and enter the SRVCTL command and its parameters
in case-sensitive syntax.
• Only use the version of SRVCTL that is provided with Oracle Database 12c on
Oracle RAC databases that are created for or upgraded to Oracle Database 12c.
The version of SRVCTL must be the same as the version of the object (listeners,
Oracle ASM instances, Oracle RAC databases and their instances, and services)
being managed. To ensure the versions are the same release, run SRVCTL
commands from the Oracle home of the database or object you are managing.
• SRVCTL does not support concurrent executions of commands on the same
object. Therefore, run only one SRVCTL command at a time for each database,
service, or other object.
• When specifying a comma-delimited list as part of a SRVCTL command, there
should not be any spaces between the items in the list. For example:
srvctl add database -serverpool "serverpool1,serverpool3"
When you specify a comma-delimited list in a Windows environment, you must
enclose the list in double quotation marks (""). You can enclose a commadelimited
list in double quotation marks in a Linux or UNIX environment but they
will be ignored.
• If you are entering a SRVCTL command, and you want to continue the input on a
new line, then you can use the operating system continuation character. In Linux,
this is the backslash (\) symbol.
• A SRVCTL command that produces no output is a successful command. Not all
SRVCTL commands return a message when it completes, successfully. However,
if a SRVCTL command fails, then it always returns an error message.
• You can use the -eval parameter with several SRVCTL commands. This
parameter, when you use it, enables you to simulate running a command without
making any changes to the system. SRVCTL returns output that informs you what
will happen if you run a particular command. For example, to know what might
happen if you relocate a server:
$ srvctl relocate server –servers "rac1" –eval –serverpool pool2
G-1
Database db1
will stop on node rac1
will start on node rac7
Service mySrv1
will stop on node rac1, it will not run on any node
Service myServ2
will stop on node rac1
will start on node rac6
Server rac1
will be moved from pool myPoolX to pool pool2
The -eval parameter is available with the following commands:
– srvctl add database
– srvctl add service
– srvctl add srvpool
– srvctl modify database
– srvctl modify service
– srvctl modify srvpool
– srvctl relocate server
– srvctl relocate service
– srvctl remove srvpool
– srvctl start database
– srvctl start service
– srvctl stop database
– srvctl stop service
G.2 Specifying Command Parameters as Keywords Instead
of Single Letters
Before Oracle Database 12c, the SRVCTL command-line interface used single letter
parameters. However, this imposes a limit on the number of unique parameters
available for use with SRVCTL commands. SRVCTL command parameters introduced
in Oracle Database 12c are full words instead of single letters, such as -multicastport
and -subdomain.
To support backward compatibility, you can use a mix of single-letter parameters and
new keyword parameters. New parameters introduced with keywords can be used with
single letter parameters.
Appendix G
Specifying Command Parameters as Keywords Instead of Single Letters
G-2
Note:
Starting with Oracle Database 12c, the single letter parameters are
deprecated in favor of the keyword parameters to avoid using the same letter
to implement different functionality depending on the command.
You can obtain the single-letter equivalents, where applicable, by adding the -
compatible parameter after the -help parameter.
G.3 Character Set and Case Sensitivity of SRVCTL Object
Values
SRVCTL interacts with many different types of objects. The character set and name
length limitations, and whether the object name is case sensitive, can vary between
object types.
Table G-1 String Restrictions for SRVCTL Object Names
Object Type Character Set Limitations Case
Sensitive?
Maximum Length
db_domain Alpha-numeric characters,
underscore (_), and number sign
(#)
128 characters
db_unique_name Alpha-numeric characters,
underscore (_), number sign (#),
and dollar sign ($); the first 8
characters must be unique
because those characters are
used to form instance names for
policy-managed databases
No 30 characters but the
first 8 characters must
be unique relative to any
other database in the
same cluster
diskgroup_name Naming disk groups have the
same limitations as naming other
database objects.
See Also: Oracle Database SQL
Language Reference for more
information about database
object naming rules
No (all names
are converted
to uppercase)
instance_name Alpha-numeric characters Depends on the
platform
15 characters
listener_name
node_name No
scan_name The first character must be an
alphabetic character
No
Appendix G
Character Set and Case Sensitivity of SRVCTL Object Values
G-3
Table G-1 (Cont.) String Restrictions for SRVCTL Object Names
Object Type Character Set Limitations Case
Sensitive?
Maximum Length
server_pool Alpha-numeric characters,
underscore (_), number sign (#),
period (.), and dollar sign ($); the
name cannot begin with a period,
contain single quotation marks
(''), nor can the name be
"Generic" or "Free" because
those two names are reserved for
the built-in server pools
250 characters
service_name 250 characters
volume_name Alphanumeric characters; dashes
(-) are not allowed and the first
character must be an alphabetic
character.
No 11 characters
G.4 Using SRVCTL Help
This section includes information about using context sensitive help with SRVCTL.
To see help for all SRVCTL commands, from the command line enter:
srvctl -help
To see the command syntax and a list of parameters for each SRVCTL command,
from the command line enter:
srvctl command (or verb) object (or noun) -help
When you request online help for a command using -help, SRVCTL prints the full
words for each parameter. You can obtain the single-letter equivalents, where
applicable, by adding the -compatible parameter after the -help parameter. For
example:
$ srvctl config database -help -compatible
The preceding command prints usage information for the srvctl config database
command, listing all parameters as full words followed by their single-letter equivalents
in parentheses, where applicable.
To see the SRVCTL version number enter:
$ srvctl -version
G.5 SRVCTL Privileges and Security
To use SRVCTL to change your Oracle RAC database configuration, log in to the
operating system as the software owner of the home that you want to manage.
For example, if different users installed Oracle Database and the Oracle Grid
Infrastructure, then log in as the database software owner (for example, ora_db) to
Appendix G
Using SRVCTL Help
G-4
manage databases and log in as the Oracle Grid Infrastructure software owner (for
example, ora_asm) to manage the Oracle ASM instances.
Users who are members of the OSDBA operating system group can start and stop the
database. To stop and start an Oracle ASM instance, you must be a member of the
OSASM operating system group.
To create or register objects such as listeners, Oracle Notification Services, and
services, you must be logged in to the operating system as the software owner of the
Oracle home. The objects you create or register for that Oracle home will run under
the user account of the owner of the Oracle home. Databases run as the database
installation owner of the home from which they run.
To perform srvctl add operations on any object, you must be logged in as the Oracle
account owner of the home on which the object runs.
For some SRVCTL commands, on Linux and UNIX systems, you must be logged in as
root, and on Windows systems, you must be logged in as a user with Administrator
privileges to run them. In this appendix, those commands are preceded by the root
prompt (#) in the command examples.
G.6 Additional SRVCTL Topics
• Use SRVCTL to manage Oracle-supplied resources such as listener, instances,
disk groups, and networks, and CRSCTL for managing Oracle Clusterware and its
resources.
Note:
Oracle strongly discourages directly manipulating Oracle-supplied resources
(resources whose names begin with ora) using CRSCTL. This could adversely
impact the cluster configuration.
• Although you may be able to cancel running SRVCTL commands by pressing the
Control-C keys, you may corrupt your configuration data by doing this.
You are strongly advised not to attempt to terminate SRVCTL in this manner.
G.7 Deprecated SRVCTL Subprograms or Commands
A number of SRVCTL commands and parameters have been deprecated in this
release.
G.7.1 Single Character Parameters for all SRVCTL Commands
Single-character parameters have been deprecated in Oracle Database 12c.
Use the full keyword for each parameter instead. To support older tools and scripts
that still use single-character parameters, the current version of SRVCTL supports
both single-character parameters and full keyword parameters.
The command reference in this appendix shows the keywords for each SRVCTL
command. Table G-2 lists the deprecated single-character parameters.
Appendix G
Additional SRVCTL Topics
G-5
Table G-2 Deprecated Single-Character Parameters for SRVCTL Commands
Single
Letter
Long Form Values Description Related Commands
A address {VIP_name | IP}/
netmask/ [if1[|
if2...]]
VIP address
specification for node
applications
Node applications, VIP,
network, Listener,
SCAN VIP, and SCAN
listener commands
a all All resources of that
kind
srvctl config
database
Common
a diskgroup diskgroup_list Comma-delimited list
of Oracle ASM disk
groups
Database, instance,
Oracle ASM, disk
group, and file system
commands
a detail Print detailed
configuration
information
Common
a available available_list A comma-delimited list
of available instances
Service and server pool
commands
a abort Abort failed online
relocation
Relocate database
a viponly Display VIP
configuration
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
B rlbgoal {NONE|
SERVICE_TIME|
THROUGHPUT}
The runtime load
balancing goal of a
service
Service and server pool
commands
c currentnode current_node Node name from
which to relocate the
service
Service and server pool
commands
c cardinality {UNIFORM|
SINGLETON}
Whether the service
should run on every
active server in the
server pool
(UNIFORM) or just
one server
(SINGLETON)
Service and server pool
commands
c dbtype type Type of database:
Oracle RAC One
Node, Oracle RAC, or
single instance
Database, instance,
Oracle ASM, disk
group, and file system
commands
d db or
database
db_unique_name Database unique
name
Common
d device volume_device Volume device path Database, instance,
Oracle ASM, disk
group, and file system
commands
d domain Display subdomain
served by GNS
OC4J, home, CVU, and
GNS commands
Appendix G
Deprecated SRVCTL Subprograms or Commands
G-6
Table G-2 (Cont.) Deprecated Single-Character Parameters for SRVCTL
Commands
Single
Letter
Long Form Values Description Related Commands
e emport em_port_number Local listen port for
Oracle Enterprise
Manager
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
e failovertyp
e
{NONE|SESSION
BASIC|
TRANSACTION}
The failover type for a
service
Service and server pool
commands
e server server_list Candidate server list
for Oracle RAC One
Node database
Database, instance,
Oracle ASM, disk
group, and file system
commands
f force Force remove Common
g diskgroup diskgroup_name Disk group name File system, Diskgroup
commands
g gsdonly Display GSD
configuration
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
g serverpool server_pool_name
server_pool_list
A server pool name
Comma-delimited list
of database server
pool names
Service and server pool
commands
Database, instance,
Oracle ASM, disk
group, and file system
commands
h help Common
i importance number A number that
represents the
importance of the
server pool
Service and server pool
commands
i instance instance_name
instance_list
Instance name prefix
for administratormanaged
Oracle RAC
One Node database
A comma-delimited list
of instance names
Database, instance,
Oracle ASM, disk
group, and file system
commands
I ip ip_address VIP address on which
GNS is to listen
OC4J, home, CVU, and
GNS commands
i oldinst instance_name The old instance
name
Service and server pool
commands
i scannumber scan_ordinal
_number
Ordinal number of the
IP address for the
SCAN
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
Appendix G
Deprecated SRVCTL Subprograms or Commands
G-7
Table G-2 (Cont.) Deprecated Single-Character Parameters for SRVCTL
Commands
Single
Letter
Long Form Values Description Related Commands
i vip vip_name or
"vip_name_list"
VIP names Node applications,
GNS, VIP, network,
listener, SCAN VIP, and
SCAN listener
commands
j acfspath acfs_path_list Comma-delimited list
of Oracle ACFS paths
where the
dependency on the
database will be set
Database, instance,
Oracle ASM, disk
group, and file system
commands
j clbgoal {SHORT|LONG} The connection load
balancing goal for a
service
Service and server pool
commands
k netnum network_number The network number Service and server pool
commands
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
OC4J, home, CVU, and
GNS commands
l list List all records in GNS OC4J, home, CVU, and
GNS commands
l listener listener_name The name of a listener ASM commands
l loglevel log_level Specify the level (0-6)
of logging that GNS
should run with
OC4J, home, CVU, and
GNS commands
l min number The minimum size of
the server pool
Service and server pool
commands
l onslocalpor
t
port_number Oracle Notification
Service listening port
for local client
connections
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
l role service_role Comma-delimited list
of server roles within
double quotation
marks (""), where
each role is one of
PRIMARY,
PHYSICAL_STANDBY,
LOGICAL_STANDBY, or
SNAPSHOT_STANDBY
Service and server pool
commands
m domain domain_name The domain for the
database
Database, instance,
Oracle ASM, disk
group, and file system
commands
Appendix G
Deprecated SRVCTL Subprograms or Commands
G-8
Table G-2 (Cont.) Deprecated Single-Character Parameters for SRVCTL
Commands
Single
Letter
Long Form Values Description Related Commands
m failovermet
hod
{NONE|BASIC} The failover method of
a service
Service and server pool
commands
m multicastpo
st
The port on which the
GNS daemon is
listening for multicast
requests
OC4J, home, CVU, and
GNS commands
m path mountpoint_path Mountpoint path Database, instance,
Oracle ASM, disk
group, and file system
commands
n name Advertise a name
through GNS using
the given address
OC4J, home, CVU, and
GNS commands
n node node_name The name of a specific
node
Common
n nodes node_list A comma-delimited list
of node names
File system commands
n dbname database_name The database name
(DB_NAME), if
different from the
unique name specified
by the -db parameter
Database, instance,
Oracle ASM, disk
group, and file system
commands
n scanname scan_name Fully-qualified SCAN
name (includes the
domain)
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
n servers server_list A comma-delimited list
of candidate server
names
Service and server pool
commands
n targetnode node_name Node name to which
to relocate the service
Service and server pool
commands
o oraclehome oracle_home $ORACLE_HOME path Database commands
p endpoints [TCP:]port
_number[/IPC:
key][/NMP:pipe
_name][/TCPS:
s_port][/SDP:
port]
SCAN listener
endpoints
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
p port The port which the
GNS daemon uses to
communicate with the
DNS server
OC4J, home, CVU, and
GNS commands
p rmiport port_number OC4J RMI port
number
OC4J, home, CVU, and
GNS commands
P tafpolicy {NONE|BASIC} TAF policy
specification
Service and server pool
commands
Appendix G
Deprecated SRVCTL Subprograms or Commands
G-9
Table G-2 (Cont.) Deprecated Single-Character Parameters for SRVCTL
Commands
Single
Letter
Long Form Values Description Related Commands
p spfile spfile_location Server parameter file
path
Database, instance,
Oracle ASM, disk
group, and file system
commands
q notificatio
n
{TRUE|FALSE} Whether FAN is
enabled for OCI
connections
Service commands
q query Query GNS for the
records belonging to a
name
OC4J, home, CVU, and
GNS commands
r preferred preferred_list A comma-delimited list
of preferred instances
Service and server pool
commands
r onsremotepo
rt
port_number Oracle Notification
Service listening port
for connections from
remote hosts
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
r relocate Relocate the VIP Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
r revert Remove target node
of failed online
relocation request
from the candidate
server list of
administratormanaged
Oracle RAC
One Node database
Relocate database
r role role_type Role of the standby
database: PRIMARY,
PHYSICAL_STANDBY,
LOGICAL_STANDBY, or
SNAPSHOT_STANDBY
Database, instance,
Oracle ASM, disk
group, and file system
commands
s onsonly Display Oracle
Notification Service
daemon configuration
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
s skip Skip checking the
ports
Listener, SCAN, and
SCAN listener.
s statfile file_name The file path of the
state_file created
by a previously
executed srvctl stop
home command
OC4J, home, CVU, and
GNS commands
s status Display the status of
GNS
OC4J, home, CVU, and
GNS commands
Appendix G
Deprecated SRVCTL Subprograms or Commands
G-10
Table G-2 (Cont.) Deprecated Single-Character Parameters for SRVCTL
Commands
Single
Letter
Long Form Values Description Related Commands
S subnet subnet/net
_mask/[if1[|
if2...]]
Network address
specification for a
network
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
s service service_name
service_name_list
The name of a service
A comma-delimited list
of service names
Service and server pool
commands
s startoption start_options Startup options for the
database (mount,
open, read only)
Database, instance,
Oracle ASM, disk
group, and file system
commands
t checkinterv
al
time_interval Interval in minutes
between checks
OC4J, home, CVU, and
GNS commands
t edition edition_name The initial session
edition of a service
Service and server pool
commands
t envs "name_list" A list of environment
variables
Common
t namevals "name= value,..." Names and values of
environment variables
Common
T nameval "name=value" Name and value of a
single environment
variable
Common
t update instance_name The new instance
name
Service and server pool
commands
t remoteserve
rs
host_name[:
port_number]
[,host_name[:
port_number]...]
List of remote host
name and port
number pairs for
Oracle Notification
Service daemons
outside this cluster
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
t stopoption stop_options Stop options for the
database (NORMAL,
TRANSACTIONAL,
IMMEDITATE, or ABORT)
Database, instance,
Oracle ASM, disk
group, and file system
commands
t toversion target_version Version to which you
are downgrading
Database, instance,
Oracle ASM, disk
group, and file system
commands
u max number Maximum size of the
server pool
Service and server pool
commands
u nettype network_type The network server
type, which can be
STATIC, DHCP, or MIXED
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
Appendix G
Deprecated SRVCTL Subprograms or Commands
G-11
Table G-2 (Cont.) Deprecated Single-Character Parameters for SRVCTL
Commands
Single
Letter
Long Form Values Description Related Commands
u newinst Add a new instance to
the service
configuration
Service commands
u update Update SCAN
listeners to match the
number of SCAN VIPs
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
u user oracle_user Oracle user or other
authorized user to
mount and unmount
file systems
Database, instance,
Oracle ASM, disk
group, and file system
commands
v verbose Verbose output Common
v volume volume_name Name of a volume Database, instance,
Oracle ASM, disk
group, and file system
commands
V versions Common
w failoverdel
ay
number Failover delay Service and server pool
commands
w nettype network_type The network server
type, which can be
STATIC, DHCP, or MIXED
Node applications, VIP,
network, listener, SCAN
VIP, and SCAN listener
commands
w timeout timeout Online relocation
timeout in minutes
Database, instance,
Oracle ASM, disk
group, and file system
commands
x dtp {TRUE | FALSE} Whether to enable
distributed transaction
processing
Service and server pool
commands
x node node_name Node name (use this
parameter only with
noncluster databases)
Common
y noprompt Suppress the
confirmation prompt
Common
y policy {AUTOMATIC |
MANUAL}
Management policy
for the resource
Database, instance,
Oracle ASM, disk
group, file system,
service and server pool
commands
z failoverret
ry
number Number of failover
retries
Service and server pool
commands
z rmdepondisk To remove a
database's
dependency upon disk
groups
Database, instance,
Oracle ASM, disk
group, and file system
commands
Appendix G
Deprecated SRVCTL Subprograms or Commands
G-12
G.7.2 Miscellaneous SRVCTL Commands and Parameters
The following command parameters have been deprecated in this release:
Table G-3 Deprecated Commands and Parameters for SRVCTL
Command Deprecated Parameters
srvctl modify asm -node node_name
srvctl modify instance -z
Instead, use the -node option with the value set to ""
srvctl modify gns [-ip ip_address] [-advertise host_name -address address]
[-delete host_name -address address] [-createalias name -
alias alias] [-deletealias alias]
Use the srvctl update gns command instead.
srvctl * oc4j The oc4j noun has been deprecated and replaced with
qosmserver. SRVCTL still accepts the oc4j noun until it is
desupported.
srvctl add service The PRECONNECToption with the -tafpolicy parameter is
deprecated.
srvctl modify service The -failovermethod {NONE | BASIC} is deprecated.
The PRECONNECToption with the -tafpolicy parameter is
deprecated.
G.8 SRVCTL Command Reference
This section lists and describes all SRVCTL commands that are run from the Oracle
Grid Infrastructure home.
See Also:
Oracle Real Application Clusters Administration and Deployment Guide for
SRVCTL command usage information
G.8.1 srvctl add asm
Adds a record for an Oracle ASM instance to the entire cluster.
This command must be run only one time from the Oracle Grid Infrastructure home.
Syntax
srvctl add asm [-listener listener_name] [-pwfile password_file_path
[-flex [-count {number_of_instances | ALL}] | -proxy [-spfile
server_parameter_file_path]]
Appendix G
SRVCTL Command Reference
G-13
Parameters
Table G-4 srvctl add asm Command Parameters
Parameter Description
-listener listener_name Enter the name of a listener. If you do not
specify this parameter, then the listener name
defaults to LISTENER.
-pwfile password_file_path Enter the full path to the location of the
password file on Oracle ASM.
-flex [-count {number_of_instances |
ALL}] |
-proxy [-spfile
server_parameter_file_path]
Specify that the Oracle ASM instances are
configured as Oracle Flex ASM instances. You
can optionally specify the number of Oracle
ASM instances to create or that an Oracle
ASM instance should be created on all nodes.
Alternatively, you can specify the -proxy
parameter to configure the Oracle ASM
Dynamic Volume Manager proxy instance
resource. Optionally, you can specify the path
to the server parameter file.
Usage Notes
To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL binary
in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have Oracle
RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the
database home to manage Oracle ASM.
Example
To add a clusterware resource for Oracle ASM to every node in the cluster, use the
following command:
$ srvctl add asm
G.8.2 srvctl config asm
Displays the configuration for all Oracle ASM instances.
Syntax
srvctl config asm [-proxy] [-detail]
Parameters
Table G-5 srvctl config asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether the
Oracle ASM configuration to display is a proxy instance.
-detail Optionally, you can use this parameter to print detailed
configuration information.
Appendix G
SRVCTL Command Reference
G-14
Usage Notes
• Use this command only with Oracle Clusterware.
• To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL
binary in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have
Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL
binary in the database home to manage Oracle ASM.
Example
This command returns output similar to the following:
$ srvctl config asm
ASM Home: /u01/app/12.1.0/grid
ASM Listener: LISTENER
ASM instance count: 3
Password file:
G.8.3 srvctl disable asm
Disables the Oracle ASM proxy resource.
Oracle ASM will restart if it contains Oracle Clusterware data or if the node restarts
and it was running before the node failed. The srvctl disable asm command also
prevents the srvctl start asm command from starting Oracle ASM instances.
Disabling the Oracle ASM proxy resource prevents the databases and disk groups
from starting because they depend on the Oracle ASM proxy resource.
Syntax
srvctl disable asm [-proxy] [-node node_name]
Parameters
Table G-6 srvctl disable asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
disabling a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
disable Oracle ASM.
Usage Notes
• To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL
binary in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have
Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL
binary in the database home to manage Oracle ASM.
• Oracle ASM is part of the Oracle Clusterware stack and when OCR and voting
files are stored on Oracle ASM, then Oracle ASM starts when OHASD starts the
Oracle Clusterware stack. The srvctl disable asm command does not prevent the
Oracle ASM instance managed by OHASD from starting. Oracle ASM, therefore,
starts as needed by the Oracle Clusterware stack.
Appendix G
SRVCTL Command Reference
G-15
The srvctl disable asm command prevents the Oracle ASM Oracle Clusterware
proxy resource, and any resources that depend on it, from starting. So, the
command prevents Oracle Clusterware-managed objects, such as databases, disk
groups, and file systems that depend on Oracle ASM, from starting. For example,
the srvctl start database | diskgroup | filesystem command fails to start any of
those objects on nodes where the Oracle ASM Oracle Clusterware proxy resource
is disabled. The command also prevents the srvctl start asm command from
starting Oracle ASM on remote nodes.
Example
The following example disables Oracle ASM on a node named crmnode1:
$ srvctl disable asm -node crmnode1
G.8.4 srvctl enable asm
Enables an Oracle ASM instance.
Syntax
srvctl enable asm [-proxy] [-node node_name]
Parameters
Table G-7 srvctl enable asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
enabling a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
enable Oracle ASM.
Usage Notes
To manage Oracle ASM on Oracle Database 12c installations, use the SRVCTL binary
in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have Oracle
RAC or Oracle Database installed, then you cannot use the SRVCTL binary in the
database home to manage Oracle ASM.
Example
An example of this command is:
$ srvctl enable asm -node crmnode1
G.8.5 srvctl getenv asm
Displays the values for environment variables associated with Oracle ASM.
Syntax
srvctl getenv asm [-envs "name_list"]
Appendix G
SRVCTL Command Reference
G-16
Usage Notes
• If you choose not use the -env parameter, then the values of all environment
variables associated with Oracle ASM are displayed.
• You can specify a comma-delimited list of the names of environment variables for
which you want to retrieve the values.
Example
The following example displays the current values for all the environment variables
used by Oracle ASM:
$ srvctl getenv asm
G.8.6 srvctl modify asm
Modifies the listener used by Oracle ASM, the disk group discovery string used by
Oracle ASM, or the SPFILE used by Oracle ASM for a noncluster database or a
cluster database.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl modify asm [-listener listener_name] [-pwfile password_file_path]
[-count {number_of_instances | ALL}] [-diskstring asm_diskstring]
[-spfile spfile_path_name [-proxy] [-force]]
Parameters
Parameter Description
-listener
listener_name
Specify the name of the listener with which Oracle ASM registers.
-pwfile
password_file_path
Specify the full path to the location of the password file for Oracle
ASM.
-count
{number_of_instances |
ALL}
Specify the number of Oracle ASM instances to create, or that an
Oracle ASM instance should be created on all nodes.
-diskstring
asm_diskstring
Specify a new Oracle ASM disk group discovery string.
-spfile
spfile_path_name
Specify the path to the new spfile to be used by Oracle ASM.
-proxy Use this parameter to specify an Oracle ASM proxy instance.
–force Use this parameter to force modification of Oracle ASM.
Appendix G
SRVCTL Command Reference
G-17
Example
An example of this command to modify the configuration of Oracle ASM is:
$ srvctl modify asm -listener lsnr1
G.8.7 srvctl predict asm
Predicts the consequences of Oracle ASM failure.
Syntax
srvctl predict asm [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify a particular node on which you want to predict the
consequences of an Oracle ASM failure.
• You can choose verbose output.
Example
An example of this command to predict the consequences of an Oracle ASM failure on
a particular node:
$ srvctl predict asm -node crmnode2
G.8.8 srvctl relocate asm
Relocates an Oracle Flex ASM instance from one Hub Node of an Oracle Flex Cluster
to another.
Syntax
srvctl relocate asm -currentnode current_node [-targetnode target_node] [-force]
Parameters
Table G-8 srvctl relocate asm Parameters
Parameter Description
-currentnode
current_node
Name of the node on which the Oracle Flex ASM instance currently
resides.
-targetnode
target_node
Name of the node to which you want to relocate the Oracle Flex
ASM instance.
-force Force the relocation of the Oracle Flex ASM instance.
Usage Notes
• You cannot use this command if there is only one Oracle Flex ASM instance
running.
• Because of bootstrap issues between Oracle ASM and Oracle Clusterware, on the
node where Oracle Clusterware uses Oracle ASM run either crsctl stop crs or
Appendix G
SRVCTL Command Reference
G-18
crsctl stop cluster to stop Cluster Ready Services on the node before you
relocate the Oracle ASM instance.
Example
An example of this command to relocate an Oracle Flex ASM instance from the
current node to a node named hubnode2 is:
$ srvctl relocate asm -currentnode hubnode1 -targetnode hubnode2
G.8.9 srvctl remove asm
Removes the Oracle ASM resource from Oracle Clusterware management.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl remove asm [-proxy] [-force]
Parameters
Table G-9 srvctl remove asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
removing a proxy Oracle ASM configuration.
-force Forcefully removes an Oracle ASM resource (ignores any
dependencies).
Example
An example of this command is:
$ srvctl remove asm -force
G.8.10 srvctl setenv asm
Sets Oracle ASM environment configurations.
Syntax
Use this command with one of the following syntaxes:
srvctl setenv asm -envs "name=value,[...]"
srvctl setenv asm -env "name=value"
Appendix G
SRVCTL Command Reference
G-19
Parameters
Table G-10 srvctl setenv asm Command Parameters
Parameter Description
-envs "name=value,
[...]"
Use this parameter to specify either a single name-value pair or a
comma-delimited list of multiple name-value pairs of environment
variables enclosed in double quotation marks ("").
-env "name=value" Use this parameter to enable a single environment variable to be
set to a value that contains commas or other special characters,
enclosed in double quotation marks ("").
Example
The following example sets the language environment configuration for Oracle ASM:
$ srvctl setenv asm -envs "LANG=en"
G.8.11 srvctl start asm
Starts an Oracle ASM instance.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl start asm [-proxy] [-node node_name [-startoption start_options]]
Parameters
Table G-11 srvctl start asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
starting a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
start Oracle ASM.
Note: You can use this parameter only with Oracle Clusterware.
Appendix G
SRVCTL Command Reference
G-20
Table G-11 (Cont.) srvctl start asm Command Parameters
Parameter Description
-startoption
start_options
Optionally, you can specify options to the startup command, such
as OPEN, MOUNT, or NOMOUNT
Note: For multi-word startup options, such as read only and read
write, separate the words with a space and enclose in double
quotation marks (""). For example, "read only".
See Also: SQL*Plus User's Guide and Reference for more
information about startup options
Examples
An example of this command to start an Oracle ASM instance on a single node of a
cluster is:
$ srvctl start asm -node crmnode1
An example to start an Oracle ASM instance on all nodes in the cluster, or for a
noncluster database, is:
$ srvctl start asm
G.8.12 srvctl status asm
Displays the status of an Oracle ASM instance.
Note:
To manage Oracle ASM on Oracle Database 12c installations, use the
SRVCTL binary in the Oracle Grid Infrastructure home for a cluster (Grid
home). If you have Oracle RAC or Oracle Database installed, then you cannot
use the SRVCTL binary in the database home to manage Oracle ASM.
Syntax
srvctl status asm [-proxy] [-node node_name] [-detail] [-verbose]
Parameters
Table G-12 srvctl status asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to display the
status for an Oracle ASM proxy instance.
-node node_name Optionally, you can specify a particular node. If you do
not specify this parameter, then SRVCTL displays the
status of all Oracle ASM instances.
-detail Print detailed status information.
Appendix G
SRVCTL Command Reference
G-21
Table G-12 (Cont.) srvctl status asm Command Parameters
Parameter Description
-verbose Displays verbose output.
Example
This command returns output similar to the following:
$ srvctl status asm -verbose
ASM is enabled
ASM is running on node2, node3, node4
ASM instance +ASM2 is running on node node2
Number of clients connected: 4
Names of clients: db002, db003, +IOS1, clicluster1:later3
ASM instance +ASM3 is running on node node3
Number of clients connected: 2
Names of clients: db001, +IOS2
ASM instance +ASM4 is running on node node4
Number of clients connected: 2
Names of clients: db004, db005
G.8.13 srvctl stop asm
Stops an Oracle ASM instance.
Syntax
srvctl stop asm [-proxy] [-node node_name] [-stopoption stop_options] [-force]
Parameters
Table G-13 srvctl stop asm Command Parameters
Parameter Description
-proxy Optionally, you can use this parameter to specify whether you are
stopping a proxy Oracle ASM configuration.
-node node_name Optionally, you can specify a particular node on which you want to
stop Oracle ASM.
If you do not specify this parameter, then SRVCTL stops the Oracle
ASM instance on every active node in the cluster.
Note: You can use this parameter only with Oracle Clusterware.
-stopoption
stop_options
Optionally, you can specify options to the shutdown command,
such as NORMAL, TRANSACTIONAL, IMMEDIATE, or ABORT.
See Also: SQL*Plus User's Guide and Reference for more
information about shutdown options
-force Optionally, you can use this parameter to stop disk groups, file
systems, and databases that depend on Oracle ASM.
Appendix G
SRVCTL Command Reference
G-22
Usage Notes
• To manage Oracle ASM on Oracle Database 12c installations, use SRVCTL in the
Oracle Grid Infrastructure home for a cluster (Grid home). If you have Oracle RAC
or Oracle Database installed, then you cannot use SRVCTL in the database home
to manage Oracle ASM.
• You cannot use this command when OCR is stored in Oracle ASM because it will
not stop Oracle ASM. To stop Oracle ASM you must shut down Oracle
Clusterware.
Example
An example of this command is:
$ srvctl stop asm -node crmnode1 -stopoption IMMEDIATE
G.8.14 srvctl unsetenv asm
Unsets the Oracle ASM environment configurations.
Syntax
srvctl unsetenv asm -envs "name_list"
Usage Notes
Use the -envs parameter to specify a comma-delimited list of the names of
environment variables enclosed in double quotation marks ("").
Example
The following example unsets the environment configuration for an Oracle ASM
environment variable:
$ srvctl unsetenv asm -envs "CLASSPATH"
G.8.15 srvctl add cvu
Adds the Cluster Verification Utility (CVU) to an Oracle Clusterware configuration.
Note:
This command is only available with Oracle Clusterware.
Syntax and Parameters
Use the srvctl add cvu command with the following syntax:
srvctl add cvu [-checkinterval time_in_minutes]
Appendix G
SRVCTL Command Reference
G-23
Usage Notes
• Optionally, you can change the interval between checks. By default, CVU runs
once every 6 hours and verifies the health of the cluster. The shortest interval you
can specify for CVU check is 10 minutes.
• Run this command while logged in as the Grid home user.
Example
To add CVU with a check interval of 6 hours, use the following command:
$ srvctl add cvu -checkinterval 360
G.8.16 srvctl config cvu
Displays the time interval, in minutes, between CVU checks.
Syntax and Parameters
Use the srvctl config cvu command with the following syntax:
srvctl config cvu
This command has no parameters.
Example
This command returns output similar to the following:
CVU is configured to run once every 360 minutes
G.8.17 srvctl disable cvu
Disables the Cluster Verification Utility (CVU) for Oracle Clusterware management (if
enabled).
Syntax
srvctl disable cvu [-node node_name]
Parameters
Optionally, you can specify the name of a particular node on which you want to disable
CVU. Otherwise, SRVCTL disables CVU on all nodes.
Example
An example of this command to disable CVU on a node named crmnode1 is:
$ srvctl disable cvu -node crmnode1
G.8.18 srvctl enable cvu
Enables the Cluster Verification Utility (CVU) for Oracle Clusterware management (if
disabled).
Appendix G
SRVCTL Command Reference
G-24
Syntax
srvctl enable cvu [-node node_name]
Parameters
Optionally, you can specify the name of a particular node on which you want to enable
CVU. Otherwise, SRVCTL enables CVU on all nodes.
Example
An example of this command to enable CVU on a node named crmnode1 is:
$ srvctl enable cvu -node crmnode1
G.8.19 srvctl modify cvu
Modifies the check interval for CVU.
Syntax
srvctl modify cvu [-checkinterval time_in_minutes]
Parameters
By default, CVU runs once every 360 minutes (six hours) and verifies the health of
cluster. If you change the interval, then the shortest interval you can specify for CVU
check is 10 minutes.
Example
An example of this command to modify CVU to have a check interval of 4 hours is:
$ srvctl modify cvu -checkinterval 240
G.8.20 srvctl relocate cvu
Temporarily relocates the CVU to another node in a cluster.
Syntax
srvctl relocate cvu [-node node_name]
Usage Notes
Optionally, you can specify a particular node to which you want to relocate CVU.
Example
An example of this command to temporarily relocate CVU from the local node to the
cluster node named crmnode2 is:
$ srvctl relocate cvu -node crmnode2
Appendix G
SRVCTL Command Reference
G-25
G.8.21 srvctl remove cvu
Removes CVU from an Oracle Clusterware configuration.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl remove cvu [-force]
Usage Notes
Use the -force parameter to remove a CVU resource that is running or starting.
G.8.22 srvctl start cvu
Starts the CVU resource on one node in a cluster. If you specify a node name, then
CVU starts on that node.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl start cvu [-node node_name]
Usage Notes
Optionally, you can specify a particular node to which you want to start CVU.
Otherwise, SRVCTL starts CVU on all nodes.
Example
An example of this command to start CVU on a single node of a cluster is:
$ srvctl start cvu -node crmnode1
Appendix G
SRVCTL Command Reference
G-26
G.8.23 srvctl status cvu
Displays the current state of the CVU resource on one node in a cluster. If you specify
a node name, then the command checks CVU status on that node.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status cvu [-node node_name]
Usage Notes
Optionally, you can specify a particular node where the CVU resource is running, if it is
not the local node.
Example
An example of this command to check the status of CVU on the node in the cluster
named crmnode1 is:
$ srvctl status cvu -node crmnode1
G.8.24 srvctl stop cvu
Stops the Cluster Verification Utility (CVU) that is either in the running or starting state.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl stop cvu [-force]
Usage Notes
Optionally, you can specify the -force parameter to stop CVU if it is a dependant
resource.
Example
An example of this command to stop CVU:
$ srvctl stop cvu
G.8.25 srvctl add exportfs
Creates an export file system configuration in Oracle Clusterware.
Appendix G
SRVCTL Command Reference
G-27
Syntax
srvctl add exportfs -name unique_name -id havip_name -path path_to_export
[-clients export_clients] [-options export_options] [-type NFS | SMB]
Parameters
Table G-14 svrctl add exportfs Command Parameters
Parameter Description
-name unique_name Enter a unique name for the export file system that you are
creating. This parameter is required.
-id havip_name Enter the number or name that identifies an existing HAVIP, that
you specified in the srvctl add havip command. This parameter
is required.
-path path_to_export Enter the path to the Oracle Automatic Storage Management
Cluster File System (Oracle ACFS) that you want to export. This
parameter is required.
-clients
export_clients -
options export_options
Optionally, enter a comma-delimited list of clients to which you
want the file system exported. You can enter net groups and
wildcards. For example:
-clients @netgroup1,
*.us.domain.com,
16.140.0.0, hostname1
Note: You can use the -clients parameter only for Linux systems.
Use the -options parameter for Solaris and AIX systems.
-type NFS | SMB Specify the export type (NFS for a network file system or SMB for
Oracle ACFS server message block). The default is NFS for Linux
and UNIX platforms, and SMB for Windows.
Usage Notes
You must run this command as root on Linux and UNIX platforms.
Example
To export with operating system defaults:
# srvctl add exportfs -name cifsExport -path "/acfs1" -options "browsable = yes,read
only = no,comment = acfs1"
To export read-only to certain clients:
# srvctl add exportfs -name export1 -id havip1 -path /u01/db1 -clients node1 -
options ro
G.8.26 srvctl config exportfs
Displays the configuration information for the export file system in Oracle Clusterware.
Syntax
srvctl config exportfs [-name unique_name | -id havip_name]
Appendix G
SRVCTL Command Reference
G-28
Parameters
Table G-15 srvctl config exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export for which you want to
display the configuration.
-id havip_name Enter the name of a HAVIP to display the configuration of all the
NFS exports attached to the specific HAVIP.
Example
If you specify the -name parameter, then this command returns output similar to the
following, whether you specify -name or -id:
$ srvctl config exportfs -id havip1
export file system kep1 is configured
Exported path: /scratch/ghnew/base/mymount3
Export options:
Export Type:
Exported clients:
export file system kexp2 is configured
Exported path: /scratch/ghnew/base/mymount3
Export options:
Export Type:
Exported clients:
G.8.27 srvctl disable exportfs
Disables an export file system managed by Oracle Clusterware.
Syntax
srvctl disable exportfs -name filesystem_name
Usage Notes
• This command takes only the unique name of the file system you want to disable.
• You must run this command as root user on Linux and UNIX platforms.
Example
The following example disables an export file system called export1:
# srvctl disable exportfs -name export1
G.8.28 srvctl enable exportfs
Enables an export file system configuration in Oracle Clusterware.
Syntax
srvctl enable exportfs -name filesystem_name
Appendix G
SRVCTL Command Reference
G-29
This command takes only the name of the file system you want to enable, which is a
required parameter.
Usage Notes
You must run this command as the root user on Linux and UNIX platforms.
Example
The following command example enables a file system named export1:
# srvctl enable exportfs -name export1
G.8.29 srvctl modify exportfs
Modifies an export file system configuration in Oracle Clusterware.
Syntax
srvctl modify exportfs -name unique_name [-path path_to_export]
[-clients node_list] [-options nfs_options_string]
Parameters
Table G-16 srvctl modify exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export file system to modify.
This parameter is required.
-path path_to_export You can modify the path to the Oracle Automatic Storage
Management Cluster File System (Oracle ACFS) where the export
is located.
-clients node_list You can modify the comma-delimited list of clients (hosts) to where
the file system is exported. You can enter net groups and
wildcards. For example:
-clients @netgroup1,*.us.domain.com,16.140.0.0, hostname1
Note: You can use the -clients parameter only for Linux systems.
Use the -options parameter for Solaris and AIX systems.
-options
nfs_client_string
Use this parameter to modify the export options for the export file
system.
Usage Notes
• You must run this command as root user on Linux and UNIX platforms.
• You must start and stop the NFS export before any changes you make take effect.
Example
The following command example modifies the path of an export file system named
exportfs1:
# srvctl modify exportfs -name exportfs1 -path /mnt/racdb1
Appendix G
SRVCTL Command Reference
G-30
G.8.30 srvctl remove exportfs
Removes the specified export file system configuration.
Syntax
srvctl remove exportfs -name exportfs_name [-force]
Parameters
Table G-17 srvctl remove exportfs Command Parameters
Parameter Description
-name exportfs_name Enter the unique name of the export file system you want to
remove.
-force Use this parameter to ignore any dependencies and forcibly
remove the export file system.
Usage Notes
• You must run this command as root user on Linux and UNIX platforms.
• If you do not use the -force parameter, then you must first stop the export file
system you want to remove before you remove it.
• If you use the -force parameter, then the resulting configuration can cause errors
when attempting to shut down the Oracle Clusterware stack.
Examples
To remove the stopped export file system named export1:
# srvctl remove exportfs -name export1
To remove a running export file system, leaving it exported:
# srvctl remove exportfs -name export1 -force
G.8.31 srvctl start exportfs
Starts an export file system configuration in Oracle Clusterware.
Syntax
srvctl start exportfs {-name unique_name | -id havip_name}
Parameters
Table G-18 srvctl start exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export you want to start.
-id havip_name The unique ID associated with the HAVIP resource.
Appendix G
SRVCTL Command Reference
G-31
Example
To start an export file system:
$ srvctl start exportfs -name export1
G.8.32 srvctl status exportfs
Displays the status of an export file system configuration.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status exportfs [-name unique_name | -id havip_name]
Parameters
Table G-19 srvctl status exportfs Command Parameters
Parameter Description
-name unique_name Optionally, you can specify the unique name of the NFS export for
which you want to display the status.
-id havip_name Alternatively, you can specify the name of an HAVIP resource and
display the status of all of the NFS exports associated with the
specified HAVIP resource.
Usage Notes
If you do not specify any parameters, then SRVCTL displays the status for all NFS
exports in the cluster.
Example
This command returns output similar to the following:
$ srvctl status exportfs
export file system export1 is enabled
export file system export1 is not exported
export file system export2 is enabled
export file system export2 is exported on node node1
G.8.33 srvctl stop exportfs
Stops an export file system configuration managed by Oracle Clusterware.
Syntax
srvctl stop exportfs {-name unique_name | -id havip_name} [-force]
Appendix G
SRVCTL Command Reference
G-32
Parameters
Table G-20 srvctl stop exportfs Command Parameters
Parameter Description
-name unique_name Enter the unique name of the NFS export you want to stop.
-id havip_name Alternatively, you can specify the name of an HAVIP. If you specify
this parameter, then SRVCTL stops all of the NFS exports
associated with the HAVIP resource you specify.
–force Stop the NFS export, ignoring errors.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl stop exportfs -name export1
G.8.34 srvctl add filesystem
Adds a device containing a file system (Oracle Automatic Storage Management
Cluster File System (Oracle ACFS) or other) to the Oracle Clusterware stack for
automount and high availability.
An Oracle ACFS file system resource is typically created for use with application
resource dependency lists. For example, if an Oracle ACFS file system is configured
for use as an Oracle Database home, then a resource created for the file system can
be included in the resource dependency list of the Oracle Database application. This
will cause the file system and stack to be automatically mounted because of the start
action of the database application.
Syntax
srvctl add filesystem -device volume_device -path mountpoint_path
[-volume volume_name] [-diskgroup disk_group_name]
[-node node_list | -serverpool server_pool_list] [-user user_list]
[-fstype {ACFS | EXT3 | EXT4}] [-fsoptions options] [-description description]
[-appid application_id] [-autostart {ALWAYS | NEVER | RESTORE}]
Note:
Oracle supports the EXT3 and EXT4 values for the -fstype parameter only for
Linux.
Appendix G
SRVCTL Command Reference
G-33
Parameters
Table G-21 srvctl add filesystem Command Parameters
Parameter Description
-device volume_device Specify the path to the file system volume device you want to add.
-path mountpoint_path Specify the mount point path that is used to set up dependencies
on other resources for nested mounts. This must be an absolute
path.
-volume volume_name Optionally, you can specify the name of the volume.
-diskgroup
disk_group_name
Optionally, you can specify the name of the Oracle ACFS disk
group to which you want to add the device.
-node node_list | -
serverpool
server_pool_list
Optionally, you can specify a comma-delimited list of nodes on
which to mount the file system device. If you specify a list of nodes
or a server pool, then SRVCTL creates a single-node file system
resource. Without any nodes or server pools, SRVCTL creates a
file system resource that runs on every cluster node.
Alternatively, you can specify a comma-delimited list of server
pools in which a file system will run. If you specify a list of server
pools, then you dynamically limit the number or type of nodes on
which a file system will run. This does not count as a cluster-wide
file system for later usage that may require a cluster-wide Oracle
ACFS resource, such as HANFS.
Note: Nodes and server pools are mutually exclusive.
-user user_list Optionally, you can specify a comma-delimited list of users
authorized to mount and unmount the file system.
If you specify no users, then only root can mount and unmount the
file system. If the file system is for Oracle Database software, then
specify the name of the Oracle home owner.
-fstype {ACFS | EXT3 |
EXT4}
Optionally, you can specify the type of file system to be mounted.
The default value is ACFS.
If the type of file system to be mounted is not ACFS, then it must be
a single-node file system, and you must specify -node or -
serverpool.
-fsoptions options Optionally, you can specify options used to mount the file system.
The options are file system and operating system dependent.
-description
description
Optionally, you can specify a description of the file system. This is
stored as an attribute for later viewing by an administrator.
-appid application_id Optionally, you can specify an application ID, which is a unique
identifier used to group file systems into logical groupings. You can
use this method to group file systems that may be different on
different nodes but are used by an application that must have a
dependency on the resource type, which is ora.id.fs.type.
-autostart {ALWAYS |
NEVER | RESTORE}
Optionally, you can specify the file system resource autostart
policy.
ALWAYS: The file system resource always automatically starts.
NEVER: The file system does not automatically start.
RESTORE: The file system is restored to its last state. This is the
default option.
Appendix G
SRVCTL Command Reference
G-34
Usage Notes
• Use this command only with Oracle Clusterware.
• You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms.
• This command must be run only one time from the Oracle Grid Infrastructure
home.
• To manage Oracle ACFS on Oracle Database 12c installations, use the SRVCTL
binary in the Oracle Grid Infrastructure home for a cluster (Grid home). If you have
Oracle RAC or Oracle Database installed, then you cannot use the SRVCTL
binary in the database home to manage Oracle ACFS.
Examples
To add the d1volume1-295 disk device in the disk group RAC_DATA as the Oracle ACFS
volume VOLUME1 with a mount point of /oracle/cluster1/acfs:
# srvctl add filesystem -device /dev/asm/d1volume1-295
-path /oracle/cluster1/acfs1
To add an Oracle ACFS file system on the dynamic volume device asm-test-55, with
this file system mounted on one of the specified nodes at a time:
# srvctl add filesystem -fstype ACFS -device asm-test-55 -path myacfs
-node node1,node2,node3
G.8.35 srvctl config filesystem
Displays the configuration for a specific file system resource.
Note:
Use this command only with Oracle Clusterware.
Syntax
srvctl config filesystem -device volume_device
Usage Notes
Use the -device parameter to specify the path to the file system resource for which you
want to display the configuration.
Examples
The following example lists the configuration of all file systems:
$ srvctl config filesystem
The following example displays the configuration for a specific device:
$ srvctl config filesystem -device /dev/asm/d1volume1-295
Appendix G
SRVCTL Command Reference
G-35
G.8.36 srvctl disable filesystem
Disables a specific Oracle Clusterware-managed file system volume.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl disable filesystem -device volume_device
Usage Notes
Specify the path to the file system volume you want to disable.
Example
An example of this command is:
# srvctl disable filesystem -device /dev/asm/racvol1
G.8.37 srvctl enable filesystem
Enables an Oracle ACFS volume or generic file system in Oracle Clusterware.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl enable filesystem -device volume_device
Usage Notes
Specify the path to the volume device you want to enable.
Example
An example of this command is:
# srvctl enable filesystem -device /dev/asm/racvol1
Appendix G
SRVCTL Command Reference
G-36
G.8.38 srvctl modify filesystem
Modifies the configuration of the file system resource.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl modify filesystem -device volume_device -user user_name
[-path mountpoint_path] [-node node_list | -serverpool
server_pool_list] [-fsoptions options] [-description description]
[-autostart {ALWAYS | NEVER | RESTORE}]
Parameters
Table G-22 srvctl modify filesystem Command Parameters
Parameter Description
-device volume_device Specify the path to the file system volume device you want to
modify.
-user user_name Specify the name of the user that is authorized to mount and
unmount the file system. If you do not specify this parameter, then
SRVCTL defaults to the user running the command.
-path mountpoint_path Modify the mount point path that is used to set up dependencies on
other resources for nested mounts. This must be an absolute path.
-node node_list | -
serverpool
server_pool_list
Modify a comma-delimited list of nodes on which to mount the file
system device. If you specify a list of nodes or a server pool, then
SRVCTL creates a single-node file system resource. Without any
nodes or server pools, SRVCTL creates a file system resource that
runs on every cluster node.
Alternatively, you can modify a comma-delimited list of server pools
in which a file system will run. If you specify a list of server pools,
then you dynamically limit the number or type of nodes on which a
file system will run. This does not count as a cluster-wide file
system for later usage that may require a cluster-wide Oracle
ACFS resource, such as HANFS.
Note: Nodes and server pools are mutually exclusive.
-fsoptions options Modify options used to mount the file system. The options are file
system and operating system dependent.
-description
description
Modify the description of the file system.
-autostart {ALWAYS |
NEVER | RESTORE}
Modify the file system resource autostart policy.
ALWAYS: The file system resource always automatically starts
NEVER: The file system does not automatically start
RESTORE: The file system is restored to its last state. This is the
default option.
Appendix G
SRVCTL Command Reference
G-37
Usage Notes
• You must run this command as root user on Linux and UNIX platforms.
• When performing online changes to the file system resource, the changes take
effect only after the resource is next (re)started.
Example
The following example changes the authorized user to sysad for the RACVOL1 volume:
# srvctl modify filesystem -device /dev/asm/racvol1 -user sysad
G.8.39 srvctl predict filesystem
Predicts the consequences of file system failure.
Syntax
srvctl predict filesystem -device volume_device_name [-verbose]
Usage Notes
• Specify the path name of the file system volume device.
• Optionally, you can choose verbose output.
Example
An example of this command is:
$ srvctl predict filesystem -device /dev/asm/volume1-123
G.8.40 srvctl remove filesystem
Removes a specific file system resource from the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl remove filesystem -device volume_device_name [-force]
Usage Notes
• Specify the path to the file system resource device you want to remove.
• Optionally, you can use the -force parameter to ignore any resource
dependencies and forcibly remove the resource from the cluster.
• You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms.
Appendix G
SRVCTL Command Reference
G-38
Examples
An example of this command is:
# srvctl remove filesystem -device /dev/asm/racvol1
G.8.41 srvctl start filesystem
Starts (mounts) the file system resource.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl start filesystem -device volume_device [-node node_name]
Parameters
Table G-23 srvctl start filesystem Command Parameters
Parameter Description
-device volume_device Specify the path of the file system resource device that you want to
start.
-node node_name Optionally, you can specify the name of the node on which the file
system resource should be started.
If you do not specify this parameter, then SRVCTL starts the file
system resource on all the available nodes in the cluster.
Usage Notes
You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms, or as a configured file system user.
See Also:
srvctl add filesystem for more information about configuring file system users
Examples
To start a file system on all configured nodes in the cluster:
$ srvctl start filesystem -device /dev/asm/data_db1-68
To start the file system on node1:
$ srvctl start filesystem -device /dev/asm/data_db1-68 -node node1
Appendix G
SRVCTL Command Reference
G-39
G.8.42 srvctl status filesystem
Displays the status of the file system resource.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status filesystem [-device volume_device] [-verbose]
Usage Notes
• Optionally, you can specify the path of the file system resource for which you want
to obtain the status. If you do not specify this parameter, then SRVCTL displays
the status of all file systems.
• Optionally, you can use the -verbose parameter to display detailed output.
Examples
This command displays output similar to the following, depending on whether you
specify a device name.
If you specify a device name:
$ srvctl status filesystem -device /dev/asm/racvol_1
ACFS file system is not mounted on node1
ACFS file system is not mounted on node2
If you do not specify a device name:
$ srvctl status filesystem
ACFS file system is not running
ACFS file system is running on node1,node3
Note:
In the preceding examples, the file system is Oracle ACFS. If you are using
other file systems, then they will display as EXT3 or EXT4.
Appendix G
SRVCTL Command Reference
G-40
G.8.43 srvctl stop filesystem
Stops (unmounts) the Oracle ACFS file system or generic file system.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl stop filesystem -device volume_device [-node node_name] [-force]
Parameters
Table G-24 srvctl stop filesystem Command Parameters
Parameter Description
-device volume_device Specify the path to the file system volume device that you want to
stop.
-node node_name Optionally, you can specify the name of a node. If you do not
specify this parameter, then SRVCTL stops the volume resource on
all active nodes in the cluster.
-force Optionally, you can use -force to stop the file system and also
stop any databases or other resources that depend on this file
system.
Usage Notes
You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms, or as a configured file system user.
See Also:
srvctl add filesystem for more information about configuring file system users
Example
An example of this command is:
# srvctl stop filesystem -device /dev/asm/racvol_1 -force
G.8.44 srvctl add gns
Adds the Grid Naming Service (GNS) to a cluster when you are using a DHCP public
network or creating a client cluster.
Appendix G
SRVCTL Command Reference
G-41
Syntax
Use the srvctl add gns command with one of the following syntax models:
To add GNS to a cluster that is not currently running GNS:
srvctl add gns [-domain domain_name] -vip {vip_name | ip_address} [-skip] [-verbose]
To change a cluster that is not running GNS to be a client cluster of another cluster
that is running GNS:
srvctl add gns -clientdata file_name
To add a secondary GNS to a cluster:
srvctl add gns -vip vip_name | ip_address -clientdata file_name
Parameters
Table G-25 srvctl add gns Command Parameters
Parameter Description
-domain domain_name The network subdomain that is used for Forward DNS Lookup of
cluster IP addresses. You can only use this parameter if you
specify -vip, and you must use this parameter if the cluster to
which you are adding GNS has a GNS zone delegation and you
are using DHCP. The cluster to which you add GNS using -vip
with the -domain parameters becomes a server cluster.
If you do not specify -domain, then SRVCTL adds GNS without a
domain.
-vip {vip_name |
ip_address}
Specify either the virtual IP (VIP) name or IP address on which
GNS listens for DNS requests. You cannot use -vip with -
clientdata.
Use the -domain parameter with -vip to make the cluster to which
you are adding GNS a server cluster.
-skip Specify this parameter to skip the reachability check of the VIP
address.
-clientdata
path_to_file
Specify the path to the file you created with the srvctl export gns
command that contains the GNS credentials. You must copy this
file to a node in the cluster you are adding before running the
srvctl add gns command.
The cluster to which you add GNS using -clientdata becomes
either a client cluster or a secondary GNS.
You can only use the -clientdata parameter with the -vip
parameter when you are adding a secondary GNS.
-verbose Verbose output.
Usage Notes
• You must run this command as root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms.
• When you are adding GNS to a cluster for the first time, use the -vip parameter
with the -domain parameter.
Appendix G
SRVCTL Command Reference
G-42
• When you are adding GNS to a cluster using the -clientdata parameter, you must
first export the GNS data to a file and manually copy the file to a node in the
cluster you are adding. Use the -clientdata parameter and run this command on
any node in the cluster.
• You can only specify the -vip and -clientdata parameters at the same time when
you are adding a secondary GNS.
Examples
To add GNS to a cluster, making it a server cluster:
# srvctl add gns -vip 192.168.16.17 -domain cluster.mycompany.com
To add GNS to a cluster, making it a client cluster:
# srvctl add gns -clientdata /tmp/gnsdata
G.8.45 srvctl config gns
Displays the configuration for the grid naming service (GNS).
Syntax
srvctl config gns [-detail] [-subdomain] [-multicastport] [-node node_name] [-port]
[-status]
[-version] [-query name] [-list] [-clusterguid] [-clustername] [-clustertype] [-
loglevel]
[-network] [-role] [-instances]
Parameters
Table G-26 srvctl config gns Command Parameters
Parameter Description
-detail Print detailed configuration information about the GNS.
-subdomain Display the subdomain served by GNS.
-multicastport Display the port on which the GNS daemon is listening for multicast
requests.
-node node_name Display the configuration information for GNS on the specified
node.
-port Display the port that the GNS daemon uses to communicate with
the DNS server.
-status Display the status of GNS.
-version Display the version of GNS.
-query name Query GNS for the records belonging to a specific name.
-list List all records in GNS.
-clusterguid Display the globally unique identifier of the cluster where GNS is
running.
-clustername Display the name of the cluster where GNS is running.
-clustertype Display the type of configuration of GNS on this cluster.
-loglevel Print the log level of the GNS.
Appendix G
SRVCTL Command Reference
G-43
Table G-26 (Cont.) srvctl config gns Command Parameters
Parameter Description
-network Display network on which GNS is listening.
-role Display the role of the GNS instance.
-instances Display the instance list.
G.8.46 srvctl disable gns
Disables GNS for a specific node, or all available nodes in the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl disable gns [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify the name of a node in the cluster on which you want to
disable GNS. If you do not specify this parameter, then SRVCTL disables GNS for
the entire cluster.
• Optionally, you can use the -verbose parameter to display detailed output.
Example
An example of this command to disable GNS on the node named crm7 is:
$ srvctl disable gns -node crm7
G.8.47 srvctl enable gns
Enables GNS on all nodes or a specific node.
Note:
This command can be used only with Oracle Clusterware.
Syntax
srvctl enable gns [-node node_name] [-verbose]
Appendix G
SRVCTL Command Reference
G-44
Usage Notes
• Optionally, you can specify the name of a node on which you want to enable GNS.
If you do not specify this parameter, then SRVCTL enables GNS on all nodes in
the cluster.
• Optionally, you can use the -verbose parameter to print detailed output.
Example
An example of this command is:
$ srvctl enable gns -node node1
G.8.48 srvctl export gns
Exports Grid Naming Service (GNS) instance data to a file that you can use when you
are either moving GNS from one server cluster to another or when you are creating a
client cluster.
SRVCTL extracts the data from OCR. Exported data includes:
• The credentials used to authorize users, which includes the VIP address on which
the server listens
• The names and DNS records kept in GNS
Syntax
srvctl export gns {-instance path_to_file | {-clientdata path_to_file -role {CLIENT|
SECONDARY} [-version]}}
Parameters
Table G-27 srvctl export gns Command Parameters
Parameter Description
-instance path_to_file Use this parameter to specify the file to which GNS instance data is
written, when you are moving GNS from one server cluster to
another.
-clientdata
path_to_file -role
{CLIENT|SECONDARY}
Use this parameter to specify the file to which GNS credentials data
is written, when you are adding a client cluster to create a file that
contains credentials that the client cluster accesses to perform
name management operations on the server cluster.
You must also use the -role parameter to specify a role for which
the client data will be exported.
-version Optionally, you can use this parameter to specify the version for
which the client data will be generated.
Example
The following command exports the GNS credentials data to a file named gns.txt:
$ srvctl export gns -clientdata /temp/gnsdata/gns.txt
Appendix G
SRVCTL Command Reference
G-45
G.8.49 srvctl import gns
The srvctl import gns command imports data from a file that you create when you run
the srvctl export gns command. Use this command when you want to locate GNS to
a different server cluster.
When you import GNS data, SRVCTL stores the credentials and places the record
data into OCR. If another GNS instance is running or data for another instance is
encountered during the import procedure, then an error occurs.
This command also makes the cluster in which you run it the server cluster.
Note:
This command is only available with Oracle Clusterware.
G.8.50 srvctl modify gns
Modifies the IP address, domain, or other configuration parameters used by the grid
naming service (GNS).
Syntax
Use the srvctl modify gns command with one of the following syntax models:
srvctl modify gns -loglevel log_level
or
srvctl modify gns [-resolve name] [-verify name]
[-parameter name:value[,name:value...]]
[-vip {vip_name | ip} [-skip]] [-clientdata file_name]
[-role {PRIMARY} [-force]] [-verbose]
Parameters
Table G-28 srvctl modify gns Command Parameters
Parameter Description
-loglevel log_level Specify the GNS diagnostic logging level (acceptable values are
1-6).
-resolve name Resolve the name you specify through GNS.
-verify name Check to see if the specified name is advertised through GNS.
-parameter
name:value[,name:value
...]
Set the value of one or more configuration parameters.
Appendix G
SRVCTL Command Reference
G-46
Table G-28 (Cont.) srvctl modify gns Command Parameters
Parameter Description
-vip {vip_name | ip}
[-skip]
Specify a VIP name or IP address on which GNS is to listen.
Note: You can modify this attribute using Online Resource Attribute
Modification.
Optionally, you can use the -skip parameter to skip the
reachability check of the VIP address.
-clientdata file_name Modifies the GNS client data with client data contained in the
specified file.
-role {PRIMARY} [-
force]
Convert a secondary GNS instance to primary.
Use the -force parameter to forcibly convert the secondary GNS
instance to primary.
Examples
An example of this command is:
$ srvctl modify gns -vip 192.0.2.15
G.8.51 srvctl relocate gns
Relocates GNS from its current hosting node to another node within the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl relocate gns [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify the name of a node to which you want to move GNS.
• Optionally, you can use the -verbose parameter to display verbose output.
• On Linux and UNIX systems, you must be logged in as root and on Windows, you
must be logged in as a user with Administrator privileges to run this command.
Example
An example of this command is:
# srvctl relocate gns -node node1
Appendix G
SRVCTL Command Reference
G-47
G.8.52 srvctl remove gns
Removes GNS from the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl remove gns [-force] [-verbose]
Usage Notes
• Optionally, you can use the -force parameter to forcibly remove GNS from the
cluster, regardless of any errors that might occur.
• Optionally, you can use the -verbose parameter to display verbose output.
Example
An example of this command is:
$ srvctl remove gns
G.8.53 srvctl start gns
Starts GNS on a specific node.
Syntax
srvctl start gns [-loglevel log_level] [-node node_name] [-verbose]
Parameters
Table G-29 srvctl start gns Command Parameters
Parameter Description
-loglevel log_level Optionally, you can specify the level of logging with which GNS
should run. Log levels vary between 1 (minimal tracing) and 6
(traces everything and is time consuming).
-node node_name Optionally, you can specify the name of a node in the cluster where
you want to start GNS.
-verbose Optionally, you can use this parameter to display verbose output.
Usage Notes
You can only run this command in the server cluster. If you attempt to run this
command in a client cluster, then an error occurs.
Appendix G
SRVCTL Command Reference
G-48
Example
An example of this command to start the GNS on the cluster node named crmnode1 is:
$ srvctl start gns -node crmnode1
G.8.54 srvctl status gns
Displays the current state of GNS.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl status gns [-node node_name] [-verbose]
Usage Notes
• Optionally, you can specify a node on which GNS is running for which you want to
display the state.
• Optionally, you can use the -verbose parameter to display detailed output.
G.8.55 srvctl stop gns
Stops GNS in the cluster.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl stop gns [-node node_name] [-force] [-verbose]
Usage Notes
• Optionally, you can specify the name of a node on which GNS is running that you
want to stop.
• Optionally, you can use -force and -verbose to forcibly stop GNS and print detailed
output, respectively.
Example
An example of this command to stop GNS on the local node is:
$ srvctl stop gns
Appendix G
SRVCTL Command Reference
G-49
G.8.56 srvctl update gns
Modifies a Grid Naming Service (GNS) instance.
Note:
This command is only available with Oracle Clusterware.
Syntax
Use the srvctl update gns command with one of these syntax models:
srvctl update gns -advertise name -address ip_address [-timetolive time_to_live
]
[-verbose]
srvctl update gns -delete name [-address address] [-verbose]
srvctl update gns -alias alias -name name [-timetolive time_to_live] [-verbose]
srvctl update gns -deletealias alias [-verbose]
srvctl update gns -createsrv service -target target -protocol protocol
[-weight weight] [-priority priority] [-port port_number]
[-timetolive time_to_live] [-instance instance_name] [-verbose]
srvctl update gns -deletesrv service_name -target target -protocol protocol
[-verbose]
srvctl update gns -createtxt name -target target [-timetolive time_to_live]
[-namettl name_ttl] [-verbose]
srvctl update gns -deletetxt name -target target [-verbose]
srvctl update gns -createptr name -target target [-timetolive time_to_live]
[-namettl name_ttl] [-verbose]
srvctl update gns -deleteptr name -target target [-verbose]
Parameters
Table G-30 srvctl update gns Command Parameters
Parameter Description
-advertise name Use this parameter to advertise a name through GNS.
-address ip_address Specify the IP address for an advertised name.
-timetolive
time_to_live
Optionally, you can specify, in seconds, an amount of time for the
record to live.
-delete name Use this parameter to remove the advertisement of a name from
GNS.
-alias alias Use this parameter to create an alias for an advertised name.
Appendix G
SRVCTL Command Reference
G-50
Table G-30 (Cont.) srvctl update gns Command Parameters
Parameter Description
-name name You must specify a name to associate with the alias.
-deletealias alias Use this parameter to delete an alias.
-createsrv service Use this parameter to create a service that is described by the
record.
-target target Use this parameter to associate a name with the service.
-protocol protocol Use this parameter to specify which protocol is used to connect to
the service.
-weight weight Optionally, you can specify the weight of the record.
-priority priority Optionally, you can specify a priority of the record, with a value
ranging from 0 to 65535.
-port port_number Optionally, you can specify a port number used to connect to the
service, with a value ranging from 0 to 65535.
-instance
instance_name
Optionally, you can specify an instance name for the service.
-deletesrv
service_name
Use this parameter to specify the name of the service record you
want to delete.
-createtxt name Use this parameter to add a text (TXT) record using the specified
name.
-namettl name_ttl Optionally, you can specify the time, in seconds, to live for the
name.
-deletetxt name Use this parameter to delete a text (TXT) record for a specific
name.
-createptr name Use this parameter to add a pointer (PTR) record for a specific
name.
-deleteptr name Use this parameter to delete a pointer (PTR) record for a specific
name.
Usage Notes
You must be logged in as the root user on Linux and UNIX platforms, or as an
Administrator user on Windows platforms, to run this command.
Example
The following command advertises a name with GNS:
# srvctl update gns -advertise myname -address 192.168.1.45
G.8.57 srvctl add havip
Adds highly available VIPs (HAVIPs) (used for highly available NFS and SMB exports)
to a cluster.
Syntax
srvctl add havip -id havip_name -address {host_name | ip_address}
[-netnum network_number] [-description text] [-skip] [-homenode node_name]
Appendix G
SRVCTL Command Reference
G-51
Parameters
Table G-31 srvctl add havip Command Parameters
Parameter Description
-id havip_name Specify a unique ID for the HAVIP resource.
-address {host_name |
ip_address}
Specify either a host name or an IPv4 IP address for the HAVIP
you are going to create.
Note: You must configure the IPv4 IP address with a non-DHCP,
non-round robin DNS address.
-netnum network_number Optionally, you can specify a network resource upon which the
HAVIP depends. The default value for this parameter is 1.
-description text Optionally, you can specify a text description of the HAVIP.
-skip Optionally, you can specify this parameter to skip the reachability
check for the IP address.
-homenode node_name Optionally, you can specify a preferred node or an empty string to
clear the home node.
Example
An example of this command is:
# srvctl add havip -id myhavip -address 192.0.2.1 -netnum 2 -description
"My HA VIP" -skip -homenode myNode2
G.8.58 srvctl config havip
Displays configuration information for a specific highly available VIP (HAVIP) (used for
highly available NFS and SMB exports) or all HAVIP resources in a cluster.
Syntax
Use the srvctl config havip command with the following syntax:
srvctl config havip [-id havip_name]
Parameters
Table G-32 srvctl config havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to display. If you do not
specify this parameter, then SRVCTL displays the configuration information for all
HAVIPs known to Oracle Clusterware.
Example
This command returns output similar to the following:
$ srvctl config havip -id hrexports
VIP: /mjk-vm3-vip/10.149.237.196/10.149.236.0/255.255.252.0/eth0
Description: HR Exports
Appendix G
SRVCTL Command Reference
G-52
G.8.59 srvctl disable havip
Prevents a specific highly-available VIP (HAVIP) (used for highly-available NFS and
SMB exports) resource from running on a number of specified nodes.
Syntax
srvctl disable havip -id havip_name [-node node1,node2,...,noden]
Parameters
Table G-33 srvctl disable havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
disable.
-node
node1,node2,...,noden
Specify the name of a node or a comma-delimited list of node
names on which you do not want the HAVIP resource to run.
If you specify all but one node in the cluster, then the HAVIP will
not fail over.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl disable havip -id myhavip -node myNode1,myNode3
G.8.60 srvctl enable havip
Enables a specific highly-available VIP (HAVIP) (used for highly-available NFS and
SMB exports) to run on a number of specified nodes.
Syntax
srvctl enable havip -id havip_name [-node node_name]
Parameters
Table G-34 srvctl enable havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
enable.
-node node_name Specify the name of a node on which you want the HAVIP resource
to be able to run.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Appendix G
SRVCTL Command Reference
G-53
Examples
An example of this command is:
# srvctl enable havip -id myhavip -node myNode1
G.8.61 srvctl modify havip
Modifies a highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports).
Syntax
srvctl modify havip -id havip_name [-address {host_name | ip_address}
[-netnum network_number] [-skip]] [-description text] [-homenode node_name]
Parameters
Table G-35 srvctl modify havip Command Parameters
Parameter Description
-id havip_name Specify the unique name for the HAVIP resource you want to
modify.
-address {host_name |
ip_address
Specify either a host name or an IPv4 IP or IPv6 address for the
HAVIP you want to modify.
Note: You must configure the IPv4 IP address with a non-DHCP,
non-round robin DNS address.
-netnum network_number Optionally, you can change the network resource upon which the
HAVIP depends. The default value for this optional parameter is 1.
-skip Specify this parameter to skip checking the reachability of the IP
address.
-description text Specify a text description for the HAVIP.
-homenode node_name Optionally, you can specify a preferred node or an empty string to
clear the home node.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl modify havip -id myhavip -address 192.168.16.17 -netnum 2
G.8.62 srvctl relocate havip
Relocates a highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports) to another node in a cluster.
Syntax
srvctl relocate havip -id havip_name [-node node_name] [-force]
Appendix G
SRVCTL Command Reference
G-54
Parameters
Table G-36 srvctl relocate havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
relocate.
-node node_name Specify the name of the node to which you want to relocate the
HAVIP resource.
-force Optionally, you can force the relocation of the HAVIP resource.
Example
An example of this command is:
$ srvctl relocate havip -id myhavip -node node3
G.8.63 srvctl remove havip
Removes a highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports).
Syntax
srvctl remove havip -id havip_name [-force]
Parameters
Table G-37 srvctl remove havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to
remove.
–force Use this parameter to forcibly remove the resource from the cluster
and ignore any dependencies.
Usage Notes
• You must first stop the HAVIP resource before you attempt to remove it.
• You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl remove havip -id myhavip -force
G.8.64 srvctl start havip
Starts a specific highly-available VIP (HAVIP) (used for highly-available NFS and SMB
exports) on a specific node.
Appendix G
SRVCTL Command Reference
G-55
Syntax
srvctl start havip -id havip_name [-node node_name]
Parameters
Table G-38 srvctl start havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource you want to start.
-node node_name Optionally, you can use the -node parameter to specify the name of
the node on which the HAVIP resource starts.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Example
An example of this command is:
# srvctl start havip -id myhavip -node myNode1
G.8.65 srvctl status havip
Displays the status of all highly-available VIPs (HAVIPs) (used for highly-available
NFS and SMB exports) in a cluster or one particular HAVIP.
Syntax
srvctl status havip [-id havip_name]
Usage Notes
Specify the unique name of the HAVIP resource you want to display. If you do not
specify this parameter, then SRVCTL displays the status of all HAVIPs known to
Oracle Clusterware.
Example
This command returns output similar to the following:
$ srvctl status havip
HAVIP ora.ha1.havip is enabled
HAVIP ora.ha1.havip is not running
G.8.66 srvctl stop havip
Stops the highly-available VIPs (HAVIPs) (used for highly-available NFS and SMB
exports) on a specific node.
Syntax
srvctl stop havip -id havip_name [-node node_name] [-force]
Appendix G
SRVCTL Command Reference
G-56
Parameters
Table G-39 srvctl stop havip Command Parameters
Parameter Description
-id havip_name Specify the unique name of the HAVIP resource to stop.
-node node_name Optionally, you can specify the name of the node on which the
HAVIP resource to stop resides.
–force Use this parameter to forcibly stop the HAVIP.
Usage Notes
You must run this command as root user on Linux and UNIX platforms.
Examples
An example of this command is:
# srvctl stop havip -id myhavip -node myNode1 -force
G.8.67 srvctl add ioserver
Adds an Oracle ASM IOServer configuration to the cluster.
When you configure, upgrade, or convert from a standard cluster to an Oracle Flex
Cluster you can create Oracle ASM IOServers on the Hub nodes in the cluster.
Syntax
srvctl add ioserver [-spfile spfile] [-count number_of_ioserver_instances| ALL] [-
listener listener_name]
Parameters
Table G-40 srvctl add ioserver Command Parameters
Parameter Description
-spfile spfile Specify the path to the server parameter file.
-count number_of_ioserver_instances| ALL Specify the number of Oracle ASM IOServer
instances you want to add or ALL to add
instances to all nodes.
-listener listener_name Specify the name of the listener.
Example
An example of this command is:
# srvctl add ioserver -count 2
Appendix G
SRVCTL Command Reference
G-57
G.8.68 srvctl config ioserver
Displays the configuration details of Oracle ASM IOServers.
Syntax
srvctl config ioserver
Usage Notes
This command has no parameters.
Example
This command displays output similar to the following:
$ srvctl config ioserver
ASM I/O Server instance count: 3
ASM I/O Server is enabled.
ASM I/O server is enabled on nodes:
ASM I/O server is disabled on nodes:
G.8.69 srvctl disable ioserver
Disables an Oracle ASM IOServer.
Syntax
srvctl disable ioserver -node node_name
Usage Notes
Use the -node parameter to specify the name of a Hub node on which you want to
disable an Oracle ASM IOServer.
G.8.70 srvctl enable ioserver
Enable an Oracle ASM IOServer on a specific node.
Syntax
srvctl enable ioserver [-node node_name]
Usage Notes
Use the -node parameter to specify the name of a Hub node on which you want to
enable an Oracle ASM IOServer.
G.8.71 srvctl getenv ioserver
Displays the values for environment variables associated with an Oracle ASM
IOServer.
Syntax
srvctl getenv ioserver [-envs "name_list"]
Appendix G
SRVCTL Command Reference
G-58
Usage Notes
Specify a comma-delimited list of the names of environment variables. If you do not
specify this parameter, then SRVCTL displays the values of all environment variables
associated with the database.
G.8.72 srvctl modify ioserver
Modifies an Oracle ASM IOServer configuration on a cluster.
Syntax
srvctl modify ioserver [-spfile spfile] [-count number_of_ioserver_instances | ALL]
[-listener listener_name] [-force]
Parameters
Table G-41 srvctl modify ioserver Command Parameters
Parameter Description
-spfile spfile Optionally, specify the path to the server parameter file path.
-count
number_of_ioserver_ins
tances | ALL
Optionally, specify a number of instances or ALL (to modify
instances on all nodes) that you want to modify. If you modify the
count, then, because this results in a change in cardinality of the
cluster resource, the changes take effect immediately.
-listener
listener_name
Optionally, specify the name of the listener.
-force Optionally, you can ignore any dependencies and force the
modification of the Oracle ASM IOServer.
G.8.73 srvctl relocate ioserver
Relocates an Oracle ASM IOServer instance from its current hosting node to another
node within the cluster.
Syntax
srvctl relocate ioserver -currentnode node_name [-targetnode node_name] [-force]
Parameters
Table G-42 srvctl relocate ioserver Command Parameters
Parameter Description
-currentnode node_name The name of the node on which the Oracle ASM IOServer instance
currently resides
-targetnode node_name The name of the node to which to relocate the IOServer instance
-force Optionally, you can force the relocation of the Oracle ASM
IOServer instance
Appendix G
SRVCTL Command Reference
G-59
Example
The following command relocates the Oracle ASM IOServer from a node called
crsNode2 to a node called crsNode5:
$ srvctl relocate ioserver -currentnode crsNode2 -targetnode crsNode5
G.8.74 srvctl remove ioserver
Use this command to remove an Oracle ASM IOServer instance from the cluster.
Syntax
srvctl remove ioserver [-force]
Usage Notes
Use the -force parameter to forcibly remove the Oracle ASM IOServer instance,
ignoring any dependencies.
G.8.75 srvctl setenv ioserver
Administers the environment configuration for an Oracle ASM IOServer.
Syntax
srvctl setenv ioserver {-envs "name=val[,name=val][...]" | -env "name=val"}
Parameters
Table G-43 srvctl setenv ioserver Command Parameters
Parameter Description
-envs "name=val,..." Comma-delimited list of name-value pairs of environment
variables enclosed in double quotation marks ("").
-env "name=val" Alternatively, use this parameter to set a single
environment variable to a value that contains commas or
other special characters, enclosed in double quotation
marks ("").
G.8.76 srvctl start ioserver
Starts Oracle ASM IOServers in the cluster.
You can also start an Oracle ASM IOServer on a particular Hub Node by specifying
the node name.
Syntax
srvctl start ioserver [-node node_name]
Appendix G
SRVCTL Command Reference
G-60
Usage Notes
If you choose to start an Oracle ASM IOServer on a particular Hub Node, then use the
-node parameter and specify the name of the node. If you do not specify a particular
Hub Node, then SRVCTL starts all Oracle ASM IOServers in the cluster.
Example
The following command starts an Oracle ASM IOServer on a Hub node named
mjkhub46:
$ srvctl start ioserver -node mjkhub46
G.8.77 srvctl status ioserver
Displays the status of Oracle ASM IOServers running in the cluster.
You can display the status of all Oracle ASM IOServers running a cluster, the status of
an Oracle ASM IOServer running on a particular Hub Node, or the information about
clients from a specific database.
Syntax
srvctl status ioserver [-node node_name] [-detail]
Parameters
Table G-44 srvctl status ioserver Parameters
Parameter Description
—node node_name Specify a particular Hub node to display the status of the Oracle
ASM IOServer resource instance running there. If you do not
specify a Hub node, then SRVCTL returns the status of all Oracle
ASM IOServer resource instances running in the cluster.
-detail Use this parameter to display more detailed information about the
status of the Oracle ASM IOServer.
Example
If you run the command with the -detail parameter, then SRVCTL displays output
similar to the following:
$ srvctl status ioserver -detail
ASM I/O Server is enabled
ASM I/O Server is running on nodes: mjk376, mjk377
ASM I/O Server instance +IOS1 running on node mjk376 is connected to ASM instance
+ASM2:
Number of clients connected: 2
Names of clients: later14, alus16, later12, alus9, db0010
ASM I/O Server instance +IOS2 running on node mjk377 is connected to ASM instance
+ASM3:
Number of clients connected: 3
Number of requests completed per sec: 110
Appendix G
SRVCTL Command Reference
G-61
Names of networks: eth1, eth2
Names of clients: later11, later3, later14, later15, later16, alus19, alus17, alus13
G.8.78 srvctl stop ioserver
Stops an Oracle ASM IOServer in the cluster.
Syntax
srvctl stop ioserver [-node node_name] [-force]
Usage Notes
• Use the -node parameter to stop an Oracle ASM IOServer on a particular Hub
Node. If you do not specify a particular Hub Node, then SRVCTL stops all of the
Oracle ASM IOServers in the cluster.
• Use the -force parameter to stop an Oracle ASM IOServer, regardless of any
dependencies.
G.8.79 srvctl unsetenv ioserver
Unsets the Oracle ASM IOServer environment configurations.
Syntax
srvctl unsetenv ioserver -envs "name_list"
Usage Notes
Use the -envs parameter to specify a comma-delimited list of the names of
environment variables enclosed in double quotation marks ("").
G.8.80 srvctl add mgmtdb
Adds a management database (CHM repository) resource to the cluster.
Syntax
srvctl add mgmtdb [-domain domain]
Usage Notes
Optionally, you can specify the domain for the database. If you have the DB_DOMAIN
database initialization parameter set, then you must provide a value for this parameter.
Example
To add a management database to the cluster:
$ srvctl add mgmtdb -domain example.com
Appendix G
SRVCTL Command Reference
G-62
G.8.81 srvctl config mgmtdb
Displays configuration information for the management database (CHM repository)
resource.
Note:
Use this command only with Oracle Clusterware.
Syntax
srvctl config mgmtdb [-verbose] [-all]
Usage Notes
• Optionally, use the -verbose parameter to print detailed output.
• Optionally, use the -all parameter to print detailed configuration information.
G.8.82 srvctl disable mgmtdb
Disables the management database (CHM repository) resource on the specified node.
Note:
This command is only available with Oracle Clusterware.
Syntax
srvctl disable mgmtdb [-node node_name]
Usage Notes
Optionally, you can specify the name of a cluster node on which the management

Next

Oracle Clusterware Control (CRSCTL)

CRSCTL Overview
CRSCTL is an interface between you and Oracle Clusterware, parsing and calling
Oracle Clusterware APIs for Oracle Clusterware objects.
CRSCTL provides 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:
• Starting and stopping Oracle Clusterware resources
• Enabling and disabling Oracle Clusterware daemons
• Checking the health of the cluster
• Managing resources that represent third-party applications
• Integrating Intelligent Platform Management Interface (IPMI) with Oracle
Clusterware to provide failure isolation support and to ensure cluster integrity
• Debugging Oracle Clusterware components
E-1
This section includes the following topics:
• Clusterized (Cluster Aware) Commands
• CRSCTL Operational Notes
• Deprecated Subprograms or Commands
E.1.1 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 Services 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:
• crsctl check cluster
• crsctl start cluster
• crsctl stop cluster
E.1.2 CRSCTL Operational Notes
Information about using the CRSCTL command-line interface.
Usage Information
• The CRSCTL utility is located in the Grid_home/bin directory. To run CRSCTL
commands, type in crsctl at the operating system prompt followed by the
command and arguments, as shown in the following example:
crsctl stop crs
• There are three categories of CRSCTL commands:
– Those that you use in either the Oracle Real Application Clusters (Oracle
RAC) environment or in the Oracle Restart environment
– Those that you use in the Oracle RAC environment, only
– Those that you use in the Oracle Restart environment, only
• Many CRSCTL commands use the -f parameter to force the command to run and
ignore any checks.
For example, if you specify the force parameter for the crsctl stop resource
command on a resource that is running and has dependent resources that are
also running, then the force parameter omits the error message and instead stops
or relocates all the dependent resources before stopping the resource you
reference in the command.
• Do not use versions of CRSCTL earlier than 12c release 1 (12.1) to manage
Oracle Clusterware 12c.
Appendix E
CRSCTL Overview
E-2
Filters
You can use filters to narrow down Oracle Clusterware entities upon which a CRSCTL
command operates, as follows:
• Simple filters are attribute-value pairs with an operator.
• Operators must be surrounded by spaces, as shown in the examples.
• You can combine simple filters into expressions called expression filters using
Boolean operators.
Supported filter operators are:
=
>
<
!=
co: Contains
st: Starts with
en: Ends with
Supported Boolean operators are AND and OR.
Examples of filters are:
• TYPE = type1
• ((TYPE = type1) AND (CHECK_INTERVAL > 50))
• (TYPE = type1) AND ((CHECK_INTERVAL > 30) OR (AUTO_START co never))
• NAME en network.res
• TYPE st ora.db
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 parameter functions in Linux, UNIX,
and Windows environments) instead of -help.
E.1.3 Deprecated Subprograms or Commands
Table E-1 lists deprecated commands and their replacements that you can use to
perform the same or similar functionality.
Appendix E
CRSCTL Overview
E-3
Table E-1 Deprecated CRSCTL Commands and Replacements
Deprecated Command Replacement Commands
crs_stat crsctl check cluster
crsctl status resource
crs_register crsctl add resource
crsctl add type
crsctl modify resource
crsctl modify type
crs_unregister crsctl stop resource
crsctl delete resource
crs_start crsctl start resource
crsctl start crs
crsctl start cluster
crs_stop crsctl stop resource
crsctl stop crs
crsctl stop cluster
crs_getperm crsctl getperm resource
crsctl getperm type
crs_profile crsctl add resource
crsctl add type
crsctl status resource
crsctl status type
crsctl modify resource
crsctl modify type
crs_relocate crsctl relocate resource
crs_setperm crsctl setperm resource
crsctl setperm type
crsctl add crs administrator Use the access control list (ACL) to control who can add
server pools.
crsctl check crsd crsctl check crs
crsctl check cssd crsctl check css
crsctl check evmd crsctl check evm
crsctl debug res log
resource_name:level
crsctl set log
Appendix E
CRSCTL Overview
E-4
Table E-1 (Cont.) Deprecated CRSCTL Commands and Replacements
Deprecated Command Replacement Commands
crsctl set css votedisk crsctl add css votedisk
crsctl delete css votedisk
crsctl query css votedisk
crsctl replace votedisk
crsctl start resources crsctl start resource -all
crsctl stop resources crsctl stop resource -all
crsctl set css logfilesize crsctl get tracefileopts css
crsctl set tracefileopts css
crsctl get css logfilesize crsctl set tracefileopts css
crsctl set trace module_name
"component:debugging_level
[,component:debugging_level]
[,...]"
crsctl get trace
E.2 Dual Environment CRSCTL Commands
Use these commands in either the Oracle RAC or the Oracle Restart environments.
The commands listed in this section manage the Oracle Clusterware resources in both
Oracle RAC and Oracle Restart environments.
E.2.1 crsctl check css
Checks 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
Example
This command returns output similar to the following:
CRS-4529: Cluster Synchronization Services is online
E.2.2 crsctl check evm
Checks the status of the Event Manager.
Appendix E
Dual Environment CRSCTL Commands
E-5
Syntax
crsctl check evm
Example
This command returns output similar to the following:
CRS-4533: Event Manager is online
E.2.3 crsctl get hostname
Retrieves 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
E.2.4 crsctl add resource
Registers a resource to be managed by Oracle Clusterware.
A resource can be an application process, a database, a service, a listener, and so on.
Syntax
crsctl add resource resource_name -type resource_type [-group group_name [-file
file_path |
-attr "attribute_name=attribute_value[,...]"]
[-i] [-f]
Parameters
Table E-2 crsctl add resource Command Parameters
Parameter Description
resource_name Specify a short, descriptive name for the resource.
-type resource_type Specify the type of resource that you are adding preceded by the -type flag.
-group group_name Specify a resource group to which you want to add the resource.
-file file_path Path name (either absolute or relative) for a text file containing line-delimited
attribute name-value pairs that define the resource.
Appendix E
Dual Environment CRSCTL Commands
E-6
Table E-2 (Cont.) crsctl add resource Command Parameters
Parameter Description
-attr
"attribute_name=attribute_v
alue[,...]"
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"
Some attributes can have multiple values. In those cases, separate the
values with a space and enclose the list of values in single quotation marks.
For example:
-attr "SERVER_POOL_NAMES=
'ora.pool1 ora.pool2',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 CRSCTL 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 parameter:
• To add a resource that has dependencies on other resources that do not yet
exist. The force parameter 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 parameter 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 parameter is required.
Appendix E
Dual Environment CRSCTL Commands
E-7
Usage Notes
• Both the resource_name and -type resource_type parameters are required. You can
create an associated resource type using the crsctl add type command.
• Any user can create a resource but only clusterware administrators can create
resources of type local_resource or resources of type cluster_resource that have
SERVER_POOLS=*.
Once a resource is defined, its ACL controls who can perform particular operations
with it. The Oracle Clusterware administrator list is no longer relevant.
On Windows, a member of the Administrators group has full control over
everything.
See Also:
"crsctl setperm resource" for more information about setting ACLs
• If an attribute value for an attribute name-value pair contains commas, then the
value must be enclosed in single quotation marks ('').
• Following is an example of an attribute file:
PLACEMENT=favored
HOSTING_MEMBERS=node1 node2 node3
RESTART_ATTEMPTS@CARDINALITYID(1)=0
RESTART_ATTEMPTS@CARDINALITYID(2)=0
FAILURE_THRESHOLD@CARDINALITYID(1)=2
FAILURE_THRESHOLD@CARDINALITYID(2)=4
FAILURE_INTERVAL@CARDINALITYID(1)=300
FAILURE_INTERVAL@CARDINALITYID(2)=500
CHECK_INTERVAL=2
CARDINALITY=2
• Do not use this command for any resources with names that begin with ora
because these resources are Oracle resources.
Examples
Example E-1 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 E-2 Example 2
To register a resource 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"
Appendix E
Dual Environment CRSCTL Commands
E-8
Example E-3 Example 3
To register a Samba server resource of the generic_application resource type, using
the EXECUTABLE_NAMES attribute:
# crsctl add resource my_samba -type generic_application -attr
"EXECUTABLE_NAMES=smbd,START_PROGRAM='/etc/rc.d/init.d/smb start',
STOP_PROGRAM='/etc/rc.d/init.d/smb stop'"
Example E-4 Example 4
To register a DNS server of the generic_application resource type, using the
EXECUTABLE_NAMES attribute:
# crsctl add resource my_dns -type generic_application -attr
"EXECUTABLE_NAMES=named,START_PROGRAM='/etc/rc.d/init.d/named start',
STOP_PROGRAM='/etc/rc.d/init.d/named stop'"
Example E-5 Example 5
To register an Apache web server of the generic_application resource type using the
PID_FILES attribute:
# crsctl add resource my_apache -type generic_application -attr
"START_PROGRAM='/usr/sbin/httpd -k start',STOP_PROGRAM='/usr/sbin/httpd -k stop',
PID_FILES=/etc/httpd/run/httpd.pid"
Example E-6 Example 6
To register an application of generic_application resource type using environment
variables:
# crsctl add resource my_app -type generic_application -attr
"START_PROGRAM='/opt/my_app start', EXECUTABLE_NAMES=my_app,
ENVIRONMENT_VARS='USE_NETAPP=no,USE_BACKUP=yes,CLEAN_ON_KILL=yes'"
Related Topics:
• Oracle Clusterware Resource Reference
E.2.5 crsctl delete resource
Removes resources from the Oracle Clusterware configuration.
Syntax
crsctl delete resource {"resource_name [...]" | -w "filter"} [-i] [-f]
Parameters
Table E-3 crsctl delete resource Command Parameters
Parameter Description
resource_name Specify one or more resource names that you want to delete.
Multiple resources must be space-delimited and enclosed in double
quotation marks ("").
Appendix E
Dual Environment CRSCTL Commands
E-9
Table E-3 (Cont.) crsctl delete resource Command Parameters
Parameter Description
-w "filter" Specify a resource filter that Oracle Clusterware uses to limit the
number of resources evaluated for deletion. 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
Note: All operators must be surrounded by spaces.
See Also: Filters for more information about operators
-i If you specify -i, then CRSCTL 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 this parameter to delete a resource that is online.
Usage Notes
• Either the resource_name or -w "filter" parameter is required
• You must have read and write permissions to delete the specified resources
• Do not use this command for any resources with names that begin with ora
because these resources are Oracle resources
Example
To delete a resource from Oracle Clusterware:
# crsctl delete resource myResource
E.2.6 crsctl eval add resource
Predicts the effects of adding a resource without making changes to the system.
This command may be useful to application administrators.
Syntax
crsctl eval add resource resource_name -type resource_type [-file file_path
| -attr "attribute_name=attribute_value[,...]"]] [-group group_name] [-f]
Appendix E
Dual Environment CRSCTL Commands
E-10
Parameters
Table E-4 crsctl eval add resource Command Parameters
Parameter Description
resource_name Specify a short, descriptive name for the resource.
-type resource_type Specify the type of resource that you are adding following the -
type flag.
-file file_path Path name (either absolute or relative) for a text file containing linedelimited
attribute name-value pairs that define the resource.
-attr
"attribute_name=attrib
ute_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 commadelimited
attribute name-value pairs enclosed in double
quotations marks (""). For example:
-attr "CHECK_INTERVAL=30,START_TIMEOUT=25"
Some attributes can have multiple values. In those cases,
separate the values with a space and enclose the list of values
in single quotation marks. For example:
-attr "SERVER_POOL_NAMES=
'ora.pool1 ora.pool2',START_TIMEOUT=25"
• Optionally, 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
-group group_name Specify a resource group to which you want to add the resource.
Appendix E
Dual Environment CRSCTL Commands
E-11
Table E-4 (Cont.) crsctl eval add resource Command Parameters
Parameter Description
-f Use the force parameter:
• To add a resource that has dependencies on other resources
that do not yet exist. The force parameter 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 parameter 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
parameter is required.
E.2.7 crsctl eval fail resource
Predicts the consequences of a resource failing.
Syntax
crsctl eval fail resource {resource_name | -w "filter"} [-n server]
[-env "attr=val[,...]"]
Parameters
Table E-5 crsctl eval fail resource Command Parameters
Parameter Description
resource_name Specify the name of a resource for which you want to simulate a
failure. You must specify either the name of a resource or resource
filters using the -w parameter.
-w "filter" Alternatively, you can specify a resource filter that Oracle
Clusterware uses to limit the number of resources evaluated. 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
Note: All operators must be surrounded by spaces.
See Also: "Filters" for more information about operators
-n server Specify the name of the server on which the resource that you want
to simulate a failure resides.
Appendix E
Dual Environment CRSCTL Commands
E-12
Table E-5 (Cont.) crsctl eval fail resource Command Parameters
Parameter Description
-env "attr=val[,...]" You can optionally override one or more resource profile attribute
values with the -env command parameter. 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
("").
Example
This command returns output similar to the following:
$ crsctl eval fail res cs1
Stage Group 1:
-----------------------------------------------------------------------------
Stage Number Required Action
-----------------------------------------------------------------------------
1 Y Resource 'cs1' (1/1) will be in state
[ONLINE|INTERMEDIATE] on server
[mjkeenan_node_0]
Y Resource 'cs1' (2/1) will be in state
[ONLINE|INTERMEDIATE] on server
[mjkeenan_node_1]
-----------------------------------------------------------------------------
E.2.8 crsctl eval relocate resource
Simulates relocating a resource without making changes to the system.
Syntax
crsctl eval relocate resource {resource_name | -all} {-s source_server | -w "filter"}
[-n destination_server] [-f]
Parameters
Table E-6 crsctl eval relocate resource Command Parameters
Parameter Description
resource_name Specify the name of a resource you want to relocate.
-all Alternatively, you can use this parameter to specify all resources
for relocation.
-s source_server Specify a particular server from which you want to relocate the
resources.
Appendix E
Dual Environment CRSCTL Commands
E-13
Table E-6 (Cont.) crsctl eval relocate resource Command Parameters
Parameter Description
-w "filter" Alternative to using -s, you can specify a resource filter that
CRSCTL 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 to relocate
resources. If you do not specify a destination server, then CRSCTL
relocates the resources to the best server according to the attribute
profile of each resource.
–f Specify the -f parameter to force the relocation of the resource
when it has other resources running that depend on it. CRSCTL
stops or relocates dependent resources 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.
E.2.9 crsctl eval modify resource
Predicts the effects of modifying a resource without making changes to the system.
Syntax
crsctl eval modify resource resource_name -attr
"attribute_name=attribute_value[,...]"
[-group group_name] [-f]
Parameters
Table E-7 crsctl eval modify resource Command Parameters
Parameter Description
resource_name Specify the name of the resource you want to evaluate.
Appendix E
Dual Environment CRSCTL Commands
E-14
Table E-7 (Cont.) crsctl eval modify resource Command Parameters
Parameter Description
-attr
"attribute_name=attrib
ute_value[,...]"
You can specify attributes for a resource you want to evaluate in
two different ways:
• Following the -attr flag, you can specify one or more commadelimited
attribute name-value pairs to modify enclosed in
double quotations marks (""). For example:
-attr "CHECK_INTERVAL=30, START_TIMEOUT=25"
Some attributes can have multiple values. In those cases,
separate the values with a space and enclose the list of values
in single quotation marks. For example:
-attr "SERVER_POOL_NAMES=
'ora.pool1 ora.pool2',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
-group group_name Specify a resource group to which the resource belongs that you
want to evaluate.
–f Specify this parameter to evaluate what happens if you run the
command with the force parameter.
E.2.10 crsctl eval start resource
Predicts the effects of starting a resource without making changes to the system.
Syntax
crsctl eval start resource {resource_name [...] | -w "filter"}
[-n server_name] [-f]
Appendix E
Dual Environment CRSCTL Commands
E-15
Parameters
Table E-8 crsctl eval start resource Command Parameters
Parameter Description
resource_name [...] Specify one or more space-delimited resource names to start.
-w "filter" Specify a resource filter surrounded by double quotation marks ("")
that Oracle Clusterware uses to match resources. For example, -w
"TYPE = ora.database.type" or -w "NAME = cs1".
See Also: "Filters" for more information
-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.
–f Use the -f parameter 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 parameter in this case,
then the start command fails.
E.2.11 crsctl eval stop resource
Predicts the effect of stopping a resource without making changes to the system.
Syntax
crsctl eval stop resource {resource_name [...] | -w "filter"} [-f]
Parameters
Table E-9 crsctl eval stop resource Command Parameters
Parameter Description
resource_name [...] Specify 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
See Also: Filters for more information
–f Specify the -f parameter 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 parameter.
Appendix E
Dual Environment CRSCTL Commands
E-16
E.2.12 crsctl getperm resource
Displays the user and group permissions for the specified resource.
Syntax
crsctl getperm resource resource_name [{-u user_name | -g group_name}]
Parameters
Table E-10 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
• The resource_name parameter is required
• You must have read permission on the specified resources to obtain their
permissions
• Do not use this command for any resources with names that begin with ora
because these resources are Oracle resources
See Also:
Oracle Clusterware Resource Reference for more information about resources
and resource attributes
Examples
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
Appendix E
Dual Environment CRSCTL Commands
E-17
Name: app.appvip
r--
E.2.13 crsctl modify resource
Modifies the attributes of a particular resource in Oracle Clusterware.
Syntax
crsctl modify resource resource_name -attr "attribute_name=attribute_value"
[-i] [-f] [-delete] [-group group_name] [-env "env1=val1,env2=val2,..."]
Parameters
Table E-11 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 commadelimited
attribute name-value pairs to modify enclosed in
double quotations marks (""). For example:
-attr "CHECK_INTERVAL=30, START_TIMEOUT=25"
Some attributes can have multiple values. In those cases,
separate the values with a space and enclose the list of values
in single quotation marks. For example:
-attr "SERVER_POOL_NAMES=
'ora.pool1 ora.pool2',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
Appendix E
Dual Environment CRSCTL Commands
E-18
Table E-11 (Cont.) crsctl modify resource Command Parameters
Parameter Description
-i If you specify -i, then CRSCTL 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 parameter 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 parameter, then Oracle Clusterware
deletes the named attribute.
-group group_name Specify a resource group to which the resource belongs. The
resource group must exist, and the resource cannot be a member
of any other explicit resource group. If you do not specify a
resource group, then CRSCTL adds the resource to a resource
group with the same name as the 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 namevalue
pairs, then you must separate each pair with a comma and
enclose the entire list in double quotation marks ("").
Usage Notes
• The resource_name parameter is required
• If an attribute value for an attribute name-value pair contains commas, then the
value must be enclosed in single quotation marks (''). For example:
"START_DEPENDENCIES='hard(res1,res2,res3)'"
• You must have read and write permissions on the specified resources to modify
them
• Do not use this command for any resources with names that begin with ora
because these resources are Oracle resources
Example
To modify the attributes of the appsvip resource:
$ crsctl modify resource appsvip -attr USR_ORA_VIP=10.1.220.17 -i
Related Topics:
• Oracle Clusterware Resource Reference
E.2.14 crsctl relocate resource
Relocates resources to another server in the cluster.
Appendix E
Dual Environment CRSCTL Commands
E-19
Syntax
crsctl relocate resource {resource_name [-k cid] | -all | -w "filter"} -s
source_server |
[-n destination_server] [-env "env1=val1,env2=val2,..."] [-i] [-f]
Parameters
Table E-12 crsctl relocate resource Command Parameters
Parameter Description
resource_name Specify the name of a resource you want to relocate.
-k cid Optionally, you can specify the resource cardinality ID. If you
specify this parameter, then CRSCTL relocates the resource
instance that has the cardinality you specify.
-all Alternatively, you can use this parameter to specify all resources
for relocation.
-w "filter" Alternative to using -k or -all, you can specify a resource filter that
CRSCTL 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
-s source_server Specify a particular server from which you want to relocate the
resources.
-n destination_server Specify the name of the server to which you want relocate
resources. If you do not specify a destination server, then CRSCTL
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 namevalue
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.
Appendix E
Dual Environment CRSCTL Commands
E-20
Table E-12 (Cont.) crsctl relocate resource Command Parameters
Parameter Description
–f Specify the -f parameter to force the relocation of the resource
when it has other resources running that depend on it. CRSCTL
stops or relocates dependent resources 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 CRSCTL uses to match
resources to relocate.
• If a resource has a degree ID greater than 1, then CRSCTL 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.
Examples
To relocate one particular resource from one server to another:
# crsctl relocate resource myResource1 -s node1 -n node3
E.2.15 crsctl restart resource
Restarts idle resources in the cluster, instead of having to run two commands to stop
and start the resource.
Syntax
crsctl restart resource {resource_name [...] | -w "filter"} [-k cid] [-d did]
[-env "env1=val1,env2=val2,..."] [-i] [-f]
Parameters
Table E-13 crsctl restart resource Command Parameters
Parameter Description
resource_name [...] Specify one or more space-delimited names of resources you want
to restart.
Appendix E
Dual Environment CRSCTL Commands
E-21
Table E-13 (Cont.) crsctl restart resource Command Parameters
Parameter Description
-w "filter" Specify a resource filter surrounded by double quotation marks ("")
that Oracle Clusterware uses to match resources. For example, -w
"TYPE = ora.database.type" or -w "NAME = cs1".
See Also: "Filters" for more information
-k cid Specify the resource cardinality ID. If you specify this parameter,
then Oracle Clusterware restarts 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 restarts all
resource instances that meet this criteria.
Note: You cannot use the -d parameter without specifying the -k
parameter.
-env
"env1=val1,env2=val2,.
.."
You can optionally override one or more resource profile attribute
values with the -env command parameter. 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 parameter to relocate a resource running on another
server on which the resource you want to restart has a hard start
dependency. If you do not specify the force parameter in this case,
then the start command fails.
Usage Notes
• Either of the following options is required to specify which resources you want to
restart:
– You can specify one or more resources by name to restart
– You can specify a resource filter that Oracle Clusterware uses to match
resources to restart
• You must have read and execute permissions on the specified resources to restart
them
• Do not use this command to restart any resources with names that begin with ora
because these resources are Oracle resources
E.2.16 crsctl setperm resource
Sets permissions for a particular resource.
Syntax
crsctl setperm resource resource_name {-u acl_string | -x acl_string |
-o user_name | -g group_name}
Appendix E
Dual Environment CRSCTL Commands
E-22
Parameters
Table E-14 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:
Oracle Clusterware Resource Reference for more information about resources
and resource attributes
Usage Notes
• Do not use this command for any resources with names that begin with ora
because these resources are Oracle resources.
• You must have read and write permissions on the specified resources to set their
permissions
Examples
To grant read, write, and execute permissions on a resource for user Scott:
$ crsctl setperm resource myResource -u user:scott:rwx
Appendix E
Dual Environment CRSCTL Commands
E-23
E.2.17 crsctl start resource
Starts idle resources on a particular server in the cluster.
Syntax
crsctl start resource {resource_name [...] | -w "filter" | -all}
[-n server_name | -s server_pool_names] [-k cid] [-d did]
[-env "env1=val1,env2=val2,..."] [-begin] [-end] [-i] [-f] [-l]
Parameters
Table E-15 crsctl start resource Command Parameters
Parameter Description
resource_name [...] Specify one or more space-delimited names of resources you want
to start.
-w "filter" Specify a resource filter surrounded by double quotation marks ("")
that Oracle Clusterware uses to match resources. For example, -w
"TYPE = ora.database.type" or -w "NAME = cs1".
See Also: "Filters" for more information
–all Use this parameter 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.
-s server_pool_names Specify a single server pool name or a space-delimited list of
server pools in which a resource resides that you want to start.
-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 parameter without specifying the -k
parameter.
-env
"env1=val1,env2=val2,.
.."
You can optionally override one or more resource profile attribute
values with the -env command parameter. 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
("").
-begin You can specify this parameter to begin a transparent HA action.
-end You can specify this parameter to end a transparent HA action.
–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.
Appendix E
Dual Environment CRSCTL Commands
E-24
Table E-15 (Cont.) crsctl start resource Command Parameters
Parameter Description
–f Use the -f parameter 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 parameter in this case,
then the start command fails.
–l Use the -l parameter to leave the resources in the state they were
in if the start command fails.
Usage Notes
• Any one of the three following options is required to specify which resources you
want to start:
– You can specify one or more resources to start
– You can specify a resource filter that Oracle Clusterware uses to match
resources to start
– You can specify the -all parameter to start all resources on the specified
server
• You must have read and execute permissions on the specified resources to start
them
• Do not use this command to start any resources with names that begin with ora
because these resources are Oracle resources
• Oracle does not support starting managed applications outside of the Oracle Grid
Infrastructure
Example
To start a resource:
# crsctl start resource myResource -n server1
E.2.18 crsctl status resource
Obtains the status and configuration information of any number of particular resources.
Syntax
crsctl status resource resource_name [...] | -w "filter" [-p | -v] | [-f | -l
| -g] [[-k cid | -n server_name] [ -e [-p | -v]] [-d did]] | [-s -k cid
[-d did]] [-p [-attr attribute_name[,...] [-noname]]
To print the status of the resources in tabular form:
crsctl status resource resource_name [...] | -w "filter" -t
To print a list of the resource dependencies:
crsctl status resource [resource_name [...]] -dependency [-stop | -pullup]
Appendix E
Dual Environment CRSCTL Commands
E-25
Parameters
Table E-16 crsctl status resource Command Parameters
Parameter Description
resource_name [...] |
-w "filter"
Specify one or more space-delimited names of resources of which
you want to check the status.
Optionally, you can specify a resource filter that CRSCTL 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
[-p | -v] | [-f | -l |
-g]
You can optionally specify the following parameters:
• Specify either the -p parameter to display the static
configuration of the resource or the -v parameter to display the
run-time configuration of the resource.
• 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] [ -e [-p
| -v]] [-d did | [-s -
k cid [-d did]]]
You can specify one of the following two options:
• 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.
Use the -e parameter to evaluate the special values of a
resource instance. You must also specify -p or -v with the -e
parameter.
• 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.
Appendix E
Dual Environment CRSCTL Commands
E-26
Table E-16 (Cont.) crsctl status resource Command Parameters
Parameter Description
-p [-attr
attribute_name[,...]
[-noname]
Specify -attr (followed by a single attribute name or a commadelimited
list of attribute names) or -noname following -p to either
print specific attributes or bypass the default printing of the
resource name, respectively.
-dependency [-stop | -
pullup]
Specify the -dependency parameter to display resource
dependencies. If you do not specify either the -stop or -pullup
option, then CRSCTL displays the start dependencies of the
resource.
Use either of the following options with the -dependency parameter:
• Specify the -stop parameter to display resource stop
dependencies.
• Specify the -pullup parameter to display resource pull up
dependencies.
Usage Notes
• Either a space-delimited list of resources or a resource filter is required.
• You must have read permissions on the specified resources to obtain their status.
• Use crsctl status resource to query the status information of any resource
deployed in the cluster. Oracle recommends, however, that you use the respective
SRCVTL command to query the status information of Oracle (ora.*) resources.
Examples
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
The following example shows the start dependencies for a resource named
ora.newdb.db:
$ crsctl status resource ora.newdb.db -dependency ora.newdb.db(ora.database.type)
ora.ACFS_DG1.dg(ora.diskgroup.type)[hard,pullup]
ora.asm(ora.asm.type)[hard,pullup]
ora.LISTENER.lsnr(ora.listener.type)[weak]
type:ora.cluster_vip_net1.type[hard:type,pullup:type]
ora.net1.network(ora.network.type)[hard,pullup]
ora.dbhome_dg.dbhome_dg_v.acfs(ora.acfs.type)[hard,pullup]
ora.asm(ora.asm.type)[pullup:always]
E.2.19 crsctl stop resource
Stops running resources.
Appendix E
Dual Environment CRSCTL Commands
E-27
Syntax
crsctl stop resource {resource_name [...] | -w "filter" | -all} [-n server_name
| -s server_pool] [-k cid] [-d did] [-env "env1=val1,env2=val2,..."]
[-begin | -end] [-i] [-f] [-l]
Parameters
Table E-17 crsctl stop resource Command Parameters
Parameter Description
resource_name [...] Alternative to using -w or -all, you can specify one or more spacedelimited
resource names that you want to stop.
-w "filter" Alternative to specifying a resource name or using -all, you can
specify a resource filter that CRSCTL 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
See Also: "Filters" for more information
-all Alternative to specifying a resource name or using -w, you can use
this parameter to stop all resources in the cluster.
-n server_name | -s
server_pool
Optionally, you can specify the name of the server on which the
resource instances you want to stop reside, or the name of a server
pool in which the resource instances you want to stop reside. If you
do not specify a server or server pool, then CRSCTL stops all
instances of the resource.
-k cid Optionally, you can specify the resource cardinality ID. If you
specify this parameter, then CRSCTL 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 CRSCTL stops all resource
instances that meet this criteria.
-env
"env1=val1,env2=val2,.
.."
You can optionally override one or more resource profile attribute
values with the -env command parameter. 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
("").
-begin | -end Optionally, you can specify either of these parameters to begin or
end a transparent HA action, respectively.
–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.
Appendix E
Dual Environment CRSCTL Commands
E-28
Table E-17 (Cont.) crsctl stop resource Command Parameters
Parameter Description
–f Specify the -f parameter 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 parameter.
–l Use the -l parameter to leave the resources in the state they were
in if the stop command fails.
Usage Notes
• Any one of the three following options is required to specify which resources you
want to stop:
– You can specify by name one or more resources to stop.
– You can specify a resource filter that CRSCTL uses to match resources to
stop
– You can specify the -all parameter to stop all resources on a particular server
• You must have read and execute permissions on the specified resources to stop
them
• Do not use this command for any resources with names that begin with ora
because these resources are Oracle resources
• Oracle does not support stopping managed applications outside of the Oracle Grid
Infrastructure
Example
To stop a resource:
$ crsctl stop resource -n node1 -k 2
E.2.20 crsctl add resourcegroup
Creates a resource group based on a resource group type.
Use this command to create an empty resource group into which you can add
resources.
Syntax
crsctl add resourcegroup group_name –type group_type
[[-file file_path] | [-attr "attribute_name=
attribute_value"]] [-f] [-i]
Parameters
Table E-18 crsctl add resourcegroup Command Parameters
Parameter Description
group_name Specify the name of the resource group.
–type group_type Specify a group type for the resource group.
Appendix E
Dual Environment CRSCTL Commands
E-29
Table E-18 (Cont.) crsctl add resourcegroup Command Parameters
Parameter Description
-file file_path | -
attr
"attribute_name=attrib
ute_value[,...]"
Provide either a file or a list of attributes that define the resource
group.
Path name (either absolute or relative) for a text file containing linedelimited
attribute name-value pairs that define the resource group.
Following the -attr flag, you can specify one or more commadelimited
attribute name-value pairs enclosed in double quotations
marks ("").
–f Use this parameter to add a resource group that is online.
–i If you specify -i, then CRSCTL 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.
E.2.21 crsctl check resourcegroup
Initiates a check operation on all member resources of the specified groups.
Syntax
crsctl check resourcegroup {group_name [...] | -w "filter"}
[-n server_name] [-k cid]
Parameters
Table E-19 crsctl check resourcegroup Command Parameters
Parameter Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to check.
-w "filter" Alternatively, you can specify a resource group filter surrounded by
double quotation marks ("") that Oracle Clusterware uses to match
resource groups. For example, -w "TYPE = ora.database.type"
or -w "NAME = cs1".
See Also: Filters for more information about using filters.
-n server_name Optionally, you can specify the name of the server on which the
resource group you want to check resides.
-k cid Optionally, you can specify the resource group cardinality ID. If you
specify this parameter, then Oracle Clusterware checks the
resource instances that have the cardinality you specify.
E.2.22 crsctl delete resourcegroup
Deletes one or more resource groups from Oracle Clusterware.
Syntax
crsctl delete resourcegroup {"group_name [...]" | -w "filter"} [-f] [-i]
Appendix E
Dual Environment CRSCTL Commands
E-30
Parameters
Table E-20 crsctl delete resourcegroup Command Parameters
Parameter Description
group_name Specify one or more group names that you want to delete. Multiple
groups must be space-delimited and enclosed in double quotation
marks ("").
-w "filter" Specify a resource filter that Oracle Clusterware uses to limit the
number of resources evaluated for deletion. 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
Note: All operators must be surrounded by spaces.
See Also: Filters for more information about operators
-f Use this parameter to delete a resource group that is online.
-i If you specify -i, then CRSCTL 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.
Usage Notes
• You must specify either a group name (or several group names) or a resource
filter.
• You can only delete a resource group if no other resource groups have
dependencies to it.
E.2.23 crsctl eval add resourcegroup
Predicts the effects of adding a resource group without making changes to the system.
Syntax
crsctl eval add resourcegroup group_name -type group_type [-file file_path
| -attr "attribute_name=attribute_value[,...]"] [-f]
Appendix E
Dual Environment CRSCTL Commands
E-31
Parameters
Table E-21 crsctl eval add resourcegroup Command Parameters
Parameter Description
group_name Specify the name of the resource group.
-type group_type Specify a group type for the resource group.
-file file_path | -
attr
"attribute_name=attrib
ute_value[,...]"
Provide either a file or a list of attributes that define the resource
group.
Path name (either absolute or relative) for a text file containing linedelimited
attribute name-value pairs that define the resource group.
Following the -attr flag, you can specify one or more commadelimited
attribute name-value pairs enclosed in double quotations
marks ("").
–f Use this parameter to add a resource group that is online.
E.2.24 crsctl eval fail resourcegroup
Predicts the consequences of a resource failing.
Syntax
crsctl eval fail resourcegroup {group_name | -w filter} [-n server]
[-env "attr=val[,...]"]
Parameters
Table E-22 crsctl eval fail resourcegroup Command Parameters
Parameter Description
group_name Specify the name of a resource group you want to evaluate.
-w filter Alternative you specifying a particular resource group, you can
specify a resource group filter surrounded by double quotation
marks ("") that CRSCTL uses to match resource groups. For
example, -w "TYPE = ora.database.type" or -w "NAME = cs1".
See Also: Filters for more information about filters
-n server Optionally, you can specify the name of the server to which
resource groups reside that you want to evaluate.
-env "attr=val[,...]" You can optionally override one or more resource group profile
attribute values with the -env command parameter. 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 ("").
E.2.25 crsctl eval relocate resourcegroup
Predicts the effect of relocating a resource group without making changes to the
system.
Appendix E
Dual Environment CRSCTL Commands
E-32
Syntax
crsctl eval relocate resourcegroup {group_name | -all} -s server | -w filter}
{-n server} [-f]
Parameters
Table E-23 crsctl eval relocate resourcegroup Command Parameters
Parameter Description
group_name Specify the name of a resource group that you want to evaluate.
-all Alternative to specifying a particular resource group, you can use
this parameter to evaluate relocating all resource groups.
-s server Specify the name of the source server on which the resource group
resides that you want to relocate. This parameter is required.
-w filter Alternative to specifying a particular resource group, you can
specify a resource group filter surrounded by double quotation
marks ("") that CRSCTL uses to match resource groups. For
example, -w "TYPE = ora.database.type" or -w "NAME = cs1".
This parameter is required if you do not use -s.
See Also: Filters for more information about filters
-n server Specify the name of the server to which you want to relocate the
resource groups. This parameter is required.
–f Use this parameter to evaluate the operation with the force option.
E.2.26 crsctl eval start resourcegroup
Predicts the effects of starting a resource group without making changes to the
system.
Syntax
crsctl eval start resourcegroup {group_name | -w filter} [-n server] [-f]
Parameters
Table E-24 crsctl eval start resourcegroup Command Parameters
Parameter Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to evaluate. This parameter is
required.
-w filter Alternatively, you can specify a resource group filter surrounded by
double quotation marks ("") that CRSCTL uses to match resource
groups. For example, -w "TYPE = ora.database.type" or -w
"NAME = cs1". This parameter is required if you do not specify a
particular resource group.
See Also: Filters for more information about filters
-n server Specify the name of the server on which the resource group you
want to evaluate resides.
Appendix E
Dual Environment CRSCTL Commands
E-33
Table E-24 (Cont.) crsctl eval start resourcegroup Command Parameters
Parameter Description
–f Use the -f parameter to evaluate a resource group on a server on
which one of the resources in the resource group you want to start
has a hard start dependency.
E.2.27 crsctl eval stop resourcegroup
Predicts the effect of stopping a resource group without making changes to the
system.
Syntax
crsctl eval stop resourcegroup {group_name | -w filter} [-f]
Parameters
Table E-25 crsctl eval stop resourcegroup Command Parameters
Parameter Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to stop.
-w "filter" Alternative to specifying a resource group, you can specify a
resource group filter surrounded by double quotation marks ("")
that CRSCTL uses to match resource groups. For example, -w
"TYPE = ora.database.type" or -w "NAME = cs1".
See Also: Filters for more information about using filters.
–f Use the -f parameter to stop a resource running on another server
on which one of the resources in the resource group you want to
stop has a hard stop dependency.
E.2.28 crsctl export resourcegroup
Exports the complete information and attributes of a resource groups and its member
resources to a script file.
This command also exports configuration information of the resource group type and
member resource types. You can run the script file on another cluster to import the
resource group configuration.
Syntax
crsctl export resourcegroup [group_name [...]] –file file_name
Appendix E
Dual Environment CRSCTL Commands
E-34
Parameters
Table E-26 crsctl export resource Command Parameters
Parameter Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to export.
–file file_name Specify a name for the output script file that you will run to import
the group.
E.2.29 crsctl modify resourcegroup
Modifies a resource group to add attributes or update the values of existing attributes.
Syntax
crsctl modify resourcegroup group_name -attr "attribute_name=
attribute_value"} [-i] [-f] [-delete]
Parameters
Table E-27 crsctl modify resourcegroup Command Parameters
Parameter Description
group_name Specify the name of the resource group you want to modify.
Appendix E
Dual Environment CRSCTL Commands
E-35
Table E-27 (Cont.) crsctl modify resourcegroup Command Parameters
Parameter Description
-attr "attribute_name=
attribute_value"
You can specify attributes for a resource group you want to modify
in two different ways:
• Following the -attr flag, you can specify one or more commadelimited
attribute name-value pairs to modify enclosed in
double quotations marks (""). For example:
-attr "CHECK_INTERVAL=30, START_TIMEOUT=25"
Some attributes can have multiple values. In those cases,
separate the values with a space and enclose the list of values
in single quotation marks. For example:
-attr "SERVER_POOL_NAMES=
'ora.pool1 ora.pool2',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 CRSCTL returns an error if processing this
command requires waiting for Oracle Clusterware to unlock the
resource group or its dependents. Sometimes, Oracle Clusterware
locks resource groups or other objects to prevent commands from
interfering with each other.
–f Use the -f parameter when:
• The resource group has a hard dependency on a non-existing
resource.
• The owner of the resource group 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.
Appendix E
Dual Environment CRSCTL Commands
E-36
Table E-27 (Cont.) crsctl modify resourcegroup Command Parameters
Parameter Description
–delete If you specify the -delete parameter, then Oracle Clusterware
deletes the named attribute.
Usage Notes
You can modify the name of the resource group and add or change existing attributes.
E.2.30 crsctl relocate resourcegroup
Relocates online resource groups from a source server to a target server.
This command first stops the resource groups you specify on the source server and
then starts them on the target server.
Syntax
crsctl relocate resourcegroup {group_name [...] [-k cid] | -all | -w "filter"}
[-env "attr=val[,...]"] [-f] [-i]
Parameters
Table E-28 crsctl relocate resourcegroup Command Parameters
Parameter Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to relocate.
-k cid Optionally, you can specify the resource group cardinality ID. If you
specify this parameter, then CRSCTL relocates the resource
instances that have the cardinality you specify.
-all Specify this parameter to relocate all resource groups on the
source server.
-w "filter" Specify a resource group filter surrounded by double quotation
marks ("") that CRSCTL uses to match resource groups. For
example, -w "TYPE = ora.database.type" or -w "NAME = cs1".
See Also: Filters for more information about filters
-s source_server_name Specify the name of the source server on which the resource
groups reside that you want to relocate. This parameter is required.
-n target_server_name Optionally, you can specify the name of the server to which you
want to relocate the resource groups. If you do not specify a target
server, then CRSCTL relocates the resource groups on the best
server according to the attribute profile of each resource group.
-env "attr=val[,...]" You can optionally override one or more resource group profile
attribute values with the -env command parameter. 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 ("").
–f Specify this option force the relocation of the resource groups you
specify.
Appendix E
Dual Environment CRSCTL Commands
E-37
Table E-28 (Cont.) crsctl relocate resourcegroup Command Parameters
Parameter Description
–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.
Example
To relocate all resource groups running on node1 to node2:
$ crsctl relocate resourcegroup resGrp1 -s node1 -n node2
E.2.31 crsctl restart resourcegroup
Restarts resource groups on the server where they currently reside.
Syntax
crsctl restart resourcegroup {group_name [...] | -w "filter"} [-k cid]
[-env "env1=val1,env2=val2,..."] [-f] [-i]
Parameters
Table E-29 crsctl restart resourcegroup Command Parameters
Parameters Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to restart.
-w "filter" Specify a resource group filter surrounded by double quotation
marks ("") that Oracle Clusterware uses to match resource groups.
For example, -w "TYPE = ora.database.type" or -w "NAME =
cs1".
See Also: Filters for more information about filters
-k cid Specify the resource group cardinality ID. If you specify this
parameter, then Oracle Clusterware restarts the resource instances
that have the cardinality you specify.
-env
"env1=val1,env2=val2,.
.."
You can optionally override one or more resource group profile
attribute values with the -env command parameter. 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 ("").
–f Use the -f parameter to restart a resource, running on the server
on which the resource group resides that you want to restart, that
has a hard start dependency on another resource. If you do not
specify the force parameter in this case, then the start command
fails.
Appendix E
Dual Environment CRSCTL Commands
E-38
Table E-29 (Cont.) crsctl restart resourcegroup Command Parameters
Parameters Description
–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.
Example
The following command restarts resource group resGrp1:
$ crsctl restart resourcegroup resGrp1
E.2.32 crsctl start resourcegroup
Starts one or more resource groups on specific or preconfigured servers or server
pools.
CRSCTL starts resource groups to which there is a hard or weak start dependency,
and all enabled member resources of the group. This command reports progress
messages for each resource and resource group that CRSCTL starts.
Syntax
crsctl start resourcegroup {group_name [...] | -w "filter"] | -all}
[-n server_name | -s server_pool] [-k cid] [-env "attr=val[,..."]]
[-f] [-i] [-l]
Parameters
Table E-30 crsctl start resourcegroup Command Parameters
Parameter Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to start.
-w "filter" Specify a resource group filter surrounded by double quotation
marks ("") that CRSCTL uses to match resource groups. For
example, -w "TYPE = ora.database.type" or -w "NAME = cs1".
See Also: Filters for more information about filters
-all Specify this parameter to start all resource groups on the cluster.
-n server_name Specify the name of the server on which the resource group you
want to start resides. If you do not specify a server, then CRSCTL
starts the resources on the best server according to the attribute
profile of each resource.
-s server_pool Specify a single server pool name or a space-delimited list of
server pools in which a resource group resides that you want to
start.
-k cid Specify the resource group cardinality ID. If you specify this
parameter, then CRSCTL starts the resource instances that have
the cardinality you specify.
Appendix E
Dual Environment CRSCTL Commands
E-39
Table E-30 (Cont.) crsctl start resourcegroup Command Parameters
Parameter Description
-env "attr=val[,...]" You can optionally override one or more resource group profile
attribute values with the -env command parameter. 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 ("").
–f Use the -f parameter to start a resource group on a server on
which one of the resources in the resource group you want to start
has a hard start dependency. If you do not specify the force
parameter in this case, then the start command fails.
–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.
–l Use the -l parameter to leave the resource groups in the state they
were in if the start command fails.
Examples
To start a resource group in a server pool:
$ crsctl start resourcegroup rg1 -s pool1
E.2.33 crsctl status resourcegroup
Displays the state of resource groups.
Syntax
crsctl status resourcegroup [group_name [...] | -w "filter"]
[-p [-attr "attribute_name=attribute_value" [-noname]] | -v [-attr
"attribute_name=attribute_value"] [-noname]]] | [-f] [-l] [-g] | [[-k cid |
-n server_name] [-e [-p | -v]]] [-s -k cid] | -noauto]]
Parameters
Table E-31 crsctl status resourcegroup Command Parameters
Parameter Description
group_name Specify a resource group or a number of resource groups in a
space-delimited list that you want to query. If you do not specify a
resource group name or filters, then CRSCTL displays the status
for all resource groups.
-w "filter" Specify a resource group filter surrounded by double quotation
marks ("") that Oracle Clusterware uses to match resource groups.
For example, -w "TYPE = ora.database.type" or -w "NAME =
cs1".
See Also: Filters for more information about filters
Appendix E
Dual Environment CRSCTL Commands
E-40
Table E-31 (Cont.) crsctl status resourcegroup Command Parameters
Parameter Description
-p -attr
"attribute_name=attrib
ute_value" [-noname]
-v [-attr
"attribute_name=attrib
ute_value"] [-noname]]
Optionally, you can specify this parameter to display the status for
all member resources of a particular resource group.
–f Optionally, you can specify this parameter to display the full
configuration of the resource group.
-l
-g
-k cid Specify the resource group cardinality ID. If you specify this
parameter, then CRSCTL displays the status of the resource
groups that have the cardinality you specify.
-n server_name
–e Optionally, you can specify this parameter to exclude automatic
resource groups. The default is to display the status of all resource
groups.
-p | -v
-s -k cid
-noauto
Example
The following command shows the status of resource group rg1, which resides on
node1:
$ crsctl status resourcegroup rg1 -n node1
E.2.34 crsctl stop resourcegroup
Stops one or more resource groups on optionally specified preconfigured servers or
server pools.
CRSCTL stops all member resources of the resource group. You must use the -f to
stop the resource group if other resource groups have stop dependencies on it.
Syntax
crsctl stop resourcegroup {group_name [...] | -w "filter"] | -all}
[-n server_name | -s server_pool] [-k cid] [-env "attr=val[,...]"]
[-f] [-i] [-l]
Appendix E
Dual Environment CRSCTL Commands
E-41
Parameters
Table

 

Oracle Clusterware Control (CRSCTL)

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwadd/clusterware-administration-and-deployment-guide.pdf

 

Next

Managing Oracle ASM With ASMCA Command Line Tool

To start ASMCA, enter asmca at a command prompt inside the Oracle Grid Infrastructure home. For example:

$ asmca

The GUI tool displays and attempts to connect to the Oracle ASM instance identified with the Oracle system identifier (SID) set to +ASM.

  • If ASMCA detects an Oracle ASM instance that is not running, then ASMCA prompts whether you want to start the instance.
  • If ASMCA detects an Oracle ASM instance from a previous release, then ASMCA prompts whether you want to upgrade the instance. Oracle recommends that you respond No this prompt.An Oracle ASM instance should be upgraded with Oracle Universal Installer (OUI). OUI automatically defaults to upgrade mode when it detects an Oracle ASM instance at a previous release level.To continue the upgrade process with ASMCA, see "Upgrading an Oracle ASM Instance with ASMCA". If you need help with upgrading an Oracle ASM instance, contact Oracle Support Services.

The Instances tab functionality and some menu options of ASMCA are only available in an Oracle RAC configuration.

Creating Oracle ASM Instances with ASMCA

Oracle ASM Configuration Assistant enables you to create an Oracle ASM instance if an Oracle ASM instance is not found on the host, as shown in Figure 9-1.

On the Create ASM page, you enter the SYS password for the administrator of the Oracle ASM instance and the password for the ASMSNMP user that can monitor this Oracle ASM instance. ASMSNMP is a less privileged user that is primarily used to monitor Oracle ASM instances.

See Also:

  • Oracle Grid Infrastructure Installation Guide for information about installing Oracle ASM
  • Oracle Database Installation Guide for information about reviewing database accounts and passwords

You can select the listener with which to register this Oracle ASM instance. Click ASM Parameters to update the initialization parameters for the Oracle ASM instance.

Figure 9-1 Oracle ASM Configuration Assistant Create ASM Page

https://docs.oracle.com/database/121/OSTMG/GUID-4A1F8835-47C8-4A25-9D34-3FF3D2B409A1.htm#OSTMG51000

Upgrading an Oracle ASM Instance with ASMCA

Oracle ASM Configuration Assistant also enables you to upgrade an existing Oracle ASM instance to the current software level. However, the recommended practice is to upgrade an Oracle ASM instance with Oracle Universal Installer (OUI). OUI automatically defaults to upgrade mode when it detects an Oracle ASM instance at a previous release level.

If Oracle Clusterware has been upgraded, then there is no need to upgrade the Oracle ASM instance in that Oracle Grid Infrastructure home. Oracle ASM is usually upgraded as part of the Oracle Clusterware upgrade.

See Also:

  • Oracle Grid Infrastructure Installation Guide for information about installing and upgrading Oracle Grid Infrastructure
  • Articles at My Oracle Support (https://support.oracle.com) for information about upgrading Oracle ASM

Note:

The procedure described in this section upgrades the Oracle ASM instance only. Oracle Database, and Oracle Enterprise Manager, will not have the latest features. To upgrade Oracle Database, see Oracle Database Upgrade Guide.

Figure 9-3 Oracle ASM Configuration Assistant Upgrade ASM Page

Complete Course

  1. Home
  2. Course
  3. Grid Infrastructure 12c2 With Oracle Restart
Kudrant.com