Oracle Database 11g Release 2 RAC On Linux Using NFS

Oracle Database 11g Release 2 RAC On Linux Using NFS

This article describes the installation of Oracle Database 11g Release 2 (11.2 64-bit) RAC on Linux (Oracle Enterprise Linux 5.4 64-bit) using NFS to provide the shared storage.

Introduction

NFS is an abbreviation of Network File System, a platform. independent technology created by Sun Microsystems that allows shared access to files stored on computers via an interface called the Virtual File System (VFS) that runs on top of TCP/IP. Computers that share files are considered NFS servers, while those that access shared files are considered NFS clients. An individual computer can be either an NFS server, a NFS client or both.

We can use NFS to provide shared storage for a RAC installation. In a production environment we would expect the NFS server to be a NAS, but for testing it can just as easily be another server, or even one of the RAC nodes itself.

To cut costs, this articles uses one of the RAC nodes as the source of the shared storage. Obviously, this means if that node goes down the whole database is lost, so it's not a sensible idea to do this if you are testing high availability. If you have access to a NAS or a third server you can easily use that for the shared storage, making the whole solution much more resilient. Whichever route you take, the fundamentals of the installation are the same.

The Single Client Access Name (SCAN) should really be defined in the DNS or GNS and round-robin between one of 3 addresses, which are on the same subnet as the public and virtual IPs. In this article I've defined it as a single IP address in the "/etc/hosts" file, which is wrong and will cause the cluster verification to fail, but it allows me to complete the install without the presence of a DNS.

This article was inspired by the blog postings of Kevin Closson.

Download Software

Download the following software.

Operating System Installation

This article uses Oracle Enterprise Linux 5.4. A general pictorial guide to the operating system installation can be found here. More specifically, it should be a server installation with a minimum of 2G swap (preferably 3-4G), firewall and secure Linux disabled. Oracle recommend a default server installation, but if you perform. a custom installation include the following package groups:

  • GNOME Desktop Environment
  • Editors
  • Graphical Internet
  • Text-based Internet
  • Development Libraries
  • Development Tools
  • Server Configuration Tools
  • Administration Tools
  • Base
  • System Tools
  • X Window System

To be consistent with the rest of the article, the following information should be set during the installation.

RAC1.

  • hostname: rac1.localdomain
  • IP Address eth0: 192.168.2.101 (public address)
  • Default Gateway eth0: 192.168.2.1 (public address)
  • IP Address eth1: 192.168.0.101 (private address)
  • Default Gateway eth1: none

RAC2.

  • hostname: rac2.localdomain
  • IP Address eth0: 192.168.2.102 (public address)
  • Default Gateway eth0: 192.168.2.1 (public address)
  • IP Address eth1: 192.168.0.102 (private address)
  • Default Gateway eth1: none

You are free to change the IP addresses to suit your network, but remember to stay consistent with those adjustments throughout the rest of the article.

Once the basic installation is complete, install the following packages whilst logged in as the root user. This includes the 64-bit and 32-bit versions of some packages.

 
 

Oracle Installation Prerequisites

Perform. the following steps whilst logged into the RAC1 virtual machine as the root user.

Make sure the shared memory filesystem is big enough for Automatic Memory Manager to work.

 
 

Make the setting permanent by amending the "tmpfs" setting of the "/etc/fstab" file to look like this.

 
 

If you are not using DNS, the "/etc/hosts" file must contain the following information.

 
 

Note. The SCAN address should not really be defined in the hosts file. Instead is should be defined on the DNS to round-robin between 3 addresses on the same subnet as the public IPs. For this installation, we will compromise and use the hosts file. If you are using DNS, then only the first line should be present in the "/etc/hosts" file. The other entries are defined in the DNS, as described here. Also, the NAS1 entry is actually pointing to the RAC1 node. If you are using a real NAS or a third server to provide your shared storage put the correct IP address into the file.

Add or amend the following lines to the "/etc/sysctl.conf" file.

 
 

Run the following command to change the current kernel parameters.

 
 

Add the following lines to the "/etc/security/limits.conf" file.

 
 

Add the following lines to the "/etc/pam.d/login" file, if it does not already exist.

 
 

Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

 
 

Alternatively, this alteration can be done using the GUI tool (System > Administration > Security Level and Firewall). Click on the SELinux tab and disable the feature.

Either configure NTP, or make sure it is not configured so the Oracle Cluster Time Synchronization Service (ctssd) can synchronize the times of the RAC nodes. In this case we will deconfigure NTP.

 
 

If you are using NTP, you must add the "-x" option into the following line in the "/etc/sysconfig/ntpd" file.

 
 

Then restart NTP.

 
 

Start the Name Service Cache Daemon (nscd).

 
 

Create the new groups and users.

 
 

Login as the oracle user and add the following lines at the end of the ".bash_profile" file.

 
 

Remember to amend the ORACLE_SID and ORACLE_HOSTNAME on each server.

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.

 
 

Add the following lines to the "/etc/exports" file.

 
 

Run the following command to export the NFS shares.

 
 

On both RAC1 and RAC2 create the directories in which the Oracle software will be installed.

 
 

Add the following lines to the "/etc/fstab" file.

 
 

Mount the NFS shares on both servers.

 
 

Make sure the permissions on the shared directories are correct.

 
 

Install the Grid Infrastructure

Start both RAC nodes, login to RAC1 as the oracle user and start the Oracle installer.

 
 

Select the "Install and Configure Grid Infrastructure for a Cluster" option, then click the "Next" button.

Grid - Select Installation Option

Select the "Advanced Installation" option, then click the "Next" button.

Grid - Select Installation Type

Select the the required language support, then click the "Next" button.

Grid - Select Product Languages

Enter cluster information and uncheck the "Configure GNS" option, then click the "Next" button.

Grid - Grid Plug and Play Information

On the "Specify Node Information" screen, click the "Add" button.

Grid - Cluster Node Information

Enter the details of the second node in the cluster, then click the "OK" button.

Grid - Add Cluster Node Information

Click the "SSH Connectivity..." button and enter the password for the "oracle" user. Click the "Setup" button to to configure SSH connectivity, and the "Test" button to test it once it is complete. Click the "Next" button.

Grid - SSH Connectivity

Check the public and private networks are specified correctly, then click the "Next" button.

Grid - Specify Network Interface Usage

Select the "Shared File System" option, then click the "Next" button.

Grid - Storage Option Information

Select the required level of redundancy and enter the OCR File Location(s), then click the "Next" button.

Grid - OCR Storage Option

Select the required level of redundancy and enter the Voting Disk File Location(s), then click the "Next" button.

Grid - Voting Disk Storage Option

Accept the default failure isolation support by clicking the "Next" button.

Grid - Failure Isolation Support

Select the preferred OS groups for each option, then click the "Next" button. Click the "Yes" button on the subsequent message dialog.

Grid - Privileged Operating System Groups

Enter "/u01/app/oracle" as the Oracle Base and "/u01/app/11.2.0/grid" as the software location, then click the "Next" button.

Grid - Specify Install Location

Accept the default inventory directory by clicking the "Next" button.

Grid - Create Inventory

Wait while the prerequisite checks complete. If you have any issues, either fix them or check the "Ignore All" checkbox and click the "Next" button. If there are no issues, you will move directly to the summary screen. If you are happy with the summary information, click the "Finish" button.

Grid - Summary

Wait while the setup takes place.

Grid - Setup

When prompted, run the configuration scripts on each node.

Grid - Execute Configuration .s

The output from the "orainstRoot.sh" file should look something like that listed below.

 
 

The output of the root.sh will vary a little depending on the node it is run on. Example output can be seen here (Node1Node2).

Once the scripts have completed, return to the "Execute Configuration Scripts" screen on RAC1 and click the "OK" button.

Grid - Execute Configuration .s

Wait for the configuration assistants to complete.

Grid - Configuration Assistants

We expect the verification phase to fail with an error relating to the SCAN, assuming you are not using DNS.

 
 

Provided this is the only error, it is safe to ignore this and continue by clicking the "Next" button.

Click the "Close" button to exit the installer.

Grid - Finish

The grid infrastructure installation is now complete.

Install the Database

Start all the RAC nodes, login to RAC1 as the oracle user and start the Oracle installer.

 
 

Uncheck the security updates checkbox and click the "Next" button.

DB - Configure Security Updates

Accept the "Create and configure a database" option by clicking the "Next" button.

DB - Select Installation Option

Accept the "Server Class" option by clicking the "Next" button.

DB - System Class

Make sure both nodes are selected, then click the "Next" button.

DB - Node Selection

Accept the "Typical install" option by clicking the "Next" button.

DB - Select Istall Type

Enter "/u01/app/oracle/product/11.2.0/db_1" for the software location. The storage type should be set to "File System" with the file location set to "/u01/oradata". Enter the appropriate passwords and database name, in this case "RAC.localdomain".

DB - Typical Install Configuration

Wait for the prerequisite check to complete. If there are any problems either fix them, or check the "Ignore All" checkbox and click the "Next" button.

DB - Perform. Prerequisite Checks

If you are happy with the summary information, click the "Finish" button.

DB - Summary

Wait while the installation takes place.

DB - Install Product

Once the software installation is complete the Database Configuration Assistant (DBCA) will start automatically.

DB - DBCA

Once the Database Configuration Assistant (DBCA) has finished, click the "OK" button.

DB - DBCA Complete

When prompted, run the configuration scripts on each node. When the scripts have been run on each node, click the "OK" button.

DB - Execute Configuration .s

Click the "Close" button to exit the installer.

DB - Finish

The RAC database creation is now complete.

Check the Status of the RAC

There are several ways to check the status of the RAC. The srvctl utility shows the current configuration and status of the RAC database.

 
 

The V$ACTIVE_INSTANCES view can also display the current status of the instances.

 
 

If you have configured Enterprise Manager, it can be used to view the configuration and current status of the database using a URL like "https://rac1.localdomain:1158/em".

OEM

Direct NFS Client

For improved NFS performance, Oracle recommend using the Direct NFS Client shipped with Oracle 11g. The direct NFS client looks for NFS details in the following locations.

  1. $ORACLE_HOME/dbs/oranfstab
  2. /etc/oranfstab
  3. /etc/mtab

Since we already have our NFS mount point details in the "/etc/fstab", and therefore the "/etc/mtab" file also, there is no need to configure any extra connection details.

For the client to work we need to switch the libodm11.so library for the libnfsodm11.so library, as shown below.

 
 

With the configuration complete, you can see the direct NFS client usage via the following views.

  • v$dnfs_servers
  • v$dnfs_files
  • v$dnfs_channels
  • v$dnfs_stats

For example.

 
 

The Direct NFS Client supports direct I/O and asynchronous I/O by default.

For more information see:

转自:http://oracle-base.com/articles/11g/oracle-db-11gr2-rac-installation-on-linux-using-nfs.php

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24433396/viewspace-744224/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/24433396/viewspace-744224/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值