Moneycontrol Brokerage Recos

Wednesday, March 16, 2016

2 Node Oracle 11g R2 RAC Installation Part - I - Nodes and Shared Storage Preparation.




RAC Installation Part - I    -- Nodes and Shared Storage Preparation.  



Are you scared of RAC installation?

Are you just planning to go for course or training to do RAC only just because of its complex architecture and implementation?


Here just walk with me for a while with below outlined steps and tell me if you still have trouble in RAC Implementation on your personal laptop to get practised:-)


I have been receiving lots of request to write a paper on Oracle RAC implementation for practice newbies. It is quite challenging for those who never deployed RAC and want to try it on their own laptops / PC due to its complex architecture and shared storage availability. In order to install Oracle RAC(Real Application Cluster), we must have a shared storage configured there to hold all database files accessible to all nodes in the cluster configuration. In this post I will explain how we can prepare two virtual machines / nodes with a shared storage device shared between both nodes to install 2 Node Oracle RAC for our practice. In this 2 Node Oracle RAC configuration I have compromised to use host file for Public IPs, Private IPs, VIP and SCAN NAME / IPs instead of using DNS.


Let's proceed here with creating two virtual machines for our Oracle RAC implementation.


Note:- I have not put the screenshots for VM creation steps in this paper just to keep this paper light weight :-)



Create Virtual Machines in VMware Workstation:
===============================

=> Click on File Menu of VMware Workstation.
=> Click Next > Click Next.
=> Choose the option > I will install operating system later and click Next.
=> Select Linux under Guest Operating System region and and Select Version from drop down menu and Click Next.
=> Choose Virtual machine Name(RAC1 in my case) and the location where you want to store the configuration files for this virtual machine(E:\RAC-Nodes\Node01\, in my case)
=> Click on next at Processor Configuration window.
=> Specify Memory for the virtual machine(I choosen 2048M in my case).
=> Use default Network type(NAT in my case) and click on Next.
=> Select I/O controller types as LSI Logic(Recommended) and click on next.
=> Select a Device Type as SCSI(recommended) and click on Next.
=> Select "Create a new virtual Disk" and click on Next.
=> Specify Disk capacity : 30GB enough for 11g R2 and Select option "Allocate all disk space now"and "Store virtual disk as single file"and click on Next.
=> Provide complete path before Disk file : E:\RAC-Nodes\Node01\RAC1.vmdk and click On Next.
=> Click on Finish.....You're done here for the first virtual machine.


Note : - Create another virtual machine with name "RAC2" following same steps outlined above and install Linux OS in both VMs with following mount details at minimum in order to configure Oracle RAC.

------------------
/ 10GB

/swap 4096MG

/u01 10204MB

/boot 100MB

/tmp 4096MB



Step : 2 - Now let's add a separate Hard Disk device in our first virtual machine(RAC1) to be used as a shared storage between both nodes as follows.

First of all, create a separate folder (E:\RAC-Shared-Storage - in my case) to store this disk file separately in there.

=> Make sure you virtual machine(RAC1) is shut-down before adding a new disk to it.
=> Right click on Virtual Machine Name and then click on Settings.
=> On Virtual machine Setting window, click on Add.
=> Select Hard Disk as Hardware Type and click on Next.
=> Choose SCSI(recommended) as virtual disk type - and the most important on this page is select Independent Mode and persistent on this page and click on Next.
=> Select Create New Virtual Disk and click on Next.
=> Specify disk capacity (40GB or so) and select option Ällocate all disk space now and choose option Store virtual disk as a single file > click on Next.
=> Provide complete path for this disk file name(E:\RAC-Shared-Storage\ - in my case) and click on next.
=> Click on Finish.

IMP : As we added a new HDD to our fist node(RAC1) to be used as a shared storage for our RAC installation, we need to change the virtual device node controller to SCSI 1:0 from SCSI 0:1 - so in-order to do it go to virtual machine setting and click on Persistent Hard disk we added just above and click on Advance tab at right side and change to SCSI 1:0.


Step : 3 - Now let's configure the virtual machine(RAC1) configuration file so that newly added persistent hard disk can be shared/accessed by another node(RAC2).


=> Open the virtual machine configuration file(E:\RAC-Nodes\Node01\RAC1.vmx) of first Node(RAC1) in notepad. Before opening the file make a copy of that file as backup to restore in case of any corruption of it.


=> Add/append the below lines at the top of that file.

disk.locking = "FALSE"
diskLib.dataCacheMaxSize = "0"
diskLib.dataCacheMaxReadAheadSize = "0" 
diskLib.dataCacheMinReadAheadSize = "0" 
diskLib.dataCachePageSize = "4096" 
diskLib.maxUnsyncedWrites = "0" 
scsi1.sharedBus = "virtual"


=> Save the changes in the file.

Note : - Add the above same lines in the virtul machine configuration file of Node 2(RAC2) and save that.


=> Now go to the Setting of Virtual machine of Node 2 and Click on Add to add a new HDD in there and click on Next.
=> Select SCSI(recommended) and Check the Independent checkbox and select Persistent option and click on Next.
=> Select the option "Use an existing virtual disk"option and click on Next.
=> Provide the complete path of shared HDD we added earlier(E:\RAC-Shared-Storage\) in node one(RAC1) and Select Independent and Persistent option and click on Finish.


Note :- Once you are done with step 3 and start back the VMs then you will get a message that "Clustering is not supported......................", just ignore it.



Step : 4 - Add the following lines in the host files of both VMs for Public IPs, Private IPs, Scan Name and VIPs.


#Public IP
192.168.100.50  rac2.oraclenotes.in rac2
192.168.100.45  rac1.oraclenotes.in rac1

# Private
10.0.0.1   rac1-priv.oraclenotes.in   rac1-priv
10.0.0.2   rac2-priv.oraclenotes.in   rac2-priv

# Virtual
192.168.100.103   rac1-vip.oraclenotes.in    rac1-vip
192.168.100.104   rac2-vip.oraclenotes.in    rac2-vip

# SCAN
192.168.100.105   scan.oraclenotes.in        rac-scan

Note : So far we have created 2 VMs and configured it as such that both can communicate with each other now. next will create partition on shared disk and will create ASM disks and install Grid Infrastructure for Cluster.




Next Part is coming soon........stay tuned here...!!

No comments:

Post a Comment