+ All Categories
Home > Documents > Oracle 11gR2 RAC Installation

Oracle 11gR2 RAC Installation

Date post: 27-Nov-2015
Category:
Upload: saeed-meethal
View: 59 times
Download: 7 times
Share this document with a friend
15
Yahoo! White Paper Oracle 11gR2 Real Application Clusters Installation using Automatic Storage Management By Ashwin Nellore Ritesh Rajkaran Chhajer SE&O DBA Team
Transcript
Page 1: Oracle 11gR2 RAC Installation

Yahoo! White Paper       

    

Oracle 11gR2 Real Application Clusters Installation using Automatic Storage 

Management             

 By 

Ashwin Nellore Ritesh Rajkaran Chhajer 

SE&O DBA Team 

Page 2: Oracle 11gR2 RAC Installation

Yahoo! White Paper    

INTRODUCTION Oracle offers Database 11gR2 Enterprise Edition for fulfilling specific business requirements by Enterprise level customers.  Oracle Real Application Clusters enhances the already existing database specific features by adding high availability, scalability and failover capabilities which enable Yahoo! to exploit them as a back‐end for its mission‐critical applications and reporting environments.  Oracle released 11g Release 2 in September, 2009 to customers introducing new features across the board for Application Development, Business Intelligence and Data Warehousing, Clustering, Database, Diagnostics, Information Integration, Performance, Security and Server Manageability.  Filtering these from a database perspective, features like Advanced Compression, Active Dataguard and most importantly Grid Infrastructure Services for Oracle Real Application Clusters (RAC) and additional features in Oracle’s volume manager – Automatic Storage Management (ASM) were the key changes which involved an entirely different learning curve from a Database Administrator’s perspective.  We are already familiar with the concept of Oracle Real Application Clusters in terms of running multiple instances of the same database across multiple servers monitored by a set of global and local daemons to ensure high availability, linear scalability and failover in case of server crashes or hardware issues.  We have been able to successfully deploy such clustered environments across the board for 95% + of Oracle databases in Production as well as Non‐Production (DEV, QA, INT and STG) currently being supported by the SE&O DBA Team.  Oracle ASM is a volume manager and a file system for Oracle Database files introduced with Oracle 10g in 2004.  It supports single‐instance as well as RAC configuration and provides an alternative to conventional volume managers, file systems and raw devices which have been in use.  At Yahoo! our ASM deployments reside primarily on EMC’s DMX and Clariion family of SAN providers.  We have successfully utilized this solution for both our OLTP as well as Data Warehouse environments, case in point being Rightmedia (NGD) running 2 active‐active 5‐node Oracle 10.2.0.4 RAC and ASM on EMC CX‐960 in SP2 and AC4 for OLTP and our Data Warehouse environment Edward running a 10‐node Oracle 10.2.0.4 RAC and ASM on EMC DMX in SP1 and AC4 colos.  Understandably, we were quite excited by Oracle’s 11gR2 RAC and ASM enhancements and decided to exploit these features for our Data and Analytics (DNA) project which is expected to empower Y! employees around the globe to measure and understand the health of Yahoo! Products, Audience and Networks by processing feeds coming from Yahoo! Grid within a 11gR2 database and generating MSTR and Microstrategy Reports for Product managers at Yahoo! make data driven decisions.  With this, we set out to architect our first major 11gR2 deployment. 

Page 3: Oracle 11gR2 RAC Installation

Yahoo! White Paper    

ARCHITECTURE The production database architecture is comprised of 6 Dell PowerEdge R710 servers running RHEL 5.3 Linux x86_64 architecture with 72 GB RAM each and 2 quad‐port QLogic NIC cards connected via Brocade 5300 Fiber switch to an EMC Clariion CX4‐960 SAN device with a capacity of 41T usable space carved into LUNs of 1T each.  Infiniband switches were configured to use IP over Infiniband (IPoIB) resulting in improved bandwith, latency and reliability characteristics as compared to Gigabit Ethernet.  In our case, these were configured to provide a throughput of 20 GB/sec.    O/S specific Oracle ASM Libraries http://www.oracle.com/technology/tech/linux/asmlib/index.html were installed and configured on each host.  These libraries enable O/S daemons of Oracle ASM to write information into the Disk headers of each LUN and mark it as an ASM‐specific disk and detecting them during startup.  For Real Application Clusters, the entire Oracle Clusterware stack has been re‐architected with the major notable points being 

‐ Oracle Clusterware and Oracle ASM reside under a single Grid Infrastructure Home (Grid Home) which is independent of Oracle Database Home. 

‐ Oracle Cluster Registry (OCR) File responsible for managing all resources in a cluster and Voting Disk which is responsible for node membership can be stored within Oracle ASM. 

‐ New daemons introduced with 11gR2 grid stack for managing resources.  Their dependencies and runtime sequence are highlighted in the diagram below. 

‐ Oracle High Availability Services Daemon (OHASD) is the lower level stack while Cluster Ready Services (CRS) is the higher level stack in Oracle Clusterware. 

‐ Cluster Time synchronization service can be used instead of Network Time Protocol (NTP).  On ASM side, the major changes are as below 

‐ CRS and Voting files are stored within ASM under any disk group configured during installation, occupying about 300 MB of space. 

‐ ASM Cluster File System (ACFS) has been introduced to store application files on ASM as well. ‐ Major enhancements have been done on ASMCMD – the command line utility, most importantly 

the features to backup diskgroup metadata in case of header corruption and copying of files from ASM to non‐ASM and vice‐versa. 

‐ A new role of SYSASM is defined which owns ASM database separate from SYSDBA account. ‐ Intelligent Data Placement feature introduced in 11gR2 enables frequently accessed data to be 

placed on the outermost tracks of the disk for faster access. ‐ The default Allocation Unit (AU) size of an ASM granule which is 1M can be changed upto 64M 

while creating diskgroups. 

Page 4: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

 Image Source: Metalink Note: 1053147.1 

 INSTALLATION 

Highlighted below are screenshots from the 11gR2 installation which was performed using the Graphical User Interface (GUI) and Silent mode.  Comparing this to a 10g RAC Installation, you will find major differences in the Clusterware installation segment.  We will go through the installation screenshots and describe any new features/changes accordingly.  Before we initiate installation, there are certain pre‐requisites to be fulfilled for Oracle to instantiate.  RPMS The list of O/S specific rpm’s for RHEL 5.3 Linux x86_64 were installed and configured.  Additional rpms for 11gR2 installation are unixODBC related which need to be configured only if ODBC setup is being utilized.   

Page 5: Oracle 11gR2 RAC Installation

Yahoo! White Paper   ASM ASMLib 2.0 related rpms on each RAC host which are O/S and Kernel version specific, need to be installed as root user # rpm ‐Uvh oracleasm‐support‐2.1.3‐1.el5.x86_64.rpm # rpm ‐Uvh oracleasm‐2.6.18‐128.el5‐2.0.5‐1.el5.x86_64.rpm # rpm ‐Uvh oracleasmlib‐2.0.4‐1.el5.x86_64.rpm  Since Powerpath software is installed for EMC SAN, we will format the disks and create ASM disks using the below procedure: ‐  #/etc/init.d/oracleasm configure  We follow LUN ‐> Disk mapping in an order where every LUN number should correspond to the Disk number e.g. LUN 1 ‐> DISK1 etc.  Using fdisk we will format all the emcpower* devices listed under /proc/partitions Once formatted, we will create ASM disks for all the LUNs using the below procedure: ‐  #/etc/init.d/oracleasm createdisk DISK1 /dev/emcpoweraj1 … We will scan the disks on all other cluster nodes so that they are visible across the entire cluster #/etc/init.d/oracleasm scandisks #/etc/init.d/oracleasm listdisks  USERS & GROUPS Create Oracle user ‘oracle’ and primary group ‘dba’ which will own the Oracle software on each server. The uid and gid of the user should be the same across all the nodes in a cluster. Create home directories for ‘oracle’ user and also a separate directory where Oracle Grid Infrastructure will be installed.  The concept of Oracle Base is extremely important starting with 11gR2.    It is mandatory to create this Oracle Base as a separate directory from Oracle Grid Infrastructure Post‐installation, Oracle changes permissions of Grid Home to root and hence Grid Home and Database Home cannot reside under the same parent directory  # groupadd ‐g 500 dba # useradd ‐u 500 ‐d /home/oracle ‐g dba ‐G dba ‐s /usr/local/bin/zsh oracle # ln ‐s /home/oracle /oracle # mkdir /home/oragrid # ln ‐s /home/oragrid /oragrid # ls ‐l /oracle /oragrid # chown ‐R oracle:dba /home/oracle # chown ‐R oracle:dba /home/oragrid  

Page 6: Oracle 11gR2 RAC Installation

Yahoo! White Paper   SCAN (Single Client Access Name) is the virtual hostname to provide for all clients connecting to the cluster.  SCAN is a domain name registered to at least one and up to three IP addresses, either in the domain name service (DNS) or the Grid Naming Service (GNS). 

By default, the name used as the SCAN is also the name of the cluster and must be globally unique throughout your enterprise.  SCAN VIP addresses must be on the same subnet as virtual IP addresses and public IP addresses. 

For installation to succeed, the SCAN NAME and IP must be defined and must resolve to at least one address. 

Because the SCAN is associated with the cluster as a whole, rather than to a particular node, the SCAN makes it possible to add or remove nodes from the cluster without needing to reconfigure clients. It also adds location independence for the databases, so that client configuration does not have to depend on which nodes are running a particular database. 

NTP 

Since we are using Network Time Protocol (NTP) for synchronization of time across all the servers in the cluster, a mandatory requirement with 11gR2 is to enable the slewing option by adding ‘‐x’ argument in the ntp configuration file as seen below: ‐ 

 # cat /etc/sysconfig/ntpd # Drop root to id 'ntp:ntp' by default. OPTIONS="‐x ‐u ntp:ntp ‐p /var/run/ntpd.pid"  # Set to 'yes' to sync hw clock after successful ntpdate SYNC_HWCLOCK=no  # Additional options for ntpdate NTPDATE_OPTIONS=""  CLUVFY To verify if the installation fulfills the User equivalence, SSH setup, User&Group information as well as Public, VIP and Interconnect information we run the cluster verification utility provided by Oracle from the Grid software location/DVD  #./runcluvfy.sh stage ‐pre crsinst ‐n node1,node2 ‐verbose  Let us walk through the screenshots for Oracle Grid Infrastructure (Clusterware) installation: ‐   

Page 7: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

  After choosing ‘Install and Configure Grid Infrastructure for a Cluster’, we proceed with ‘Advanced Installation’ and choose the ‘Languages’ we want the installation to reach to the SCAN Name screen.  

  Without SCAN Name, the installation will not proceed in case of a new 11gR2 Installation or even upgrade of a 10gR2 installation.  Please work with SA Team to get a SCAN name which is unique for the cluster.  

Page 8: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

  We provide the list of servers and Virtual IP’s in this screen which will comprise our RAC cluster.    

  The public network is configured on eth0 and private interconnect for cluster communication is configured on ib0 (Infiniband).  

Page 9: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

  OCR and Voting disks will be stored within ASM under diskgroup +DG_ARCH which will also be a placeholder for Oracle’s archive log files and since we have implemented RAID 5, we will be using external redundancy for both these files.  

  IPMI (Intelligent Platform Management Interface) is a new feature where hardware based controllers are configured for member‐kill escalation and node fencing operations without co‐operation from Clusterware.     

Page 10: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

  Oracle Base and Grid Home are under separate directories which is mandatory for 11gR2 Installation.  

  This is a new screen for the installer, where all the pre‐requisites are verified and a column ‘Fixable’ ensures that a runtime script runfixup.sh is generated and when run, fixes all parameters which can be modified online.  

Page 11: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

  The above screen ensures that installation was completed and root.sh should be run on all cluster nodes to configure and start the Grid Infrastructure daemons. # sh root.sh Running Oracle 11g root.sh script... The following environment variables are set as:     ORACLE_OWNER= oracle     ORACLE_HOME=  /oragrid/product/11.2 Enter the full pathname of the local bin directory: [/usr/local/bin]:    Copying dbhome to /usr/local/bin ...    Copying oraenv to /usr/local/bin ...    Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product‐specific root actions will be performed. 2010‐04‐28 13:48:29: Parsing the host name 2010‐04‐28 13:48:29: Checking for super user privileges 2010‐04‐28 13:48:29: User has super user privileges Using configuration parameter file: /oragrid/product/11.2/crs/install/crsconfig_params Creating trace directory LOCAL ADD MODE Creating OCR keys for user 'root', privgrp 'root'.. Operation successful.   root wallet   root wallet cert   root cert export   peer wallet   profile reader wallet   pa wallet   peer wallet keys   pa wallet keys   peer cert request   pa cert request   peer cert   pa cert   peer root cert TP   profile reader root cert TP 

Page 12: Oracle 11gR2 RAC Installation

Yahoo! White Paper     pa root cert TP   peer pa cert TP   pa peer cert TP   profile reader pa cert TP   profile reader peer cert TP   peer user cert   pa user cert Adding daemon to inittab CRS‐4123: Oracle High Availability Services has been started. ohasd is starting CRS‐2672: Attempting to start 'ora.gipcd' on 'gq1‐dnadb‐001' CRS‐2672: Attempting to start 'ora.mdnsd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.gipcd' on 'gq1‐dnadb‐001' succeeded CRS‐2676: Start of 'ora.mdnsd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.gpnpd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.gpnpd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.cssdmonitor' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.cssdmonitor' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.cssd' on 'gq1‐dnadb‐001' CRS‐2672: Attempting to start 'ora.diskmon' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.diskmon' on 'gq1‐dnadb‐001' succeeded CRS‐2676: Start of 'ora.cssd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.ctssd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.ctssd' on 'gq1‐dnadb‐001' succeeded ASM created and started successfully. DiskGroup DG_ARCH created successfully. clscfg: ‐install mode specified Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS‐2672: Attempting to start 'ora.crsd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.crsd' on 'gq1‐dnadb‐001' succeeded CRS‐4256: Updating the profile Successful addition of voting disk 57c48a165f8d4fcbbff98bf735ff0784. Successfully replaced voting disk group with +DG_ARCH. CRS‐4256: Updating the profile CRS‐4266: Voting file(s) successfully replaced ##  STATE    File Universal Id                File Name Disk group ‐‐  ‐‐‐‐‐    ‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐‐                ‐‐‐‐‐‐‐‐‐ ‐‐‐‐‐‐‐‐‐  1. ONLINE   57c48a165f8d4fcbbff98bf735ff0784 (ORCL:DISK1) [DG_ARCH] Located 1 voting disk(s). CRS‐2673: Attempting to stop 'ora.crsd' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.crsd' on 'gq1‐dnadb‐001' succeeded CRS‐2673: Attempting to stop 'ora.asm' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.asm' on 'gq1‐dnadb‐001' succeeded CRS‐2673: Attempting to stop 'ora.ctssd' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.ctssd' on 'gq1‐dnadb‐001' succeeded CRS‐2673: Attempting to stop 'ora.cssdmonitor' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.cssdmonitor' on 'gq1‐dnadb‐001' succeeded CRS‐2673: Attempting to stop 'ora.cssd' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.cssd' on 'gq1‐dnadb‐001' succeeded CRS‐2673: Attempting to stop 'ora.gpnpd' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.gpnpd' on 'gq1‐dnadb‐001' succeeded CRS‐2673: Attempting to stop 'ora.gipcd' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.gipcd' on 'gq1‐dnadb‐001' succeeded CRS‐2673: Attempting to stop 'ora.mdnsd' on 'gq1‐dnadb‐001' CRS‐2677: Stop of 'ora.mdnsd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.mdnsd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.mdnsd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.gipcd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.gipcd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.gpnpd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.gpnpd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.cssdmonitor' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.cssdmonitor' on 'gq1‐dnadb‐001' succeeded 

Page 13: Oracle 11gR2 RAC Installation

Yahoo! White Paper   CRS‐2672: Attempting to start 'ora.cssd' on 'gq1‐dnadb‐001' CRS‐2672: Attempting to start 'ora.diskmon' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.diskmon' on 'gq1‐dnadb‐001' succeeded CRS‐2676: Start of 'ora.cssd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.ctssd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.ctssd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.asm' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.asm' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.crsd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.crsd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.evmd' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.evmd' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.asm' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.asm' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.DG_ARCH.dg' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.DG_ARCH.dg' on 'gq1‐dnadb‐001' succeeded CRS‐2672: Attempting to start 'ora.registry.acfs' on 'gq1‐dnadb‐001' CRS‐2676: Start of 'ora.registry.acfs' on 'gq1‐dnadb‐001' succeeded gq1‐dnadb‐001     2010/04/28 13:52:44     /oragrid/product/11.2/cdata/gq1‐dnadb‐001/backup_20100428_135244.olr Preparing packages for installation... cvuqdisk‐1.0.7‐1 Configure Oracle Grid Infrastructure for a Cluster ... succeeded Updating inventory properties for clusterware Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB.   Actual 12287 MB    Passed The inventory pointer is located at /etc/oraInst.loc The inventory is located at /oracle/oraInventory 'UpdateNodeList' was successful. 

 After running this script on all nodes, Oracle Grid Infrastructure should be up and running on all the nodes and can be verified using the below command: ‐ #<GRID_HOME>/bin/crsctl status resource –t  Once, Grid Infrastructure Installation is completed successfully we will proceed with installing Oracle Database software on all the cluster nodes.  

   

Page 14: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

  Choose all nodes of the cluster to install Oracle RAC Database software  

  Oracle Home is configured under /oracle/product/11.2 

Page 15: Oracle 11gR2 RAC Installation

Yahoo! White Paper   

  The new pre‐requisite check feature is available for Database software installation too.  

  Finally, after completing the Database software installation and running root.sh on all cluster nodes we can conclude the installation of Oracle 11gR2 Real Application Clusters and Automatic Storage Management installation.  

CONCLUSION There are major differences in the Clusterware stack for 11gR2 as compared to 10gR2 and every Database Administrator should go through the 11gR2 technical stack to understand the changes Oracle has made. 


Recommended