Rac


Clusterware background processes and components

HOW DOES 11G R2 CLUSTERWARE START ASM WHEN ASM SPFILE IS STORED ON ASM ITSELF

Split brain condition and Node eviction

Steps Need to be followed for RAC installation

OCR

GPNP profile

RAC interview questions

Clusterware background processes and components :

Cluster Ready Services (CRS)
1)It is owned by ROOT user.
2)crsd.bin => This  process is responsible for start, stop, monitor and failover of resource. It maintains OCR and also restarts the resources when the failure occurs.

ps -ef | grep crs | grep -v grep
root 25863 1 1 Oct27 ? 11:37:32 /opt/oracle/grid/product/11.2.0/bin/crsd.bin reboot

CRS daemon has two modes of running

1) reboot mode -> in reboot mode , when crsd starts , all the resources are restarted.
2) restart mode -> in restart mode , when crsd starts , the resources are started as these were before the shutdown.

(During startup and after a shutdown. During planned clusterware start it is started as ‘reboot’ mode. It is started as ‘restart’ mode after unplanned shutdown.)


Cluster synchronization services

[oracle@RAC1 ~]$ ps -ef | grep css
root      3606     1  0 20:07 ?        00:00:01 /grid/home/11.2.0/grid/bin/cssdmonitor
root      3626     1  0 20:07 ?        00:00:01 /grid/home/11.2.0/grid/bin/cssdagent
oracle    3637     1  0 20:07 ?        00:00:10 /grid/home/11.2.0/grid/bin/ocssd.bin
oracle    9434  8698  0 20:35 pts/0    00:00:00 grep css


CSSD monitor:
------------

It monitors(via oclsomon functionality) OCSSD(it is nothing but cssd) process hangs and  node hangs (via OPROCD funcationality) .

Startup sequence: INIT --> init.ohasd --> ohasd --> ohasd.bin --> cssdmonitor

cssdagent => responsible for I/O fencing. Killing this process would cause node reboot. Stops,start and checks the status of occsd.bin daemon

(what is I/O fencing - if communication happens between node to node , then there should be a I/O fencing , means it create a channel for node 1 to speak to node 2 and vice versa.)

(if one of the node is hang then which process will identify it , CSSDagent process will identify. Once CSSD identify it , Event Management send notifications to other nodes in the cluster  then cluster remastering or cluster rearragement will be done)

Startup sequence: INIT --> init.ohasd --> ohasd --> ohasd.bin --> cssdagent

occsd.bin => Manages cluster node membership(via voting disk) and runs as oracle user. Failure of this process results in node restart.

Startup sequence: INIT --> init.ohasd --> ohasd --> ohasd.bin --> cssdagent --> ocssd --> ocssd.bin



Event Manager
[oracle@RAC1 ~]$ ps -ef | grep evm
oracle    3832     1  0 20:08 ?        00:00:07 /grid/home/11.2.0/grid/bin/evmd.bin
oracle    4190  3832  0 20:09 ?        00:00:00 /grid/home/11.2.0/grid/bin/evmlogger.bin -o /grid/home/11.2.0/grid/evm/log/evmlogger.info -l /grid/home/11.2.0/grid/evm/log/evmlogger.log
oracle   10832  8698  0 20:48 pts/0    00:00:00 grep evm

evmd.bin => Distributes and communicates some cluster events to all of the cluster members so that they are aware of the cluster changes

evmlogger.bin => Started by EVMD.bin reads the configuration files and determines what events to subscribe to from EVMD and it runs user defined actions for those events.

( you can even made changes in evm logger to send only particular events)



Oracle Root Agent
$ ps -ef | grep -v grep | grep orarootagent

root 19395 1 0 Oct17 ? 12:06:57 /opt/oracle/grid/product/11.2.0/bin/orarootagent.bin

root 25853 1 1 Oct17 ? 16:30:45 /opt/oracle/grid/product/11.2.0/bin/orarootagent.bin

orarootagent.bin => A specialized oraagent process that helps crsd to manage resources owned by root, such as the network, and the Grid virtual IP address.

The above 2 process are actually threads which looks like

(ASSUME if any network changes needs to be done then is it possible to change it as oracle user , answer is no , it should be done via Root user ,so here orarootagent helps here. )


Cluster Time Synchronization Service (CTSS)

$ ps -ef | grep ctss | grep -v grep
root 24600 1 0 Oct27 ? 00:38:10 /opt/oracle/grid/product/11.2.0/bin/octssd.bin reboot


octssd.bin => Provides Time Management in a cluster for Oracle Clusterware



Oracle Agent
$ ps -ef | grep -v grep | grep oraagent
oragrid 5337 1 0 Nov14 ? 00:35:47 /opt/oracle/grid/product/11.2.0/bin/oraagent.bin
oracle 8886 1 1 10:25 ? 00:00:05 /opt/oracle/grid/product/11.2.0/bin/oraagent.bin
oragrid 19481 1 0 Oct27 ? 01:45:19 /opt/oracle/grid/product/11.2.0/bin/oraagent.bin



oraagent.bin => This process runs server callout scripts when FAN events occur. This process was known as RACG in Oracle Clusterware 11g Release 1 (11.1)

( assume when node is down , then event manager sends messages to other nodes , who will receive those messages and action accordingly ? it is taken care by oraagent.bin. it accepts the messages and do action like cluster remastering or pulling resources which are running in node1 to node 2 etc...)



System Monitor Service (osysmond)
$ ps -ef | grep -v grep | grep osysmond
root 19528 1 0 Oct27 ? 09:42:16 /opt/oracle/grid/product/11.2.0/bin/osysmond

The system monitor service (osysmond) is a real-time monitoring and operating system metric collection service that runs on each cluster node.

(The system monitor service is managed as a High Availability Services (HAS) resource.)

The system monitor service forwards the collected metrics to the cluster logger service, ologgerd. The cluster logger service stores the data in the Oracle Grid Infrastructure Management Repository database.


Cluster Logger Service
$ ps -ef | grep -v grep | grep ologgerd
root 24856 1 0 Oct27 ? 01:43:48 /opt/oracle/grid/product/11.2.0/bin/ologgerd -m mg5hfmr02a -r -d /opt/oracle/grid/product/11.2.0/crf/db/mg5hfmr01a

The cluster logger service (ologgerd) is responsible for preserving the data collected by the system monitor service (osysmond) in the Oracle Grid Infrastructure Management Repository database.

(In a cluster, there is one cluster logger service (ologgerd) per 32 nodes. More logger services are spawned for every additional 32 nodes. The additional nodes can be a sum of Hub and Leaf Nodes.)

Oracle Clusterware relocates and starts the service on a different node, if:

The logger service fails and is not able to come up after a fixed number of retries

The node where the cluster logger service is running, is down


Grid Plug and Play (GPNPD):
$ ps -ef | grep gpn
oragrid 19502 1 0 Oct27 ? 00:21:13 /opt/oracle/grid/product/11.2.0/bin/gpnpd.bin

gpnpd.bin => Provides access to the Grid Plug and Play profile, and coordinates updates to the profile among the nodes of the cluster to ensure that all of the nodes have the most recent profile.

(This comes into picture when adding or deleting a node to the cluster. )




Grid Interprocess Communication (GIPC):
$ ps -ef | grep -v grep | grep gipc
oragrid 19516 1 0 Oct27 ? 01:51:41 /opt/oracle/grid/product/11.2.0/bin/gipcd.bin

gipcd.bin => A support daemon that enables Redundant Interconnect Usage.

( how it works ?
if node1 want to talk to node2 , then gipcd present in node1 uses interconnect and send a message to node2 , then node 2 read and sent response to node1 via interconnect.



Multicast Domain Name Service (mDNS)
$ ps -ef | grep -v grep | grep dns
oragrid 19493 1 0 Oct27 ? 00:01:18 /opt/oracle/grid/product/11.2.0/bin/mdnsd.bin

mdnsd.bin => Used by Grid Plug and Play to locate profiles in the cluster, as well as by GNS to perform name resolution. The mDNS process is a background process on Linux and UNIX and on Windows.

Oracle Grid Naming Service (GNS)
$ ps -ef | grep -v grep | grep gns
gnsd.bin => Handles requests sent by external DNS servers, performing name resolution for names defined by the cluster.

HOW DOES 11G R2 CLUSTERWARE START ASM WHEN ASM SPFILE IS STORED ON ASM ITSELF

The INIT process first spawns the init.ohasd process, which in turn starts up the Oracle High Availability Services Daemon (OHASD).


OHASD accesses OLR (Oracle Local Registry) stored on the local file system to get the data needed for OHASD initialization.


once OHASD initialization is done , OHASD brings up GPNPD and CSSD. CSSD accesses the GPNP Profile stored on the local file system which contains the following vital bootstrap data;

a. ASM_DISKSTRING parameter (if specified) to locate the disks on which ASM disks are configured.

b. ASM SPFILE location : Name of the diskgroup containing ASM spfile

c. Location of  Voting Files : ASM

CSSD scans the headers of all ASM disks ( as indicated in ASM_DISKSTRING in GPnP profile) to get to know the location of voting files on ASM disks.

once it found the voting disk files  , It completes its initialization using voting disk files and join an existing cluster.


To read the ASM spfile during the ASM instance startup, it is not necessary to open the disk group. All required information is stored in the device’s header.


OHASD scans the headers of all ASM disks to get to know the location of ASM spfile , once It found the ASM spfile location , the contents of ASM spfile are read.Thereafter, ASM instance is started


With the help of ASM instance and mounted Diskgroups , access to Clusterware’s OCR is available to CRSD.


OHASD starts CRSD with access to the OCR in an ASM Diskgroup.


Clusterware completes initialization and brings up other services under its control.








Split brain condition and node eviction :

A split brain condition occurs when a single cluster node has a failure that results in reconfiguration of cluster into multiple partitions with each partition forming its own sub-cluster without the knowledge of the existence of other.

This would lead to collision and corruption of shared data as each sub-cluster assumes ownership of shared data

if a cluster node fails, Oracle clusterware ensures the failed node to be fenced off from all the IO operations on the shared storage .

(One of the IO fencing method is called STOMITH which stands for Shoot the Other Machine in the Head.)

once detecting a potential split brain condition, Oracle clusterware automatically picks a evicted cluster node and restart it so that it can continue to participate in the cluster,this process is called node eviction.

Oracle clusterware uses two CSS(Cluster Synchronization Service) heartbeats: network heartbeat (NHB) and disk
heartbeat (DHB) .

The network heartbeat means messages sent between the private interconnect to establish and confirm valid node membership.

The disk heartbeat is between the cluster node and the voting disk on the shared storage

Both heartbeats have their own maximal misscount values in seconds called CSS misscount in which the heartbeats must
be completed; otherwise a node eviction will be triggered.

There can be many reasons behind node eviction like ,

Network Heartbeat Missed
Voting Heartbeat Missed
CSSD Agent/ Monitor hung
RDBMS instance being hung and leads to node eviction
(
Default value for css misscount is 30 seconds.

[oracle@db02 ~]$ crsctl get css misscount
CRS-4678: Successful get misscount 60 for Cluster Synchronization Services.

reboottime: The amount of time allowed for a node to complete a reboot after the CSS daemon has been evicted. (i.e. how long does it take for the machine to completely shut-down when you do a reboot -f -n)

Default value 3 seconds

You can check value of reboottime parameter by

[oracle@db02 ~]$ crsctl get css reboottime
CRS-4678: Successful get reboottime 3 for Cluster Synchronization Services.

disktimeout: Disk Heartbeat is internally calculated. The value is different across different releases of Oracle. Disk heart beat time-out should be set maximum time allowed for Voting Disk IO to be completed.

Default value is 200 seconds

To check the value for disktimeout parameter :

[oracle@db02 ~]$ crsctl get css disktimeout
CRS-4678: Successful get disktimeout 200 for Cluster Synchronization Services.

With 11gR2, these settings can be changed online without taking any node down:

$CRS_HOME/bin/crsctl set css misscount n
$CRS_HOME/bin/crsctl set css reboottime n
$CRS_HOME/bin/crsctl set css disktimeout n
)





Steps Need to be followed for RAC installation.



Server Node requirement  .

1) A minimum of 2 GB RAM is required for the complete Grid Infrastructure and RAC software installation

2) Configure the server swap size to be 1.5 time if the RAM on the server is <=2 GB. Otherwise, configure the sever swap size to be equal to the RAM size

2) A minimum of 1 GB free space is required in the /tmp directory.

3) A minimum of 10 GB free space is required for the entire Clusterware home , Grid home  and RAC software home .

4) shared storage space to place Clusterware critical components like Oracle Cluster Registry (OCR) and Voting Disk.

5) shared storage disks for Automatic Storage Management, if you consider using ASM to host the datafiles

6) Network requirements are .

every node that is going to be part of the cluster must be configured with a minimum of two NIC interfs

one for the public communication and another for the private communication.

You also need to secure three IP addresses, Public, Private, and VIP respectively for each individual node.

The VIP subnet must be configured on the same subnet as the public address

3) configure Kernel parameter using /etc/sysctl.conf file

4) Install RPM packages.

5) create Groups and users.

6) Set or configure limits for the user in order to improve the shell limits using /etc/security/limits.conf file


7) configure the Secure Shell (SSH) passwordless connectivity between the nodes.
Verifying prerequisites with the CLUVFY utility

8)CONFIGURE ASM and CREATE ASM DISKS.

(# /usr/sbin/oracleasm configure -i
Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
LOAD ORACLEASM KERNEL MODULE - BOTH NODES


/usr/sbin/oracleasm init
The above command will do below
• Creates the /etc/sysconfig/oracleasm configuration file
• Creates the /dev/oracleasm mount point
• Mounts the ASMLib driver file system

CREATE ASM DISKS FOR ORACLE - ONLY ONE NODE
# /usr/sbin/oracleasm createdisk CRS1 /dev/sdb5
# /usr/sbin/oracleasm createdisk DATA1 /dev/sdb6
# /usr/sbin/oracleasm createdisk FRA1 /dev/sdb7


Run below commands on both nodes to scan and list ASM disks
# /usr/sbin/oracleasm scandisks
# /usr/sbin/oracleasm listdisks)

Oracle Clusterware installation

1)To begin the Clusterware configuration proceedings,initiate the ./runInstaller command from the Oracle 11g R1 Clusterware staging area
2) OUI(Oracle universal installer) will inform you to enter ORacle inventory directory and Operation system group name,oracle_base,oracle clusterware home location.
3)next OUI will display Cluster Configuration like (: in which the OUI detects and displays the) local node's Public, Private, and VIP name details under the Cluster Name section, as configured in DNS or as mentioned in the /etc/hosts file.
4)The Cluster Name field suggests a default cluster name for this cluster environment.

5)Specifing Network Interface Usage ,( you are required to configure the network interface types for the public and the private communication. )

6)Specify Oracle Cluster Registry (OCR) Location  and enable redundancy level
7)Specifing Voting Disk location and redundancy level
8)Install ,Once the installation begins on the local node, OUI displays the progress installation bar
Once installation is done , OUI then brings up a pop-up Execute Configuration scripts window
log in as root user, and you must run the scripts (orainstRoot.sh and root.sh) in sequence across all the nodes as instructed.
11)When the root.sh script is executed successfully across the nodes, click on OK to complete the Oracle Clusterware Installation process and proceed to the final stage.

12)Configuration Assistants, OUI then moves further to configure Oracle Notification, Private Interconnect, and Cluster Verifications Utility (CLUVFY) on the Configuration Assistants screen

next install database binaries and create database and listeners.

OCR


The  Oracle Cluster Registry (OCR)  records cluster configuration information. If it  fails, the entire clustered environment for Oracle 11g RAC will be adversely affected and a possible outage may result if  OCR is lost.

OCR is the central repository for CRS, which stores the metadata, configuration and state information for all cluster resources defined in clusterware. It is a cluster registry used to maintain application resources and their availability within the RAC environment. It also stores configuration information for CRS daemons and clusterwaremanaged applications.


What is stored in OCR ?

- Node membership information i.e. which nodes are part of the cluster
- Software active version
- the location of the 11g voting disk.
- Serverpools
- Status for the cluster resources such as RAC databases, listeners, instances, and services


 Server up/down
  . Network up/down
  . Database up/down
  . Instance up/down
  . Listener up/down

  configuration for the cluster resources such as RAC databases, listeners, instances, and services.

(  Dependencies
  . Management policy (automatic/manual)
  . Callout scripts
  . Retries
  . ….- cluster database instance to node mapping)


  - ASM instance, Diskgroups etc.
- CRS application resource profiles such as VIP addresses, services etc.
- Database services’ characteristics e.g preferred/available nodes, TAF policy , Load balancing goal etc.
- Information about clusterware processes
- Information about interaction and management of  third party applications controlled by CRS
- Details of the network interfaces held by the cluster network
- Communication settings where the Clusterware daemons or background processes listen
- Information about OCR backups


 various utilities used to manage OCR :

 Oracle Clusterware 11g Release 2 backs up the OCR automatically every four hours on a schedule that is dependent on when the node started (not clock time). OCR backups are made to the GRID_HOME/cdata/<cluster name> directory on the node performing the backups.

 One node known as the master node is dedicated to these backups, but in case master node is down , some other node may become the master. Hence, backups could be spread across nodes due to outages. These backups are named as follows:

 -4-hour backups   (3 max) –backup00.ocr, backup01.ocr, and backup02.ocr.
-Daily backups     (2 max) – day.ocr and day_.ocr
-Weekly backups (2 max) – week.ocr and week_.ocr


It is recommended that OCR backups may be placed on a shared location which can be configured using ocrconfig -backuploc <new location> command.

 Oracle Clusterware maintains the last three backups, overwriting the older backups. Thus, you will have 3 4-hour backups, the current one, one four hours old and one eight hours old.

 Therefore no additional clean-up tasks are required of the DBA. Oracle Clusterware will also take a backup at the end of the day. The last two of these backups are retained. Finally, at the end of each week Oracle will perform another backup, and again the last two of these backups are retained. You should make sure that your routine file system backups backup the OCR location.

 Note that RMAN does not backup the OCR.

 You can use the ocrconfig command to view the current OCR backups:
 #ocrconfig –showbackup auto
 #ocrconfig –showbackup manual - to check manually taken backups.

 If  your cluster is shutdown, then the automatic backups will not occur (nor will the purging). The timer restarts from the beginning when the cluster is restarted. When you start the cluster backup, a backup will not be taken immediately.  Hence, if you are stopping and starting your cluster that you could impact the OCR backups and the backup period could go long beyond 4 hours.


 If you feel that you need to backup the OCR immediately (for example, you have made a number of cluster related changes) then you can use the ocrconfig command to perform a manual backup:

 #ocrconfig –manualbackup


 You can list the manual backups with the ocrconfig command too:
#ocrconfig –showbackup manual


Ocrconfig also supports the creation of a logical backup of the OCR as seen here:
#ocrconfig –export <filename>


It is recommended that the OCR backup location be on a shared file system and that the cluster be configured to write the backups to that file system. To change the location of the OCR backups, you can use the ocrconfig command as seen in this example:
#ocrconfig –backuploc /u01/app/oracle/ocrloc


Note that the ASM Cluster File System (ACFS) does not support storage of OCR backups.


Restoring the OCR


if you back it up, there might come a time to restore it. Recovering the OCR from the physical backups is fairly straight forward, just follow these steps:
1.Locate the OCR backup using the ocrconfig command.
#ocrconfig -showbackup


2.Stop CRS on all nodes one by one

#crsctl stop crs

 If above command fails due to OCR corruption, stop CRS on all nodes one by one using the following command:

 #crsctl stop crs -f

 3.Start CRS on one node in exclusive mode
 #crsctl start crs -excl

 Check if crsd is running. If it is, stop it :
 # crsctl stop resource ora.crsd -init

 4.Restore the OCR
 If you want to restore OCR to an Oracle ASM disk group, then you must first create a disk group using SQL*Plus that has the same name as the disk group you want to restore and mount it on the local node.

 If you cannot mount the disk group locally, then run the following SQL*Plus command:

 SQL> drop diskgroup disk_group_name force including contents;

     Restore OCR from its physical backup
#ocrconfig –restore {path_to_backup/backup_file_to_restore}

5. Verify the integrity of OCR

#ocrcheck

6. STOP CRS on the node where you had started in exclusive mode
#crsctl stop crs

If CRS does not stop normally, stop it with force option
#crsctl stop crs -f

7.Start CRS on all nodes one by one
#crsctl start crs

8.Check the integrity of the newly restored OCR:
#cluvfy comp ocr –n all -verbose



OCR repair
———-
If the OCR becomes damaged (which might be evidenced by cluster failures, or error messages in Clusterware logs) then you may need to repair the OCR. Also, if you make a change to the cluster configuration while a node is down then you may need to repair the OCR too. For example if another OCR location was addeed while a node was down, to repair the OCR use the ocrconfig command as seen here:

#ocrconfig –repair –add /u01/app/oracle/ocr

This command will only run on the node  that the command is executed on. Thus, if you stopped a node, made some cluster adjustments on another node and then restarted the down node, you might need to execute the ocrconfig command on the node once it’s started. For a demonstration of ocrconfig -repair, please click here.


GPNP Profile



The GPnP profile is a XML file located at location <GRID_HOME/gpnp/<hostname>/profiles/peer as profile.xml. Each node of the cluster maintains a copy of this profile locally and is maintained by GPnP daemon along with mdns daemon.Now before understanding why Oracle came up with GPnP profile, we need to focus on what it contains.
GPnP defines a node’s meta data about network interfaces for public and private interconnect, the ASM server parameter file, and CSS voting disks.
This profile is protected by a wallet against modification. If you have to manually modify the profile, it must first be unsigned with $GRID_HOME/bin/gpnptool, modified, and then signed again with the same utility, however there is a very slight chance you would ever be required to do so.

Now we’ll use the gpnptool with get option to dump this xml file into standard output. Below is the formatted output for the ease of readability.

So from the above dump we can see that GPnP profile contains following information:-
1) Cluster Name
2) Network Profile
3) CSS-Profile tag
4) ASM-Profile tag







RAC-interview questions



What are the  main important components of Oracle clusterware

1) Oracle Cluster Registry (OCR) .

2) Voting disks .

3)Background processes that manage clusterwide operations and provide functionality for Oracle 11g R1 and 11g R2 RAC

What is OCR ?

OCR is the one which manages Oracle Clusterware and Oracle RAC database configuration information

what is OLR?

OLR is the one which resides on every node in the cluster and manages Oracle Clusterware configuration information for each particular node.

What is Voting disks?

The Voting disk manages cluster node membership. Each voting disk must be accessible by all nodes in the cluster for nodes to be members of the cluster and must be stored on either a shared raw disk or OCFS/OCFS2 cluster filesystem.

As Voting disk is the key communication mechanism within the Oracle Clusterware where all nodes in the cluster read and write heartbeat information. In addition, the Voting disk is also used to shut down, fence, or reboot either single or multiple nodes whenever network communication is lost between any node within the cluster, in order to prevent the dreaded split-brain condition and thus protect the database information.


Where Oracle OCR and Voting disks to be kept?

Oracle recommends to use Oracle ASM to store OCR and voting disks.

What should be permission of voting disks?

Voting disk file should be having permission as grid owner and member of oinstall group. if not , it should be corrected.

for ex:

grid@myserver>$ ls -l /dev/rhdisk18

crwxrwxrwx  1 root  oinstall  36, 02 Feb 10 20:28 /dev/rhdisk18

$ su root

root@myserver> # chown grid:oinstall /dev/rhdisk18

# exit

$ ls -l /dev/rhdisk18

crwxrwxrwx  1001 grid  oinstall  36, 19 Sep 09 20:29 /dev/rhdisk18



What are utilities can be used to manage OCR and the Oracle Local Registry (OLR) ?

OCRCONFIG, OCRDUMP, and OCRCHECK.

What is default location of OLR?

OLR is located on local storage on each node in a cluster and Its default location is Grid_home/cdata/host_name.olr
where Grid_home is nothing but  Oracle Grid Infrastructure home  and host_name is host name of the node.

What is OCRCHECK ?

OCRCHECK displays all OCR locations that are registered

what is the command which is used to check Oracle Clusterware is running on the node or not ?

crsctl check crs

What is difference between Clusterware and RAC?

Oracle Clusterware is a different piece of software compared to other RAC components or the RAC database. One key point is not to confuse the Clusterware operations and architecture with 11g RAC! They are both crucial for a complete clustering solution and interact with each other, but are not the same thing. Clusterware consists of the Oracle clustering software as well as background processes that are unique and required for an Oracle RAC environment. In contrast, the Oracle RAC architecture contains Clusterware as well as additional hardware, network, storage, and database components required for Oracle 11g RAC. Many DBAs confuse Clusterware with RAC and think that they are same, which is indeed not the case.



What are services provided by ORacle Clusterware ?
Oracle Clusterware provides several key services essential to an Oracle 11g RAC configuration, including the following:

Group Services to manage cluster services within 11g RAC

Node Monitor or the "heartbeat" to monitor the status of nodes in 11g RAC cluster

Locking services performed by the LMS database process to manage concurrency activities for 11g RAC cluster

HA Resource management for failover or load-balancing activities in 11g RAC


HOw to check the status of OCR configuration?

using OCRCHECK

what output you get by OCRCHECK when everthing is normal ?

[oracle@raclinux1 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

         Version                  :          2

         Total space (kbytes)     :     297084

         Used space (kbytes)      :       3852

         Available space (kbytes) :     293232

         ID                       : 2007457116

         Device/File Name         : /dev/raw/raw5

                                    Device/File integrity check succeeded

         Device/File Name         : /dev/raw/raw6

                                    Device/File integrity check succeeded


         Cluster registry integrity check succeeded

 

How do you check Voting disk configuration information or status of voiting disk?

[oracle@raclinux1 ~]$ crsctl query css votedisk

 0.     0    /dev/raw/raw7

 1.     0    /dev/raw/raw8

 2.     0    /dev/raw/raw9


located 3 votedisk(s).

what is understood from above output ?

This output from crsctl tells us that we have three vote disks for the 11g Clusterware environment and that they are available and free of errors.


What is command to get the clusterware parameter ?

$ crs_stat -p

NAME=ora.RACDB.RACDB1.inst

TYPE=application

ACTION_SCRIPT=/u01/app/oracle/product/11.1.0/db_1/bin/racgwrap

ACTIVE_PLACEMENT=0

AUTO_START=1     dictates whether resource will restart on crs restart

CHECK_INTERVAL=600  how often crs checks this resource

DESCRIPTION=CRS application for Instance

FAILOVER_DELAY=0

FAILURE_INTERVAL=0

FAILURE_THRESHOLD=0

HOSTING_MEMBERS=raclinux1

OPTIONAL_RESOURCES=

PLACEMENT=restricted

REQUIRED_RESOURCES=ora.raclinux1.vip ora.raclinux1.ASM1.asm

RESTART_ATTEMPTS=5

SCRIPT_TIMEOUT=600 รจ timeout for script which checks resource

START_TIMEOUT=0

STOP_TIMEOUT=0

UPTIME_THRESHOLD=7d

USR_ORA_ALERT_NAME=

USR_ORA_CHECK_TIMEOUT=0

USR_ORA_CONNECT_STR=/ as sysdba

USR_ORA_DEBUG=0

USR_ORA_DISCONNECT=false


Sometimes there will be a problem that causes the Oracle Clusterware to fail or resources to become unavailable due to permission and ownership settings for the Oracle Clusterware. If you wish to examine the Clusterware permissions and ownership, you can use the crs_stat –ls option as shown here: ]$ crs_stat -ls

Name           Owner          Primary PrivGrp          Permission

-----------------------------------------------------------------

ora....B1.inst oracle         oinstall                 rwxrwxr--

ora....B2.inst oracle         oinstall                 rwxrwxr--

ora.RACDB.db   oracle         oinstall                 rwxrwxr--

ora....SM1.asm oracle         oinstall                 rwxrwxr--

ora....X1.lsnr oracle         oinstall                 rwxrwxr--

ora....X1.lsnr oracle         oinstall                 rwxrwxr--

ora....ux1.gsd oracle         oinstall                 rwxr-xr--

ora....ux1.ons oracle         oinstall                 rwxr-xr--



Which utility is used to manage the Oracle cluster registery and what are functionalities provided by utility ?


The OCRCONFIG utility provides you with the ability to manage the Oracle 11g Cluster Registry. As such, it provides you with

the following functionalities to administer the OCR:


Exporting and importing OCR contents to a file

Restoring a corrupted OCR from a physical backup

Adding or replacing an OCR copy with another OCR file

Repairing a damaged OCR with a new OCR version


A log file will be created in $ORACLE_HOME/log/<hostname>/client/ocrconfig_<pid>.log. Please ensure you have file creation privileges in the above directory before running this tool.


What are frequently experienced problems  as RAC DBA ?
failing, missing, or offline of  Clusterware resources.



How do you ensure that all of the required Oracle 11g Clusterware processes for RAC are online and running for the Clusterware?

There are 3 commands

ps -ef|grep crsd

ps -ef|grep cssd

ps -ef|grep evmd

[oracle@sdrac01 11.1.0]$ ps -ef|grep crsd
root      2853     1  0 Apr04 ?        00:00:00
/u01/app/oracle/product/11.1.0/crs/bin/crsd.bin reboot
[oracle@sdrac01 11.1.0]$ ps -ef|grep cssd
root      2846     1  0 Apr04 ?        00:03:15 /bin/sh /etc/init.d/init.cssd fatal
root      3630  2846  0 Apr04 ?        00:00:00 /bin/sh /etc/init.d/init.cssd daemon
/u01/app/oracle/product/11.1.0/crs/bin/ocssd.bin

[oracle@sdrac01 11.1.0]$ ps -ef|grep evmd
oracle    3644  2845  0 Apr04 ?        00:00:00
/u01/app/oracle/product/11.1.0/crs/bin/evmd.bin
oracle    9595 29413  0 23:59 pts/3    00:00:00 grep evmd



Failed or corrupted vote disks will negatively impact your Oracle 11g RAC environment so what are best guideliness can be followed to avoid voting failed or corrupted ?

 The following guidelines will ensure best practices for the vote disk component of the Oracle 11g Clusterware:

•Implement multiple copies of the vote disk on different disk volumes to eliminate Single Point of Failure.

•Make sure that you take regular backups for vote disks with the dd utility (Unix/Linux) or copy utility (Windows).

•If you are using the dd utility for backing up the vote disks,

there should be 4k block size on a Linux/Unix platform to ensure complete blocks are backed up for the voting disk.

For syntax on how to use the dd command to back up the vote disks, consult the Oracle Clusterware documentation and the Unix/Linux manual pages for dd.


When you may need to re-install CRS ?

Without a backup of the vote disk, you must reinstall CRS!

means if you dont have back of Vote disk then you may need to reinstall CRS.



if OCR is damaged or lost due to either a disk failure or other problem, the Oracle 11g Clusterware will cease to function normally so what are the guidelines can be followed to avoid  OCR failure ?

Recommended guidelines for the OCR are :

•Maintain frequent backups of OCR on separate disk volumes to avoid Single Point of Failure whenever a change is made to the cluster resources

•Use the OCRCONFIG utility to perform recovery

•Find and maintain safe backups for the OCR

•Export the OCR whenever changes are made to cluster resources

==========

./ocrconfig -showbackup

Oracle 11g Clusterware log file analysis

Where do you get the logfiles for clusterware ?

$CRS_HOME contains logfiles for the Clusterware base directory

Where do you get the logfiles for VIP and ONS resources?

$CRS_HOME\log\nodename\racg