oracle 11g r2 rac setup on rhel 5.0

Download Oracle 11g R2 RAC setup on rhel 5.0

Post on 29-Aug-2014




5 download

Embed Size (px)


Download ppt from


  • Santosh Kangane Oracle DBA Oracle 11g R2 Real Application Cluster Implementation on RHEL 5.0Please download the Presentation from have added all concepts in this ppt.Specification: 1) 2 Node RAC setup 2) OS: Each Node machine with Red Hat Enterprise Linux Server release 5 (x86_64 bit, Kernel: 2.6.18-8.el5) 3) Storage server: 73 GB, Ubuntu 12.04 (x86_64 bit) 4) Oracle 11gR2 Database 5) Oracle 11gR2 Grid Infrastructure.Pre-Installation: 1) All the nodes should have same OS and Kernel version and bits (x86 or x86_64) For Linux use $uname a command, it should show same output on all the nodes. 2) Each of the servers should have 2 NIC cards - Where group of 2 (one from each machine) should have same name(say eth0/eth1) and IP subnet Mask Ex: 1) Each of the machines has eth0 as Ethernet card number and IP on subnet say 10.88.33.X (Public Network) 2) Each of the machines has eth1 as Ethernet card number and IP on subnet say 10.88.32.X (Private Network for interconnects) - Both of these groups on different VLANs as above. all can co-exist on the same Physical switch; that should not be an issue 3) Configure VIP by adding entries in /etc/hosts file (VIPs must be from same subnet as that of Public IPs) 4) Stop ntpd service: Linux syncs the system time using NTP protocol. In RAC oracle has cluster time sync service built in. if ntpd service is up then oracle will use it else oracle will create cluster synchronization service; Its recommended that we should use oracle cluster sync service. So will disable the ntpd service on all the nodes: [root@PTS0009 ~]# service ntpd stop ntpd is stopped [root@PTS0009 ~]# chkconfig ntpd off [root@PTS0009 ~]# chkconfig --list ntpd ntpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off [root@PTS0009 ~]# chkconfig ntpd --del [root@PTS0009 ~]# mv /etc/ntp.conf /etc/ [root@PTS0009 ~]# mv /var/run/ /var/run/ 5) Configure SCAN (Single Client Access Name: I have DNS setup in my network so I will use the same. If you dont have DNS setup you can hardcode these IP addresses under /etc/hosts file. SCAN using DNS: 1) Add Scan entry on DNS server with 3 IP addresses for same host. Enable Round Robin on DNS (Demo: Ex: ORARAC-SCAN:
  • Santosh Kangane Oracle DBA ORARAC-SCAN: ORARAC-SCAN: 2) Once the entry is added in DNS test it from Local Client as root@PTS0009:~# nslookup orarac-scan Server: Address: Name: orarac-scan Address: Name: orarac-scan Address: Name: orarac-scan Address: If you execute this command multiple times, you will notice that the list of IP addresses is varying in Round robin fashion. If not then ask your DNS admin to enable round robin on server. 3) These above 3 IP addresses are Virtual IPs. So your Ping should fail for each of them till the time we install Grid clusterware.> 6) make sure each of the nodes has following Packages Installed: Oracle Software Prerequisites Install required packages: binutils- compat-libstdc++-33-3.2.3 elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5 kernel-headers-2.6.18 ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc++-4.1.2 libstdc++-devel-4.1.2 make-3.81 numactl-devel-0.9.8.i386 sysstat-7.0.2 unixODBC-2.2.11 unixODBC-devel-2.2.11 iscsi-initiator-utils- /dev/sda1 Added /dev/ocr to /etc/sysconfig/devlabel [root@PTS0006 Libs]# devlabel add -d /dev/sdb1 -s /dev/oradata SYMLINK: /dev/oradata -> /dev/sdb1 Added /dev/oradata to /etc/sysconfig/devlabel [root@PTS0006 Libs]# devlabel add -d /dev/sdc1 -s /dev/ocfs2 [root@PTS0006 Libs]# cat /etc/sysconfig/devlabel # devlabel configuration file # # This file should generally not be edited by hand. # Instead, use the /sbin/devlabel program to make changes. # devlabel by Gary Lerhaupt # # format: # or format: /dev/ocr /dev/sda1 S83.1:49455400000000006c756e30000000000000000000000000IETVIRTUAL- DISKsector32
  • Santosh Kangane Oracle DBA /dev/oradata /dev/sdb1 S83.1:49455400000000006c756e31000000000000000000000000IETVIRTUAL-DISKsector32- 118425599 2) Update the /etc/rc.local files (All RAC nodes): After reboot of RAC nodes, the devlabel does not get started automatically so add the reload command in /etc/rc.local [root@PTS0006 Libs]# devlabel reload SYMLINK: /dev/ocr -> /dev/sda1 SYMLINK: /dev/oradata -> /dev/sdb1 [root@PTS0006 Libs]# vi /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you dont # want to do the full Sys V style init stuff. touch /var/lock/subsys/local service iscsi restart devlabel reload echo "Just to check if all Ethernet are up" ifup eth0 ifup eth1Steps for Oracle RAC: 1) Create group: dba, oinstall, asmadmin, asmdba, asmoper on all the nodes for Oracle software and ASM 2) Create users: Oracle (For oracle software owner) and grid (for oracle cluster owner) as follows: $ id grid uid=501(grid) gid=501(oinstall) groups=501(oinstall),502(asmadmin),503(asmdba),504(asmoper) $ id oracle uid=500(oracle) gid=501(oinstall) groups=501(oinstall),500(dba),503(asmdba) 3) Configure Oracle ASM: [root@PTS0009]# oracleasm configure ORACLEASM_ENABLED=false ORACLEASM_UID= ORACLEASM_GID= ORACLEASM_SCANBOOT=true ORACLEASM_SCANORDER="" ORACLEASM_SCANEXCLUDE="" [root@PTS0009]# oracleasm configure -i Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ([]). Hitting without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: grid Default group to own the driver interface []: asmadmin Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done [root@PTS0009]# oracleasm configure ORACLEASM_ENABLED=true
  • Santosh Kangane Oracle DBA ORACLEASM_UID=grid ORACLEASM_GID=asmadmin ORACLEASM_SCANBOOT=true ORACLEASM_SCANORDER="" ORACLEASM_SCANEXCLUDE="" [root@PTS0009]#4) Load Oracle ASM: a. Check Current status [root@PTS0009]# oracleasm status Checking if ASM is loaded: no Checking if /dev/oracleasm is mounted: no b. Init Oracle ASM [root@PTS0009]# oracleasm init Creating /dev/oracleasm mount point: /dev/oracleasm Loading module "oracleasm": oracleasm Mounting ASMlib driver filesystem: /dev/oracleasm [root@PTS0009]# oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [root@PTS0009]# c.Create ASM Disks [root@PTS0006 systemfiles]# oracleasm createdisk VOTE1 /dev/sda1 Writing disk header: done Instantiating disk: done [root@PTS0006 systemfiles]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... [root@PTS0006 systemfiles]# oracleasm listdisks VOTE1 > [root@PTS0009 systemfiles]# oracleasm scandisks Reloading disk partitions: done Cleaning any stale ASM disks... Scanning system for ASM disks... Instantiating disk "VOTE1" [root@PTS0009 s