Brief introduction
Oracle Real Application Cluster (RAC) is a well-known product in Oracle Solutions for maintaining high availability of business data. Oracle RAC allows sharing of load across all cluster nodes, using N-1 Fault tolerant configuration to address node failures, where N is the total number of nodes. Oracle RAC is continuously improving every version, and this is no exception. The new 12.1.0.1 edition contains the Flex ASM and flex cluster two properties to support the demanding needs of a cloud-oriented environment.
Oracle RAC 12c introduces two new concepts:
Center node: as in previous versions, they are connected to each other through a private network and have direct access to shared storage. These nodes have direct access to the Oracle cluster Registry (OCR) and voting disks (VD).
leaf node: These nodes are light nodes that are not interconnected and do not have access to shared storage like a central node. Each leaf node communicates with the connected central node and connects to the cluster through the connected central node.
This topology allows loosely coupled application servers to form a cluster with tightly coupled database servers. Tightly coupled servers are central servers that share the storage of databases, OCR, and voting devices with other hub servers in the cluster and peer-to-peer communication. Loosely coupled servers are leaf servers that form a loosely communicated association with a single hub server in the cluster, do not need to share storage with other hub servers or leaf servers in the cluster, and do not require peer-to-peer communication with only the associated hub servers. In 12.1.0.1, leaf servers are designed to improve the high availability of applications and to achieve multi-tiered resource management.
Prior to Oracle 12c, for a DB instance to use ASM, the ASM instance on all nodes must already be running to start the DB instance. If the ASM instance is not running, it means that the DB instance using ASM at the storage level cannot be started. This actually means that the database instance cannot be accessed regardless of the technology (RAC, ASM, and shared storage) that is used.
With the introduction of Oracle 12c, a feature called Oracle Flex ASM relieves the above limitation, and one of its main features is failover to other nodes in the cluster. Essentially a central and leaf architecture, Oracle clusterware seamlessly transfers the failed node's connection to another member node through an alternative ASM instance. The number of ASM instances running in a given cluster is called the ASM cardinality, and the default value is 3. However, this cardinality value can be modified using the Clusterware command.
Oracle Flex Cluster
Architecturally, the Oracle Flex cluster includes a central and leaf architecture, where only the central node has direct access to the Oracle cluster Registry (OCR) and voting disk (VD). However, the application can access the database through the leaf node without having to run the ASM instance on the leaf node. Connecting to a database through a central node makes it transparent to the application.
Figure 1: Depicts a typical Oracle Flex cluster with 4 leaf nodes and 2 hub nodes. Simply put, the Oracle Flex cluster requires Oracle Flex ASM.
Implementation aspects of Oracle Flex ASM
Oracle Flex ASM can be implemented in two ways:
Oracle RAC 12c with Oracle Flex ASM
Standard Oracle Flex ASM configuration:
ASM instance failures on the Oracle Flex ASM configuration:
1. Log in to the RAC DB instance 1 (RAC1)
[Email protected] desktop]$ Hostnameoel6-112-rac1.localdomain
2. Check the status of the ASM instance and the RAC DB instance
[Email protected] desktop]$ Ps-ef | grep pmonoracle 3325 1 0 17:39? 00:00:00 asm_pmon_+asm1oracle 3813 1 0 17:40? 00:00:00 mdb_pmon_-mgmtdboracle 5806 1 0 17:42? 00:00:00 ora_pmon_orcl1oracle 6193 1 0 17:42?
3. Check the status of the ASM instance in the RAC db instance from instance 1 (RAC1)
4. Check the cluster status in instance 1 (RAC1)
[Email protected] desktop]$ crsctl check clustercrs-4537:cluster ready Services is Onlinecrs-4529:cluster Synchronizati On Services are onlinecrs-4533:event Manager is online
5. Commands to check whether Oracle Flex ASM is enabled (RAC1)
[Email protected] desktop]$ asmcmdasmcmd> showclustermode ASM cluster:flex mode enabledasmcmd> Showclusterstaten Ormal
6. Commands for changing the ASM cardinality (RAC1)
[Email protected] desktop]$ srvctl status asm-detailasm is running on OEL6-112-RAC2,OEL6-112-RAC1ASM is enabled. [[email protected] desktop]$ srvctl config asm-detailasm home:/u01/app/12.1.0/gridpassword file: +data/orapwasmasm list ENER:LISTENERASM is enabled. ASM Instance Count:3cluster ASM listener:asmnet1lsnr_asm
7. Commands to check whether Oracle Flex ASM is enabled (RAC2)
[Email protected] desktop]$ asmcmdasmcmd> showclustermodeasm cluster:flex mode enabledasmcmd> Showclusterstatenormalasmcmd> exit
8. How to change the ASM cardinality (RAC2)
[[email protected] desktop]$ srvctl config asm-detailasm home:/u01/app/12.1.0/gridpassword file: +data/ Orapwasmasm listener:listenerasm is enabled. ASM Instance Count:3cluster ASM listener:asmnet1lsnr_asm
9. Close the ASM instance in RAC DB instance 1 (RAC1)
[[email protected] desktop]$ srvctl stop Asm-node oel6-112-rac1-stopoption abort-force
10. Check the status of the ASM instance in RAC DB instance 1 (RAC1)
[Email protected] desktop]$ srvctl status asmprcr-1070:failed to check if resource ora.asm is Registeredcannot communic Ate with CRSD
11. Check the status of the Cluster service in RAC DB instance 1 (RAC1)
12. Check the status of ASM and RAC databases in instance 1 (RAC1)
[Email protected] desktop]$ Ps-ef | grep pmonoracle 3813 1 0 17:40? 00:00:00 mdb_pmon_-mgmtdboracle 5806 1 0 17:42? 00:00:00 ora_pmon_orcl1oracle 6193 1 0 17:42? 00:00:00 apx_pmon_+apx1
Note: here, the DB instance is associated with a specific ASM instance running in a specific node. If, for some reason, the ASM instance fails to start/service shutdown, the DB instance can still be started because the DB instance will look for an ASM instance running in the same cluster. Figure 3 depicts the highly available features of Flex ASM.
13. Check the status of a running RAC DB instance that does not have an ASM instance in RAC DB Instance 1 (RAC1)
[Email protected] desktop]$. Oraenvoracle_sid = [ORCL1]? Orcl1oracle_home = [/home/oracle]? /u01/app/oracle/product/12.1.0/db_1the Oracle base remains unchanged with value/u01/app/oracle
14. Log on to a DB instance from a RAC DB instance 1 (RAC1)
[Email protected] desktop]$ sqlplus/nologsql*plus:release 12.1.0.1.0 Production on Wed Sep 18:24:36 2013Copyright (c ) 1982, Oracle. All rights reserved. Sql> connect Sys/[email protected] as sysdbaconnected.sql> select Instance_name,instance_number from Gv$instance ; instance_name instance_number-------------------------------------------Orcl2 2orcl1 1sql> Select Instance_name,instance_number from V$instance;instance_name instance_ Number-------------------------------------------Orcl2 2sql> connect sys/[email protected] As Sysdbaconnected.sql> Select Instance_name,instance_number from Gv$instance;instance_name INSTANCE_ Number-------------------------------------------ORCL1 1
15. An ASM instance connected to a RAC DB Instance 2 (RAC2) from a RAC DB instance 1 (RAC1)
[Email protected] desktop]$. Oraenvoracle_sid = [ORCL1]? +asm2oracle_home = [/home/oracle]? /u01/app/12.1.0/gridthe Oracle base remains unchanged with Value/u01/app/oracle[[email protected] desktop]$ asmcmd--PRI Vilege sysasm--inst +asm2asmcmd> lsdgstate Type rebal Sector Block AU total_mb FREE_MB req_mir_free_mb usable_file_mb offline_disks voting_files namemounted EXTERN N 4096 1048576 15342 4782 0 4782 0 Y
Summary: The DB instance uses a dedicated ASM instance, and we force the ASM instance to stop working to simulate the failure, so the DB instance is reconnected to an existing ASM instance on another node (in this case, Node 2 (RAC2)).
Oracle Database 11.2 or earlier versions
As described in the previous introduction to Oracle 12c, ASM's association with a DB instance is inherently specific. This means that if an ASM instance fails to start, the associated DB instance in the node/asm cannot be started, causing the database to be inaccessible.
1. Log in to the RAC DB instance 1 (RAC1)
Login As:oracle[email protected] ' s password:last login:fri Sep 27 06:05:44 2013
2. Check the status of the ASM instance and the RAC db instance:
[Email protected] ~]$ Ps-ef | grep pmonoracle 3053 1 0 05:56? 00:00:00 asm_pmon_+asm1oracle 3849 1 0 05:57? 00:00:00 ora_pmon_flavia1
3. Check the status of the ASM instance in RAC DB instance 1 (RAC1)
[Email protected] ~]$ srvctl status asmasm is running on RAC2,RAC1
4. Check the status of the cluster in RAC DB instance 1 (RAC1)
[Email protected] ~]$ crsctl check clustercrs-4537:cluster ready Services is Onlinecrs-4529:cluster synchronization Ser Vices is Onlinecrs-4533:event Manager is online
5. Stop the ASM instance in RAC DB instance 1 (RAC1)
[[email protected] ~]$ srvctl stop asm-n rac1-o abort-f
6. Check the status of the ASM instance in RAC DB instance 1 (RAC1)
[Email protected] ~]$ srvctl status asmasm is running on RAC2
7. Check the status of the ASM instance and the RAC db instance (RAC1)
[Email protected] ~]$ Ps-ef | grep pmonoracle 7885 5795 0 06:20 pts/0 00:00:00 grep pmon
Summary: a database instance is strongly associated with an ASM instance. If the ASM instance fails, the DB instance on the same node also fails.
Why use Oracle Flex ASM
Oracle Flex ASM supports Oracle Database 12c clients with a larger LUN size.
The maximum number of disk groups supported is 511.
You have the flexibility to rename ASM disks in a disk group.
Patch level validation for ASM instances
Copy physical metadata
Network enhancements in Oracle Flex ASM
In earlier versions, the cluster required:
Flex ASM Adds an ASM network that can be used to communicate between ASM and its clients in order to isolate and divert ASM traffic.
Deploy Flex ASM
The following is the screen of the Flex ASM installer.
Gain insight into Oracle Flex ASM and its benefits