Oracle RAC.docx

download Oracle RAC.docx

of 18

Transcript of Oracle RAC.docx

  • 7/29/2019 Oracle RAC.docx

    1/18

    1.1 Install VMWare Server on Windows Machine

    Download and install VMWare Server fromVMWare Site (click here)(Download windows version as we are installing on windowsdesktop/laptop). You have to register for VMware Server on site mentioned above to recieve licence key used ininstallation of VMWare Server

    1.2 Create Virtual Machine

    --Start VM Ware server console from Start Menu on your windows operating system

    --Create a New Virtual Machine by Ctrl + N orFile -> New -> Virtual Machine (From Console Tool Bar)

    http://www.vmware.com/products/serverhttp://www.vmware.com/products/serverhttp://www.vmware.com/products/serverhttp://4.bp.blogspot.com/_LrtEX0cTLgI/RpIW4Iuj9DI/AAAAAAAAApE/pO8CV_J7RjY/s1600-h/vmlnx2.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/RpIW-Iuj9EI/AAAAAAAAApM/_JYjaILpZfA/s1600-h/vmlnx1.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/RpIW4Iuj9DI/AAAAAAAAApE/pO8CV_J7RjY/s1600-h/vmlnx2.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/RpIW-Iuj9EI/AAAAAAAAApM/_JYjaILpZfA/s1600-h/vmlnx1.jpghttp://www.vmware.com/products/server
  • 7/29/2019 Oracle RAC.docx

    2/18

    Since we are installing Red Hat Enterprise Linux 3 so I have selected Version Red Hat Enterprise Linux 3

    Select location where you wish to keep thisRACMachine Configuration and Linux Disks

    http://2.bp.blogspot.com/_LrtEX0cTLgI/RpIWkouj9BI/AAAAAAAAAo0/QGaWLQ2H6Nw/s1600-h/vmlnx4.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/RpIWrouj9CI/AAAAAAAAAo8/jqbEGGxx0hA/s1600-h/vmlnx3.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/RpIWkouj9BI/AAAAAAAAAo0/QGaWLQ2H6Nw/s1600-h/vmlnx4.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/RpIWrouj9CI/AAAAAAAAAo8/jqbEGGxx0hA/s1600-h/vmlnx3.jpg
  • 7/29/2019 Oracle RAC.docx

    3/18

    Create this Linux Machine of size 15 GB, we will add another 5GB each for voting disk, ocrand ASM for data files.

    1.3 Download/Order and install Red Hat Linux E.S. 3

    http://3.bp.blogspot.com/_LrtEX0cTLgI/RpITq4uj8_I/AAAAAAAAAok/ejn9vN6qxzY/s1600-h/vmlnx6.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpIWd4uj9AI/AAAAAAAAAos/kqGr1xY7O-g/s1600-h/vmlnx5.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpITq4uj8_I/AAAAAAAAAok/ejn9vN6qxzY/s1600-h/vmlnx6.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpIWd4uj9AI/AAAAAAAAAos/kqGr1xY7O-g/s1600-h/vmlnx5.jpg
  • 7/29/2019 Oracle RAC.docx

    4/18

    Download red hat enterprise server linux version 3 fromhttp://rhn.redhat.com/(You can install any other linux version oroperating system depending on availability. For this step by step Oracle RAC installation, I used Red Hat ES 3)

    If you have downloaded Red Hat ES burn them as iso images.

    Insert Disk1 of Red Hat Linux ES3 in your desktop/laptop and start RAC1 virtual Machine created above

    During Disk Setup selectAutomatic Disk Partitionand when you get this screen edit by clicking edit button andchange swap space to 1500 MB

    http://rhn.redhat.com/http://rhn.redhat.com/http://rhn.redhat.com/http://1.bp.blogspot.com/_LrtEX0cTLgI/RpIeBYuj9KI/AAAAAAAAAp8/e1v2gH28INU/s1600-h/vmlnx10.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpIeKYuj9LI/AAAAAAAAAqE/3HQ2o11GmU8/s1600-h/vmlnx8.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpIeBYuj9KI/AAAAAAAAAp8/e1v2gH28INU/s1600-h/vmlnx10.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpIeKYuj9LI/AAAAAAAAAqE/3HQ2o11GmU8/s1600-h/vmlnx8.jpghttp://rhn.redhat.com/
  • 7/29/2019 Oracle RAC.docx

    5/18

    During Package Selection, Select Customize Package list and Add KDE DesktopEnvironment andDevelopment Tools from list

    http://1.bp.blogspot.com/_LrtEX0cTLgI/RpIdvYuj9II/AAAAAAAAAps/YKlkPzfSftw/s1600-h/vmlnx12.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpId4Yuj9JI/AAAAAAAAAp0/4gl-nGrS7l0/s1600-h/vmlnx11.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpIdvYuj9II/AAAAAAAAAps/YKlkPzfSftw/s1600-h/vmlnx12.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpId4Yuj9JI/AAAAAAAAAp0/4gl-nGrS7l0/s1600-h/vmlnx11.jpg
  • 7/29/2019 Oracle RAC.docx

    6/18

    Select No Firewall

    During hostname enter machine name as rac1.focusthread.com this you can change later as well

    1.4 Create User oracle:oracle

    Create operating system user oracle (By default it will create group oracle and assign this to user oracle ). You can use GUI asshown below or command useradd

    Coming Next

    Adding VirtualNetwork Card , Virtual Disks, installRPMs, Cloning RAC1 to RAC2 Machine, Configure User Equivalency........

    http://3.bp.blogspot.com/_LrtEX0cTLgI/RpIdU4uj9FI/AAAAAAAAApU/vv1U_lyq5xI/s1600-h/vmlnx14.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/RpIdcouj9GI/AAAAAAAAApc/7u2whXIccFE/s1600-h/vmlnx13.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpIdU4uj9FI/AAAAAAAAApU/vv1U_lyq5xI/s1600-h/vmlnx14.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/RpIdcouj9GI/AAAAAAAAApc/7u2whXIccFE/s1600-h/vmlnx13.jpg
  • 7/29/2019 Oracle RAC.docx

    7/18

    In this Part II, We will install required linux operating package for clusterware & database, additional hard disk (votingdisk, ocr and ASM), network card for interconnect and configure newly added hard disk and network card.

    Install rpms------------------------

    Install following rpms (These rpms are in Red Hat ES CDs or download them from rhn.redhat.com ) and install themusing root account

    (compat-glibc-7.x-2.2.4.32.6.i386.rpm, gnome-libs-1.4.1.2.90-34.2.i386.rpm, sysstat-4.0.7-4.EL3.3.i386.rpm )

    rpm ivh compat-glibc-7.x-2.2.4.32.6.i386.rpmrpm ivh gnome-libs-1.4.1.2.90-34.2.i386.rpmrpm ivh sysstat-4.0.7-4.EL3.3.i386.rpm

    Create Shared Disk on Virtual Machinefor Cluster Registry, Voting Disk and ASM

    --------------------------------------------------------------Shutdown linux machine RAC1 (installed in part I) as shutdown now (from root user)--Create folder shared inlocation c:\atul\VMWARE (or any other location of your choice)--From VM Ware Console Press Ctrl + D to see Virtual Machine Settings

    Or from screen

    Click on Edit Virtual Machine Setting

    http://4.bp.blogspot.com/_LrtEX0cTLgI/Rpaz394wgjI/AAAAAAAAAtE/1kyzS-i1Ink/s1600-h/vmlnx17.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/Rpaz9t4wgkI/AAAAAAAAAtM/ECHiH4kI964/s1600-h/vmlnx16.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpaz394wgjI/AAAAAAAAAtE/1kyzS-i1Ink/s1600-h/vmlnx17.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/Rpaz9t4wgkI/AAAAAAAAAtM/ECHiH4kI964/s1600-h/vmlnx16.jpg
  • 7/29/2019 Oracle RAC.docx

    8/18

    Click on Add

    Click on Next

    Select Hard Disk as shown here and clickNext

    http://4.bp.blogspot.com/_LrtEX0cTLgI/Rpazl94wggI/AAAAAAAAAss/oU-ZyHU8Ahc/s1600-h/vmlnx20.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpazsN4wghI/AAAAAAAAAs0/HtAgz4IVxwg/s1600-h/vmlnx19.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpazx94wgiI/AAAAAAAAAs8/2LmOix3noL0/s1600-h/vmlnx18.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpazl94wggI/AAAAAAAAAss/oU-ZyHU8Ahc/s1600-h/vmlnx20.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpazsN4wghI/AAAAAAAAAs0/HtAgz4IVxwg/s1600-h/vmlnx19.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpazx94wgiI/AAAAAAAAAs8/2LmOix3noL0/s1600-h/vmlnx18.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpazl94wggI/AAAAAAAAAss/oU-ZyHU8Ahc/s1600-h/vmlnx20.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpazsN4wghI/AAAAAAAAAs0/HtAgz4IVxwg/s1600-h/vmlnx19.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpazx94wgiI/AAAAAAAAAs8/2LmOix3noL0/s1600-h/vmlnx18.jpg
  • 7/29/2019 Oracle RAC.docx

    9/18

    SelectCreate a New Virtual Disk and click Next

    Select SCSI and click Next

    Select 5.0 GB forvoting diskand 5.0 GB for ocr (add second disk of 5 GB forocr using same method) and 8 GB forasm (add third disk of 8 GB for ASMusing same method)

    http://3.bp.blogspot.com/_LrtEX0cTLgI/RpazXt4wgeI/AAAAAAAAAsc/B_P5NV2XKlA/s1600-h/vmlnx22.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpazed4wgfI/AAAAAAAAAsk/UkdQlcwlA0w/s1600-h/vmlnx21.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpazXt4wgeI/AAAAAAAAAsc/B_P5NV2XKlA/s1600-h/vmlnx22.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpazed4wgfI/AAAAAAAAAsk/UkdQlcwlA0w/s1600-h/vmlnx21.jpg
  • 7/29/2019 Oracle RAC.docx

    10/18

    Enter location and disk file name in foldersharedcreated above.Note* SelectvotingDiskfor disk one created ,ocr for second disk created andasm for third disk created .This namedoesn't matter and this is for our understanding only.Click Finish

    Repeat above step of adding disk for ocr and asm. Finally you should see Hard Disk 2,3,4

    Hard Disk 2 : for votingDisk (5 GB)Hard Disk 3 : for ocr (5 GB)Hard Disk 4 : for ASM (8GB)

    This completes addition of hard disk (How to configure and share these hard disks coming next ..)

    Adding Network Card for Interconnect----------------------------

    http://1.bp.blogspot.com/_LrtEX0cTLgI/RpazJN4wgcI/AAAAAAAAAsM/deqNijpeP_o/s1600-h/vmlnx24.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/RpazPd4wgdI/AAAAAAAAAsU/hpHbcT9WhvU/s1600-h/vmlnx23.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpazJN4wgcI/AAAAAAAAAsM/deqNijpeP_o/s1600-h/vmlnx24.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/RpazPd4wgdI/AAAAAAAAAsU/hpHbcT9WhvU/s1600-h/vmlnx23.jpg
  • 7/29/2019 Oracle RAC.docx

    11/18

    Next step is to create network card, there is already an existing network card which is used as public connection forconnecting to this machine and database isnatance on this machine and new card will be used oracle clusterware asprivate inerconnect between two nodes of RAC i.e. RAC1 and RAC2. This private interconnect is used for clusterwaretalking to all remote nodes in cluster.From VMWare Console press Ctrl + D

    Select Ethernet Adapter this time and click Next

    http://4.bp.blogspot.com/_LrtEX0cTLgI/Rpay494wgaI/AAAAAAAAAr8/K-8egE96s-c/s1600-h/vmlnx26.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpay_94wgbI/AAAAAAAAAsE/RCk4uc62kCg/s1600-h/vmlnx25.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpay494wgaI/AAAAAAAAAr8/K-8egE96s-c/s1600-h/vmlnx26.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/Rpay_94wgbI/AAAAAAAAAsE/RCk4uc62kCg/s1600-h/vmlnx25.jpg
  • 7/29/2019 Oracle RAC.docx

    12/18

    SelectBridgedand clickFinish

    Now Start your linux Virtual Machine

    On start of linux Virtual Machine you linux machine will detect newly added network card which you can configure now(at boot time only) or you can configure later as well.

    Press Any Key to enter into setup part of network card

    http://2.bp.blogspot.com/_LrtEX0cTLgI/Rpayrd4wgYI/AAAAAAAAArs/9FuGZrMMPhI/s1600-h/vmlnx28.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpayyd4wgZI/AAAAAAAAAr0/7iRs5ck_RRk/s1600-h/vmlnx27.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpayrd4wgYI/AAAAAAAAArs/9FuGZrMMPhI/s1600-h/vmlnx28.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpayyd4wgZI/AAAAAAAAAr0/7iRs5ck_RRk/s1600-h/vmlnx27.jpg
  • 7/29/2019 Oracle RAC.docx

    13/18

    SelectConfigureand click enetr or you can configure it later as well

    Enter following detailsIP Address -----------------192.168.0.101Netmask ------------------- 255.255.255.0Default Gateway --------- 192.168.0.254Primary Nameserver ---- 192.168.0.1

    and select OK and press enter

    Login asRoot User when prompted to login

    Above we configured newly added network card eth1 (used for interconnect).

    http://1.bp.blogspot.com/_LrtEX0cTLgI/RpaydN4wgWI/AAAAAAAAArc/B4TABsNCV-E/s1600-h/vmlnx30.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/Rpaykt4wgXI/AAAAAAAAArk/0wi9qy8TMgs/s1600-h/vmlnx29.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpaydN4wgWI/AAAAAAAAArc/B4TABsNCV-E/s1600-h/vmlnx30.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/Rpaykt4wgXI/AAAAAAAAArk/0wi9qy8TMgs/s1600-h/vmlnx29.jpg
  • 7/29/2019 Oracle RAC.docx

    14/18

    With below method we will configure original networkcard (for public connection)

    Syetem Setting -> Network

    select eth0and clickEdit

    Add entry like----------------------Address 192.168.1.101Subnet Mask 255.255.255.0Default Gateway Address 192.168.0.254

    http://1.bp.blogspot.com/_LrtEX0cTLgI/RpayEN4wgTI/AAAAAAAAArE/xIedx9CpRi4/s1600-h/vmlnx32.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpayMt4wgUI/AAAAAAAAArM/lB2ABrULvc4/s1600-h/vmlnx32.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpayVN4wgVI/AAAAAAAAArU/MOBxeqqryEc/s1600-h/vmlnx31.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpayEN4wgTI/AAAAAAAAArE/xIedx9CpRi4/s1600-h/vmlnx32.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpayMt4wgUI/AAAAAAAAArM/lB2ABrULvc4/s1600-h/vmlnx32.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpayVN4wgVI/AAAAAAAAArU/MOBxeqqryEc/s1600-h/vmlnx31.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpayEN4wgTI/AAAAAAAAArE/xIedx9CpRi4/s1600-h/vmlnx32.jpghttp://3.bp.blogspot.com/_LrtEX0cTLgI/RpayMt4wgUI/AAAAAAAAArM/lB2ABrULvc4/s1600-h/vmlnx32.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpayVN4wgVI/AAAAAAAAArU/MOBxeqqryEc/s1600-h/vmlnx31.jpg
  • 7/29/2019 Oracle RAC.docx

    15/18

    Click OK and activate this netowrk card

    Activateeth0 by clicking onActivatebutton

    Click onYes, when prompted to save network configuration

    Now you should see both network card eth0 and eth1 asActive

    http://1.bp.blogspot.com/_LrtEX0cTLgI/RpaxvN4wgQI/AAAAAAAAAqs/HT-hx3PjcTk/s1600-h/vmlnx36.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/Rpax2N4wgRI/AAAAAAAAAq0/he4MelzYt3s/s1600-h/vmlnx35.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpax9d4wgSI/AAAAAAAAAq8/LTm0WraQHKg/s1600-h/vmlnx34.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpaxvN4wgQI/AAAAAAAAAqs/HT-hx3PjcTk/s1600-h/vmlnx36.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/Rpax2N4wgRI/AAAAAAAAAq0/he4MelzYt3s/s1600-h/vmlnx35.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpax9d4wgSI/AAAAAAAAAq8/LTm0WraQHKg/s1600-h/vmlnx34.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpaxvN4wgQI/AAAAAAAAAqs/HT-hx3PjcTk/s1600-h/vmlnx36.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/Rpax2N4wgRI/AAAAAAAAAq0/he4MelzYt3s/s1600-h/vmlnx35.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpax9d4wgSI/AAAAAAAAAq8/LTm0WraQHKg/s1600-h/vmlnx34.jpg
  • 7/29/2019 Oracle RAC.docx

    16/18

    ifconfig , from root should show you result as shown in screenshot

    Format and Configure Virtual disks (voting disk, ocr and asm )----------------------------------------------------

    In this step We will format and configure Virtual Disks created above.

    From user root

    fdiskl(This is to see list of disks, You will see entry like /dev/sdb, /dev/sdc, /dev/sdd doesnt contain valid partitiontable)

    fdisk /dev/sdb (Means we are dealing with /dev/sdb)n (Create new disk)p (Of type primary partition)1 (First Cylinder)Enter (carriage return)Enter (carriage return)w (Save table to disk and exit)

    (For more information check man fdisk or below screenshot)Repeat above step for /dev/sdc and /dev/sdd

    http://1.bp.blogspot.com/_LrtEX0cTLgI/RpaxaN4wgOI/AAAAAAAAAqc/8VcX9TNMKGM/s1600-h/vmlnx38.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpaxod4wgPI/AAAAAAAAAqk/SHLbStn6_cQ/s1600-h/vmlnx37.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpaxaN4wgOI/AAAAAAAAAqc/8VcX9TNMKGM/s1600-h/vmlnx38.jpghttp://2.bp.blogspot.com/_LrtEX0cTLgI/Rpaxod4wgPI/AAAAAAAAAqk/SHLbStn6_cQ/s1600-h/vmlnx37.jpg
  • 7/29/2019 Oracle RAC.docx

    17/18

    So nowfdisk l you should details of /dev/sdb, dev/sdc, dev/sdd--Add These disks as raw devices in file /etc/sysconfig/rawdevices as/dev/raw/raw1 /dev/sdb1/dev/raw/raw2 /dev/sdc1/dev/raw/raw3 /dev/sdd1--Restart rawdevices service as service rawdevices restart

    Create directory /apps/oracle/oradata (For storing voting disk, ocr and ASM) as

    mkdirp /apps/oracle/oradata (From Root Account)

    -->Create symbolic link pointing to these raw devices so that we know which one is for what (Optional)

    ln s /dev/raw/raw1 /apps/oracle/oradata/ocrln s /dev/raw/raw2 /apps/oracle/oradata/votingdiskln s /dev/raw/raw3 /apps/oracle/oradata/asm--Change ownership of these directories to oracle:oraclechown oracle:oracle /dev/raw/raw1chown oracle:oracle /dev/raw/raw2chown oracle:oracle /dev/raw/raw3

    Shutdown this machine as this is now ready to clone and to create RAC2 machine.

    http://1.bp.blogspot.com/_LrtEX0cTLgI/RpaxEN4wgMI/AAAAAAAAAqM/Uo4oHpzMpuY/s1600-h/vmlnx40.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/RpaxM94wgNI/AAAAAAAAAqU/64o03Mo-sQ0/s1600-h/vmlnx39.jpghttp://1.bp.blogspot.com/_LrtEX0cTLgI/RpaxEN4wgMI/AAAAAAAAAqM/Uo4oHpzMpuY/s1600-h/vmlnx40.jpghttp://4.bp.blogspot.com/_LrtEX0cTLgI/RpaxM94wgNI/AAAAAAAAAqU/64o03Mo-sQ0/s1600-h/vmlnx39.jpg
  • 7/29/2019 Oracle RAC.docx

    18/18

    Coming Next-Cloning RAC1 to RAC2-Changing RAC2 network and hostname details-Configuring user equivalency-Installing clusterware 10.2.0.1-Installing Oracle rac database 10.2.0.1-Tips and Tricks of troubleshooting Oracle RAC Database and clusterware.....This is fourth post on step by step building Oracle RAC Database on your desktop / laptop using VMWare (VirtualMachine)