Oracle recommends Oracle Automatic Storage Management (Oracle ASM) as a Storage in Oracle RAC 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.
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).
Overview of Storage Management for Oracle RAC
All data files (including an undo tablespace for each instance) and redo log files (at least two for each instance) for an Oracle RAC database must reside on shared storage.
Oracle recommends that you use Oracle ASM to store these files in an Oracle ASM disk group.
Oracle supports alternative ways of using shared storage, such as certified cluster file systems. In addition, Oracle recommends that you use one shared server parameter file (SPFILE) with instance-specific entries. Oracle RAC 12c allows storing shared password files in Oracle ASM and storing Oracle Database files on Oracle Automatic Storage Management Cluster File System (Oracle ACFS).
Unless otherwise noted, Oracle Database storage features such as Oracle ASM, Oracle Managed Files, automatic segment-space management, and so on, function the same in Oracle RAC environments as they do in non-cluster Oracle database environments.
Redo Log File Storage in Oracle RAC
In an Oracle RAC database, each instance must have at least two groups of redo log files. You must allocate the redo log groups before enabling a new instance with the
ALTER DATABASE ENABLE INSTANCE instance_name command. When you use DBCA to create the database, DBCA allocates redo log files to instances, as required, automatically. You can change the number of redo log groups and the size of the redo log files as required either during the initial database creation or as a post-creation step.
During database recovery, all enabled instances are checked to see if recovery is needed. If you remove an instance from your Oracle RAC database, then you should disable the instance’s thread of redo so that Oracle does not have to check the thread during database recovery.
Automatic Undo Management in Oracle RAC
Oracle Database automatically manages undo segments within a specific undo tablespace that is assigned to an instance. Instances can always read all undo blocks throughout the cluster environment for consistent read purposes. Also, any instance can update any undo tablespace during transaction recovery, if that undo tablespace is not currently used by another instance for undo generation or transaction recovery.
You assign undo tablespaces in your Oracle RAC administrator-managed database by specifying a different value for the
UNDO_TABLESPACE parameter for each instance in your SPFILE or individual PFILEs. For policy-managed databases, Oracle automatically allocates the undo tablespace when the instance starts if you have Oracle Managed Files enabled. You cannot simultaneously use automatic undo management and manual undo management in an Oracle RAC database. In other words, all instances of an Oracle RAC database must operate in the same undo mode.
Automatic Storage Management with Oracle RAC
Oracle ASM automatically maximizes I/O performance by managing the storage configuration across the disks that Oracle ASM manages.
Oracle ASM does this by evenly distributing the database files across all of the available storage assigned to the disk groups within Oracle ASM. Oracle ASM allocates your total disk space requirements into uniformly sized units across all disks in a disk group. Oracle ASM can also automatically mirror files to prevent data loss. Because of these features, Oracle ASM also significantly reduces your administrative overhead.
Oracle ASM instances are created on each node where you install Oracle Clusterware. Each Oracle ASM instance has either an SPFILE or PFILE type parameter file. Oracle recommends that you back up the parameter files and the TNS entries for nondefault Oracle Net listeners.
To use Oracle ASM with Oracle RAC, select Oracle ASM as your storage option when you create your database with the Database Configuration Assistant (DBCA). As in noncluster Oracle databases, using Oracle ASM with Oracle RAC does not require I/O tuning.
Storage Management in Oracle RAC
You can create Oracle ASM disk groups and configure mirroring for Oracle ASM disk groups using the Oracle ASM configuration assistant (ASMCA).
Alternatively, you can use Oracle Enterprise Manager to administer Oracle ASM disk groups after you have discovered the respective servers with Oracle Enterprise Manager.
The Oracle tools that you use to manage Oracle ASM, including ASMCA, Oracle Enterprise Manager, and the silent mode install and upgrade commands, include options to manage Oracle ASM instances and disk groups.
You can use the Cluster Verification Utility (CVU) to verify the integrity of Oracle ASM across the cluster. Typically, this check ensures that the Oracle ASM instances on all nodes run from the same Oracle home and, if
asmlib exists, that it is a valid version and has valid ownership. Run the following command to perform this check:
cluvfy comp asm [-n node_list] [-verbose]
node_list with a comma-delimited list of node names on which the check is to be performed. Specify
all to check all nodes in the cluster.
cluvfy comp ssa command to locate shared storage.
Modifying Disk Group Configurations for Oracle ASM
When you create a disk group for a cluster or add new disks to an existing clustered disk group, prepare the underlying physical storage on shared disks and give the Oracle user permission to read and write to the disk.
The shared disk requirement is the only substantial difference between using Oracle ASM with an Oracle RAC database.
In a cluster, each Oracle ASM instance manages its node’s metadata updates to the disk groups. In addition, each Oracle ASM instance coordinates disk group metadata with other nodes in the cluster. As with noncluster Oracle databases, you can use Oracle Enterprise Manager, ASMCA, SQL*Plus, and the Server Control Utility (SRVCTL) to administer disk groups for Oracle ASM that are used by Oracle RAC.
Administering Oracle ASM Instances with SRVCTL in Oracle RAC
You can use the Server Control Utility (SRVCTL) to add or remove an Oracle ASM instance.
To issue SRVCTL commands to manage Oracle ASM, log in as the operating system user that owns the Oracle Grid Infrastructure home and issue the SRVCTL commands from the bin directory of the Oracle Grid Infrastructure home.
Use the following syntax to add an Oracle ASM instance:
srvctl add asm
Use the following syntax to remove an Oracle ASM instance:
srvctl remove asm [-force]
You can also use SRVCTL to start, stop, and obtain the status of an Oracle ASM instance as in the following examples.
Use the following syntax to start an Oracle ASM instance:
srvctl start asm [-node node_name] [-startoption start_options]
Use the following syntax to stop an Oracle ASM instance:
srvctl stop asm [-node node_name] [-stopoption stop_options]
Use the following syntax to show the configuration of an Oracle ASM instance:
srvctl config asm -node node_name
Use the following syntax to display the state of an Oracle ASM instance:
srvctl status asm [-node node_name]