Saturday, July 11, 2009


Oracle Real Application Clusters is a resource-sharing system that increases availability and performance by distributing the workload across multiple nodes.


Oracle Real Application Clusters allows database files to be accessed from multiple instances running on different nodes of a cluster. These nodes are connected to each other by a high speed interconnect.

Each machine or node performs database processing, and all nodes share access to the same database.


This configuration can be used on systems that share resources such as disks, and that have very fast communication between machines or nodes.Failure of one node does not make data inaccessible for all users; the system ensures continued data availability.

=====================================
Let's begin with a brief overview of RAC architecture.
A cluster is a set of 2 or more machines (nodes) that share or coordinate resources to perform the same task.
A RAC database is 2 or more instances running on a set of clustered nodes, with all instances accessing a shared set of database files.
Depending on the O/S platform, a RAC database may be deployed on a cluster that uses vendor clusterware plus Oracle's own clusterware (Cluster Ready Services), or on a cluster that solely uses Oracle's own clusterware.

Thus, every RAC sits on a cluster that is running Cluster Ready Services. srvctl is the primary tool DBAs use to configure CRS for their RAC database and processes.
Cluster Ready Services, or CRS, is a new feature for 10g RAC. Essentially, it is Oracle's own clusterware. On most platforms, Oracle supports vendor clusterware; in these cases, CRS interoperates with the vendor clusterware, providing high availability support and service and workload management.
On Linux and Windows clusters, CRS serves as the sole clusterware. In all cases, CRS provides a standard cluster interface that is consistent across all platforms.
CRS consists of four processes (crsd, occsd, evmd, and evmlogger) and two disks: the Oracle Cluster Registry (OCR), and the voting disk.
CRS manages the following resources:
The ASM instances on each node
Databases
The instances on each node
Oracle Services on each node

The cluster nodes themselves, including the following processes, or "nodeapps":
VIP
GSD
The listener
The ONS daemon

CRS stores information about these resources in the OCR. If the information in the OCR for one of these resources becomes damaged or inconsistent, then CRS is no longer able to manage that resource. Fortunately, the OCR automatically backs itself up regularly and frequently.
Interacting with CRS and the OCR:
srvctl is the tool Oracle recommends that DBAs use to interact with CRS and the cluster registry. Oracle does provide several tools to interface with the cluster registry and CRS more directly, at a lower level, but these tools are deliberately undocumented and intended only for use by Oracle Support. srvctl, in contrast, is well documented and easy to use. Using other tools to modify the OCR or manage CRS without the assistance of Oracle Support runs the risk of damaging the OCR.

2) Important Components in RAC
a)Node
b)Interconnect
c)Shared Storage
d)Clusterware


3) Interconnect


The interconnect links the nodes together, RAC needs a high speed interconnect network for cluster communication and cache fusion. The interconnect must be low latency.Some of the interconnect used in RAC are, Gigabit Ethernet, High Speed Switch, Memory Channels or Infiniband (IB).


4) Shared Disk Storage.


RAC requires shared disk access to the following files

controlfiles, datafiles, redolog files, tempfile, undofile, OCR and Voting disk etc.


To be able to read/write by all members in a cluster at the same time a shared disk storage system must be used. Available options in this case are:


Raw volumes: These are directly attached raw devices that require storage that operates in block mode such as fiber channel or iSCSI.


NFS attached storage: Network file storage can be used in a supported configuration to provide a shared repository for all RAC database files, preferably through a high-speed private network. For example, Netapp Filer offers CFS functionality via NFS to the server machines. These file systems are mounted by using special mount options.Cluster File System: One or more cluster file systems can be used to hold all RAC files. Cluster file systems require block mode storage such as fiber channel or iSCSI. It can not be used on top of NAS (NFS), (some options: AIX GPFS, RedHat GFS,OCFS2,Veritas Storage Solution)


Automatic Storage Management (ASM): is a portable, dedicated, and optimized storage for Oracle database files.


Storage Area Network (SAN): is a shared dedicated high-speed network connectingstorage elements and the backend of the servers.


5) Clusterware


To make sure Real Application Cluster can work properly on the nodes as a single database, Clusterware must be installed. Before Oracle 10g vendor Clusterware was needed except for windows and Linux. With the introduction of Oracle 10g, oracle introduce Oracle Clusterware it offers a complete, integrated Clusterware management solution on all platforms Oracle Database 10g runs on.

This clusterware functionality includes mechanisms for cluster connectivity, messaging and locking, cluster control and recovery, and a services provisioning framework. No 3rd party clusterware management software need be purchased. But if wanted it can still be used, but still Oracle Clusterware needs to be installed.

6)RAC Software Principles for Oracle 10g
A few additional background processes associated with a RAC instance that are not there for a single-instance database. These processes are primarily used to maintain database coherency among each instance. They manage what is called the global resources:LMON: Global Enqueue Service MonitorLMD0: Global Enqueue Service DaemonLMSx: Global Cache Service Processes, where x can range from 0 to 10LCK0: Lock processDIAG: Diagnosibility processAt the cluster level, you find the main processes of the Clusterware software. They provide a standard cluster interface on all platforms and perform high-availability operations. You find these processes on each node of the cluster: