文章来源:http://www.oracle-base.com/articles/11g/OracleDB11gR2RACInstallationOnLinuxUsingNFS.php
1.The /etc/hosts file must contain the following information.
127.0.0.1 localhost.localdomain localhost
# Public
192.168.2.101 rac1.localdomain rac1
192.168.2.102 rac2.localdomain rac2
#Private
192.168.0.101 rac1-priv.localdomain rac1-priv
192.168.0.102 rac2-priv.localdomain rac2-priv
#Virtual
192.168.2.111 rac1-vip.localdomain rac1-vip
192.168.2.112 rac2-vip.localdomain rac2-vip
# SCAN
192.168.2.201 rac-scan.localdomain rac-scan
#NAS
192.168.2.101 nas1.localdomain nas1
2.create shared disks
First we need to set up some NFS shares. In this case we will do this on the RAC1 node, but you can do the on a NAS or a third server if you have one available. On the RAC1 node create the following directories.
mkdir /shared_config mkdir /shared_grid mkdir /shared_home mkdir /shared_data
Add the following lines to the /etc/exports file.
/shared_config *(rw,sync,no_wdelay,insecure_locks,no_root_squash) /shared_grid *(rw,sync,no_wdelay,insecure_locks,no_root_squash) /shared_home *(rw,sync,no_wdelay,insecure_locks,no_root_squash) /shared_data *(rw,sync,no_wdelay,insecure_locks,no_root_squash)
Run the following command to export the NFS shares.
chkconfig nfs on service nfs restart
On both RAC1 and RAC2 create the directories in which the Oracle software will be installed.
mkdir -p /u01/app/11.2.0/grid mkdir -p /u01/app/oracle/product/11.2.0/db_1 mkdir -p /u01/oradata mkdir -p /u01/shared_config chown -R oracle:oinstall /u01/app /u01/app/oracle /u01/oradata /u01/shared_config chmod -R 775 /u01/app /u01/app/oracle /u01/oradata /u01/shared_config
Add the following lines to the "/etc/fstab" file.
nas1:/shared_config /u01/shared_config nfs rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,<有个空格>nolock<有个空格> 0 0 nas1:/shared_grid /u01/app/11.2.0/grid nfs rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,<有个空格>nolock<有个空格> 0 0 nas1:/shared_home /u01/app/oracle/product/11.2.0/db_1 nfs rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,<有个空格>nolock<有个空格> 0 0 nas1:/shared_data /u01/oradata nfs rw,bg,hard,nointr,tcp,vers=3,timeo=600,rsize=32768,wsize=32768,actimeo=0,<有个空格>nolock<有个空格> 0 0
Mount the NFS shares on both servers.
mount /u01/shared_config mount /u01/app/11.2.0/grid mount /u01/app/oracle/product/11.2.0/db_1 mount /u01/oradata
Make sure the permissions on the shared directories are correct.
chown -R oracle:oinstall /u01/shared_config chown -R oracle:oinstall /u01/app/11.2.0/grid chown -R oracle:oinstall /u01/app/oracle/product/11.2.0/db_1 chown -R oracle:oinstall /u01/oradata
对于使用NFS来作为Oracle RAC的存储方式最需要注意的两点:
1.RAC所有节点都需要通过NFS的方式挂载到服务器。
2.NFS Client的挂载参数需要符合一定的要求。
下面是一篇metalink文章,详细讨论了NFS参数要求:
Mount Options for Oracle files when used with NFS on NAS devices (文档 ID 359515.1)
修改时间:2013-12-31类型:BULLETIN
In this Document
Purpose |
Scope |
Details |
RAC including RACone and single instance RAC |
Single Instance (non-RAC) |
References |
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.1.0.2 to 12.1.0.1 [Release 10.1 to 12.1]Information in this document applies to any platform.
Oracle Clusterware, Oracle Real Application Clusters, NAS
PURPOSE
The options with which the NAS systems should be mounted are described. This note does not cover the new dNFS feature that was introduced in 11g.
SCOPE
This document is relevant to all environments using Oracle Clusterware & RAC.
DETAILS
RAC including RACone and single instance RAC
- Binaries is the shared mount points where the Oracle Home and CRS_HOME is installed.
- Datafiles includes Online Logs, Controlfile and Datafiles
- nfsvers and vers are identical on those OS platforms that has nfsvers. The ver option is an alternative to the nfsvers option. It is included for compatibility with other operating systems
- Please note that the mount options on each of the following cells are applicable only to those type of files listed in the column heading.
- For RMAN backup sets, image copies, and Data Pump dump files, the "NOAC" mount option should not be specified - that is because RMAN and Data Pump do not check this option and specifying this can adversely affect performance.
Operating System | Mount options for Binaries ## | Mount options for Oracle Datafiles | Mount options for CRS Voting Disk and OCR |
Sun Solaris * | rw,bg,hard,nointr,rsize=32768, vers=3,suid | rw,bg,hard,nointr,rsize=32768, wsize=32768,proto=tcp,noac, forcedirectio, vers=3 | rw,bg,hard,nointr,rsize=32768, wsize=32768,proto=tcp,vers=3, noac,forcedirectio |
AIX (5L) ** | rw,bg,hard,nointr,rsize=32768, vers=3,timeo=600 | cio,rw,bg,hard,nointr,rsize=32768, | cio,rw,bg,hard,intr,rsize=32768, |
HPUX 11.23 *** -- | rw,bg,vers=3,proto=tcp,noac, hard,nointr,timeo=600, rsize=32768,wsize=32768,suid | rw,bg,vers=3,proto=tcp,noac, forcedirectio,hard,nointr,timeo=600, rsize=32768,wsize=32768 | rw,bg,vers=3,proto=tcp,noac, forcedirectio,hard,nointr,timeo=600 ,rsize=32768,wsize=32768 |
Windows | Not Supported | Not Supported | Not Supported |
Linux x86 # **** | rw,bg,hard,nointr,rsize=32768, | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,actimeo=0, vers=3,timeo=600 | rw,bg,hard,nointr,rsize=32768, |
Linux x86-64 # **** | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,vers=3, timeo=600, actimeo=0 | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,actimeo=0, vers=3,timeo=600 | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,noac,vers=3, timeo=600,actimeo=0 |
Linux - Itanium | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,vers=3, timeo=600, actimeo=0 | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,actimeo=0, vers=3,timeo=600 | rw,bg,hard,nointr,rsize=32768, wsize=32768,tcp,noac,vers=3, timeo=600,actimeo=0 |
* NFS mount option “forcedirectio” is required on Solaris platforms when mounting the OCR/CRS files when using Oracle 10.1.0.4 or 10.2.0.2 or later (Oracle unpublished bug 4466428)
** AIX is only supported with NAS on AIX 5.3 TL04 and higher with Oracle 10.2.0.1 and later
*** NAS devices are only supported with HPUX 11.23 or higher ONLY
# These mount options are for Linux kernels 2.6 and above. For older kernels please check Note 279393.1
filesystemio_options = DIRECTIO
Single Instance (non-RAC)
Operating System | Mount options for Binaries | Mount options for Oracle Datafiles |
Sun Solaris * (8, 9, 10) | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,proto=tcp,suid | rw,bg,hard,rsize=32768,wsize=32768,vers=3,[forcedirectio or llock],nointr,proto=tcp |
AIX (5L) ** | rw,bg,hard,rsize=32768,wsize=32768,vers=3,intr,timeo=600,proto=tcp | rw,bg,hard,rsize=32768,wsize=32768,vers=3,cio,intr,timeo=600,proto=tcp |
HPUX 11.23 **** | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,proto=tcp,suid | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,proto=tcp, forcedirectio |
Windows | Not Supported | Not Supported |
Linux x86 # | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp |
Linux x86-64 # | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp |
Linux - Itanium | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp | rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp |
See above (after the configuration for RAC) for the legends
--end--