Sunday, February 20, 2011

NFS Configuration for Oracle RAC

Today I was going to Install/configure Oracle 11gR2 RAC without using shared storage on Red Hat Enterprise Linux. I had read about that before but never tested so I tried and failed first time but after some re-configuration, I was able to configure clusterware and was able to store OCR Voting and database files on NFS mount points.

Step 1
=========
On First node e.g. RAC node1, create the following directory. You can use any directory as your NFS source mount point.

mkdir /u01/shared_config
chown -R oracle:oinstall /u01/shared_config

Step 2
=========
Add the following lines to the /etc/exports file.

vi /etc/exports
------------------------------------------------
/u01/shared_config  *(rw,sync,no_wdelay,insecure_locks,no_root_squash)

Step 3
========
Run the following command to export the NFS shares.
Check that the NFS server will get started during boot of this server.

chkconfig --level 345 nfs on

Now, start the NFS server process on the NFS server.
service nfs start

Check, if the directory is exported correctly by issuing the exportfs –v command:
/usr/sbin/exportfs -v

Step 4
========
On both node1 and node2 create the directories in which the Oracle configuration files will be created.

mkdir /shared_config
chown -R oracle:oinstall /shared_config
chmod -R 775 /shared_config

Step 5
=======
Add the following lines to the "/etc/fstab" file.
---------------------------------------------------------------
racnode1:/u01/shared_config /shared_config  nfs  rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0  0 0

Note: I used following Oracle recommended settings for nfs share and at the end my ocr and voting disks configuration process was failed:
racnode1:/u01/shared_config /shared_config  nfs  rw,bg,hard,intr,rsize=32768,wsize=32768,tcp,noac,vers=3,timeo=600 0 0

Step 6
=======
Mount the NFS shares on all servers.

mount /shared_config

Make sure the permissions on the shared directories are correct i.e oracle.
Check, if the NFS export is correctly mounted with the mount command.
# mount
It will give you output like this:
esidbapoc01:/sharedconfig on /shared_config type nfs (rw,bg,hard,nointr,tcp,nfsvers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,addr=192.168.1.3)


Hope this will help…………