Search This Blog

Tuesday, June 07, 2011

Create RAC Instance using Oracle VM

First Install the Oracle VM Server on a new machine.

On Some other linux machine (or an vmware instance) install the Oracle VM manager.

Extract the Oracle VM manager zip file and mount the iso file on a unix machine.
Install the Oracle VM manager by running the command ,
sh runInstaller.sh 

The Oracle VM manager asks a series of questions like db connect info etc
after this it will install Oracle XE and OC4J etc. If you have an existing DB you can use that
database instead of XE.

On the Oracle VM Server , create a HDD partion say about 100GB in /dev/sdb6
(ensure that you have atleast you have 80GB partition else the RAC install will fail)

and run the following commands to create the storage repository ,

mkfs.ext3 /dev/sdb6
/opt/ovs-agent-2.3/utils/repos.py -n /dev/sdb6
/opt/ovs-agent-2.3/utils/repos.py -i
/opt/ovs-agent-2.3/utils/repos.py -l
/opt/ovs-agent-2.3/utils/repos.py -r 90ab429e-a00f-488d-9680-91dd878e3f48

Output of the above commands ,

[root@oraclevm ~]# /opt/ovs-agent-2.3/utils/repos.py -n /dev/sdb6
[ NEW ] 90ab429e-a00f-488d-9680-91dd878e3f48 => /dev/sdb6
[root@oraclevm ~]# /opt/ovs-agent-2.3/utils/repos.py -i
*** Storage repositories initialized.
[root@oraclevm ~]# /opt/ovs-agent-2.3/utils/repos.py -l
[   ] 90ab429e-a00f-488d-9680-91dd878e3f48 => /dev/sdb6
[root@oraclevm ~]# /opt/ovs-agent-2.3/utils/repos.py -r 90ab429e-a00f-488d-9680-91dd878e3f48
[ R ] 90ab429e-a00f-488d-9680-91dd878e3f48 => /dev/sdb6

In the VM manager create a server pool and assign the Oracle VM Server to this pool.

Copy the RAC Vmware template file to /OVS/seed_pool and extract the file ,

After this run the following commands ,

# cd /OVS/seed_pool
# unzip -q /tmp/OVM_EL5U5_X86_11107RAC_PVM.zip
# tar xzf OVM_EL5U5_X86_11107RAC_PVM.tgz (or X86_64 for the 64-bit version)
(You may now delete the ZIP & TGZ files)
This will create the following, e.g.on 32bit:
/OVS/seed_pool/OVM_EL5U5_X86_11107RAC_PVM (or X86_64 for the 64-bit version)
|- System.img (OS image file)
|- Oracle11107RAC_x86-xvdb.img (database software image file)
|- vm.cfg (VM configuration file)
|- README
|- These PDF documents
|- lsinventory-sample.crs-32bit lsinventory-sample.rac-asm-32bit (or 64bit)

Now create 5 shared disks i.e say ASM1 to ASM5 each of 2GB.

Import the template using Oracle VM manager

Create 2 Virtual Machines using the imported template

Add the shared disks in the exact same order to both VMs.

Power ON both virtual machines

Complete the boot interview questions like private IP , public IP , VIP IP and hostnames etc.
For the private IP use 10.10.10.201 ,

If you have only one network card then use eth0:1 for the private interface.


Now Install Oracle RAC
First login as root user , (password is ovsroot) and run the command ,
cd /u01/clone/buildcluster.sh

This will install the RAC software.

For the command line tools , please download the following rpm’s

wget http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/oracle_addons/x86_64/ovmcli-2.2-9.el5.noarch.rpm

wget http://public-yum.oracle.com/repo/EnterpriseLinux/EL5/addons/x86_64/python-ZSI-2.1-a1.el5.noarch.rpm

Run the command to configure the ovm client

ovm config

run the command ,

ovm -u admin -p welcome1 vm ls
Name    Size(MB) Mem  VCPUs Status  Server_Pool
fmwrac1 29086    1400 1     Running oraclevm1_test
fmwrac2 29086    1400 1     Running oraclevm1_test

No comments: