Oracle 11g RAC on Oracle Virtual Machine

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 39

ABSTRACT

Install Configure and


manage Oracle 11gR2 2
node RAC cluster on
Oracle Virtual Machine

Milap Joshi
Oracle 11gR2 RAC on Virtual M

Oracle 11gR2 RAC on Virtual Machine


Oracle 11gR2 RAC on Virtual Machine

Oracle 11g R2 RAC Installation on VMware


Prerequisites
1) Oracle virtual Machine VirtualBox-5.0.10-104061-Win.exe.
2) Oracle 11gR2 Grid software and Database software
3) Windows system with minimum 8 GB RAM and 100 GB Space on HDD.
4) RHEL 5.4 x84_64 Software.
To be Consistent with this installation we’ll use name 1st virtual machine as RAC1 and 2nd virtual
machine as RAC2.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

1) Install virtual machine on your host OS.

2) Create virtual machine with name RAC1 as below screenshot.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

3) Use 2 GB of RAM for virtual Machine

4) Choose option create HDD now option as below screenshot

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

5) Choose the option VDI.

6) Choose Dynamically Allocated option.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

7) Choose HDD size and location and create HDD.

8) Choose network option and select adapter 1 with details as below.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

9) Choose adapter 2 for private network ad below. (We’ll setup static IP addresses at later point for RAC
cluster’s Interconnectivity).

10) Choose Image or disk option where Linux Installation software or image is placed.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

11) Start virtual machine and installation will start

12) Install Linux OS with below Partitions and space specification.

Partition Size
/boot 200MB
Swap 4GB
/u01 20GB
/ 10GB

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

13) Setup hostname for the 1st node as rac1.localdomain

14) Install Below RPMs on the RAC1 server

ie: rpm –ivh compat-libstdc++-33-3.2.3-61.x86_64.rpm

compat-libstdc++-33-3.2.3-61.x86_64.rpm
elfutils-libelf-devel-0.137-3.el5.x86_64.rpm
elfutils-libelf-devel-static-0.137-3.el5.x86_64.rpm
kernel-headers-2.6.18-164.el5.x86_64.rpm
glibc-headers-2.5-42.x86_64.rpm
glibc-devel-2.5-42.x86_64.rpm
libgomp-4.4.0-6.el5.x86_64.rpm
gcc-4.1.2-46.el5.x86_64.rpm
libstdc++-devel-4.1.2-46.el5.x86_64.rpm
gcc-c++-4.1.2-46.el5.x86_64.rpm
libaio-devel-0.3.106-3.2.x86_64.rpm
libstdc++-devel-4.1.2-46.el5.x86_64.rpm
sysstat-7.0.2-3.el5.x86_64.rpm
unixODBC-2.2.11-7.1.x86_64.rpm
unixODBC-devel-2.2.11-7.1.x86_64.rpm

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

15) Perform Below pre checks and make required changes in memory or space parameters if
necessary.

[root@rac1 ~]# grep MemTotal /proc/meminfo


MemTotal: 2059628 kB
[root@rac1 ~]# grep SwapTotal /proc/meminfo
SwapTotal: 4096532 kB
[root@rac1 ~]# df -h /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/sda3 9.5G 2.3G 6.8G 26% /

16) Make below change to /etc/sysctl.conf file.

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=1048576
net.core.wmem_max=1048576

17) Run /sbin/sysctl -p as root user.

18) Make required changes in /etc/security/limits.conf file as below.

oracle soft nproc 2047


oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

19) Make required changes in /etc/pam.d/login

session required /lib/security/pam_limits.so


session required pam_limits.so

20) Check /etc/selinux/config file for SELINUX option and make it disabled.

SELINUX=disabled

21) Create users and groups on the OS.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

[root@rac1 ~]# groupadd oinstall


[root@rac1 ~]# groupadd oper
[root@rac1 ~]# groupadd dba
[root@rac1 ~]# groupadd asmadmin
[root@rac1 ~]# useradd -u 500 -g oinstall -G dba,oper,asmadmin oracle
[root@rac1 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

22) Make required directories on the OS for GRID and Database Installation

[root@localhost ~]# mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1


[root@localhost ~]# mkdir -p /u01/app/product/19.3.0/grid

23) Change the ownership of the /u01 filesystem

[root@localhost ~]# chown -R oracle:oinstall /u01

24) Now switch to oracle user and make required changes in bash profile as shown below.

[root@rac1 ~]# su - oracle


[oracle@rac1 ~]$
[oracle@rac1 ~]$ add below to .bash_profile

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=rac1.localdomain; export ORACLE_HOSTNAME


ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
GRID_HOME=/u01/app/product/19.3.0/grid; export GRID_HOME
DB_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1; export DB_HOME
ORACLE_HOME=$DB_HOME; export ORACLE_HOME
ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH


CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

if [ $USER = "oracle" ]; then


if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

alias grid_env='. /home/oracle/grid_env'


alias db_env='. /home/oracle/db_env'

25) Create a file called "/home/oracle/grid_env" with the following contents.

ORACLE_SID=+ASM1; export ORACLE_SID


ORACLE_HOME=$GRID_HOME; export ORACLE_HOME
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH


CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH

26) Create a file called "/home/oracle/db_env" with the following contents.

ORACLE_HOME=$DB_HOME; export ORACLE_HOME


PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH

LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH


CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export
CLASSPATH

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

27) Configure eth1 with static IP with different series than other IPs as eth1 will be used for interconnection
between 2 nodes using these private IPs.

28) Stop ntp services as below.


[root@rac1 ~]# service ntpd stop
Shutting down ntpd: [FAILED]
[root@rac1 ~]# chkconfig ntpd off
[root@rac1 ~]# mv /etc/ntp.conf /etc/ntp.conf.orig
[root@rac1 ~]# rm /var/run/ntpd.pid
rm: cannot lstat `/var/run/ntpd.pid': No such file or directory
[root@rac1 ~]#

29) Now Install Below RPMs as a root user to configure ASM.

oracleasm-support-2.1.8-1.el5.x86_64.rpm
oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
kernel-debug-2.6.18-164.el5.x86_64.rpm
oracleasm-2.6.18-164.el5debug-2.0.5-1.el5.x86_64.rpm
kernel-xen-2.6.18-164.el5.x86_64.rpm
oracleasm-2.6.18-164.el5xen-2.0.5-1.el5.x86_64.rpm
oracleasm-2.6.18-164.el5-debuginfo-2.0.5-1.el5.x86_64.rpm

30) Now configure ASM on RAC1 node as below.

[root@rac1 ~]# 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 <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

Default user to own the driver interface []: oracle


Default group to own the driver interface []: oinstall
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

31) Shut down RAC1 Machine and Perform Full clone of the Machine with a name as RAC2

32) Create 3 sharable disks for OCR and 1 Datadisk for ASM installation on RAC1 node.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

33) Share disks created on RAC 1 Machine as shown below.


Go to file > virtual media manager and make the drives sharable

34) Choose existing shared disks created from rac1 on rac2 node.
Choose the option to add hard disk and choose option to use existing drive as below.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

35) Change MAC Address’ last 2 digit to something else on RAC2 as it is duplicated from RAC 1. Change MAC
address for both adapter 1 and adapter 2 on RAC2 as below.

36) Start RAC2 machine and change hostname to rac2.localdomain.

/etc/sysconfig/network
/etc/hosts files

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

37) Check network ip address and remove .bak connections and set private ip for eth1. Activate both eth0
and eth1 IPs

38) Create ASM and OCR disks

[root@rac1 ~]# fdisk /dev/sdb


Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
Until you decide to write them. After that, of course, the previous
Content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n


Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):
Using default value 391

Command (m for help): w


The partition table has been altered!

Calling ioctl() to re-read partition table.


Syncing disks.
[root@rac1 ~]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n


Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):
Using default value 391

Command (m for help): w


The partition table has been altered!
[root@rac1 ~]# fdisk /dev/sdd
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n


Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-391, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-391, default 391):
Using default value 391

Command (m for help): w


The partition table has been altered!

Calling ioctl() to re-read partition table.


Syncing disks.

Calling ioctl() to re-read partition table.


Syncing disks.
[root@rac1 ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 1958.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n


Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-1958, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1958, default 1958):
Using default value 1958

Command (m for help): w


The partition table has been altered!

Calling ioctl() to re-read partition table.


Syncing disks.

[root@rac1 ~]# ls /dev/sd*


/dev/sda /dev/sda1 /dev/sda2 /dev/sda3 /dev/sda4 /dev/sda5 /dev/sdb /dev/sdb1
/dev/sdc /dev/sdc1
/dev/sdd /dev/sdd1 /dev/sde /dev/sde1
[root@rac1 ~]#

39) Create ASM disks as below.

[root@rac1 ~]# oracleasm createdisk OCRDISK1 /dev/sdb1


Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk OCRDISK2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk OCRDISK3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@rac1 ~]# oracleasm createdisk DATADISK /dev/sde1
Writing disk header: done
Instantiating disk: done

[root@rac1 ~]# oracleasm -h


Usage: oracleasm [--exec-path=<exec_path>] <command> [ <args> ]
oracleasm --exec-path
oracleasm -h
oracleasm -V

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

The basic oracleasm commands are:


configure Configure the Oracle Linux ASMLib driver
init Load and initialize the ASMLib driver
exit Stop the ASMLib driver
scandisks Scan the system for Oracle ASMLib disks
status Display the status of the Oracle ASMLib driver
listdisks List known Oracle ASMLib disks
querydisk Determine if a disk belongs to Oracle ASMlib
createdisk Allocate a device for Oracle ASMLib use
deletedisk Return a device to the operating system
renamedisk Change the label of an Oracle ASMlib disk
update-driver Download the latest ASMLib driver

40) Scan ASM Disks on both the nodes and list it.

[root@rac1 ~]# oracleasm scandisks


Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...

root@rac1 ~]# oracleasm listdisks


DATADISK
OCRDISK1
OCRDISK2
OCRDISK3

41) Check if disks are visible on RAC2 node or not

[root@rac2 ~]# oracleasm scandisks


Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
[root@rac2 ~]# oracleasm listdisks
DATADISK
OCRDISK1
OCRDISK2
OCRDISK3

42) Add below entries in /etc/hosts file on both the nodes.

# Private
192.168.10.1 rac1-priv.localdomain rac1-priv
192.168.10.2 rac2-priv.localdomain rac2-priv

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

# Public
192.168.42.71 rac1.localdomain rac1
192.168.42.39 rac2.localdomain rac2

# Virtual
192.168.42.181 rac1-vip.localdomain rac1-vip
192.168.42.182 rac2-vip.localdomain rac2-vip

# SCAN
192.168.42.191 rac-scan.localdomain rac-scan
192.168.42.192 rac-scan.localdomain rac-scan
192.168.52.193 rac-scan.localdomain rac-scan

43) Copy database and grid software on /u01 using any ftp tool.

44) Unzip grid software.

[oracle@rac1 u01]$ unzip linux.x64_11gR2_grid.zip

45) Export GRID path and run the installer as below.

46) Choose install and configure grid infrastructure for a cluster option as below.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

47) Choose Advanced Installation and proceed.

48) Use Cluster name as rac-cluster and scan name as rac-scan.localdomain.

49) Add node2 details as defined /etc/hosts file.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

50) Create SSH connectivity between 2 nodes. Provide oracle password and click setup to create
passwordless connectivity.

51) Choose eth0 as public and eth1 as private.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

52) Choose ASM option and configure diskgroup.

53) Set oinstall as a group for all option as below.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

54) Execute both scripts on both the nodes as below.

55) Oracle cluster verification utility and Configure oracle Grid Infrastructure for a cluster will fail as there is
no DNS configured and scan entries are only modified in /etc/hosts file. Grid installed successfully.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

56) Start Database Installation

57) Choose the option Install database software only.

58) Choose the option Real Application cluster database installation option and select both the nodes.

59) Choose the option Enterprise Edition and proceed next.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

60) Execute below script on both the nodes.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

61) Now Configure ASM diskgroup for data storage for newly created database. Set ASM environment and
execute asmca.

62) Choose option create new diskgroup, provide new name to diskgroup & choose the disk on which
diskgroup needs to be created.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

63) Set Database Home and start DBCA to create and configure database.

64) Choose Oracle Real Application cluster database option and create database.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

65) Provide Global Database name and SID. Also select both the nodes to configure database on both the
nodes.Ex. If SID is PROD on both node it’ll create instance as PROD1 & PROD2 on respective nodes.

66) Choose storage type as ASM and diskgroup on which database needs to be configured.

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

SQL> select INSTANCE_NUMBER,INSTANCE_NAME,HOST_NAME from gv$instance;

INSTANCE_NUMBER INSTANCE_NAME HOST_NAME


--------------- ---------------- ----------------------------------------------------------------
1 PROD1 rac1.localdomain
2 PROD2 rac2.localdomain

SQL> select name,open_mode,database_role from v$database;

NAME OPEN_MODE DATABASE_ROLE


--------- -------------------- ----------------
PROD READ WRITE PRIMARY

Basic Cluster and ASM Tips

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

1)
[oracle@node1 ~]$ . oraenv
ORACLE_SID = [+ASM1] ?
The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/oracle
[oracle@node1 ~]$ echo $ORACLE_HOME
/u01/app/11.2.0/grid
[oracle@node1 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE node1
ora....ER.lsnr ora....er.type ONLINE ONLINE node1
ora....N1.lsnr ora....er.type ONLINE ONLINE node1
ora.asm ora.asm.type ONLINE ONLINE node1
ora.eons ora.eons.type ONLINE ONLINE node1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE node1
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip ora....t1.type ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip ora....t1.type ONLINE ONLINE node2
ora.oc4j ora.oc4j.type OFFLINE OFFLINE
ora.ons ora.ons.type ONLINE ONLINE node1
ora.prod.db ora....se.type ONLINE ONLINE node1
ora....ry.acfs ora....fs.type ONLINE ONLINE node1
ora.scan1.vip ora....ip.type ONLINE ONLINE node1

2)
[oracle@node1 ~]$ crsctl status resource
NAME=ora.DATA.dg
TYPE=ora.diskgroup.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2

NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2

NAME=ora.LISTENER_SCAN1.lsnr
TYPE=ora.scan_listener.type
TARGET=ONLINE
STATE=ONLINE on node1

NAME=ora.asm

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

TYPE=ora.asm.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2

NAME=ora.eons
TYPE=ora.eons.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2

NAME=ora.gsd
TYPE=ora.gsd.type
TARGET=OFFLINE, OFFLINE
STATE=OFFLINE, OFFLINE

NAME=ora.net1.network
TYPE=ora.network.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2

NAME=ora.node1.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=ONLINE on node1

NAME=ora.node2.vip
TYPE=ora.cluster_vip_net1.type
TARGET=ONLINE
STATE=ONLINE on node2

NAME=ora.oc4j
TYPE=ora.oc4j.type
TARGET=OFFLINE
STATE=OFFLINE

NAME=ora.ons
TYPE=ora.ons.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2

NAME=ora.prod.db
TYPE=ora.database.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2

NAME=ora.registry.acfs
TYPE=ora.registry.acfs.type
TARGET=ONLINE , ONLINE
STATE=ONLINE on node1, ONLINE on node2
NAME=ora.scan1.vip
TYPE=ora.scan_vip.type
TARGET=ONLINE

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

STATE=ONLINE on node1

3)
[oracle@node1 ~]$ crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

4)
[oracle@node1 ~]$ ps -ef | grep d.bin
root 2684 1 0 20:06 ? 00:00:08 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
oracle 2809 1 0 20:06 ? 00:00:03 /u01/app/11.2.0/grid/bin/oraagent.bin
oracle 2822 1 0 20:06 ? 00:00:00 /u01/app/11.2.0/grid/bin/gipcd.bin
oracle 2827 1 0 20:06 ? 00:00:00 /u01/app/11.2.0/grid/bin/mdnsd.bin
oracle 2841 1 0 20:06 ? 00:00:01 /u01/app/11.2.0/grid/bin/gpnpd.bin
root 2852 1 0 20:06 ? 00:00:01 /u01/app/11.2.0/grid/bin/cssdmonitor
root 2872 1 0 20:06 ? 00:00:01 /u01/app/11.2.0/grid/bin/cssdagent
root 2874 1 0 20:06 ? 00:00:00 /u01/app/11.2.0/grid/bin/orarootagent.bin
oracle 2902 1 0 20:06 ? 00:00:07 /u01/app/11.2.0/grid/bin/ocssd.bin
oracle 2906 1 0 20:06 ? 00:00:01 /u01/app/11.2.0/grid/bin/diskmon.bin -d -f
root 2955 1 0 20:07 ? 00:00:00 /u01/app/11.2.0/grid/bin/octssd.bin reboot
oracle 2973 1 0 20:07 ? 00:00:04 /u01/app/11.2.0/grid/bin/evmd.bin
oracle 3212 1 0 20:07 ? 00:00:01 /u01/app/11.2.0/grid/bin/oclskd.bin
root 3229 1 0 20:07 ? 00:00:08 /u01/app/11.2.0/grid/bin/crsd.bin reboot
root 3269 1 0 20:07 ? 00:00:01 /u01/app/11.2.0/grid/bin/oclskd.bin
oracle 3317 2973 0 20:07 ? 00:00:00 /u01/app/11.2.0/grid/bin/evmlogger.bin -o
/u01/app/11.2.0/grid/evm/log/evmlogger.info -l /u01/app/11.2.0/grid/evm/log/evmlogger.log
oracle 3359 1 0 20:07 ? 00:00:03 /u01/app/11.2.0/grid/bin/oraagent.bin
root 3363 1 0 20:07 ? 00:00:06 /u01/app/11.2.0/grid/bin/orarootagent.bin
oracle 3490 1 0 20:08 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle 3574 1 0 20:08 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -
inherit
oracle 4977 4671 0 20:28 pts/2 00:00:00 grep d.bin

5)
[oracle@node1 ~]$ ps -ef | grep tns
oracle 3490 1 0 20:08 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER -inherit
oracle 3574 1 0 20:08 ? 00:00:00 /u01/app/11.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -
inherit
oracle 4987 4671 0 20:28 pts/2 00:00:00 grep tns

6)
[oracle@node2 ~]$ cat /etc/hosts

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

# Do not remove the following line, or various programs


# that require network functionality will fail.
127.0.0.1 node2.localdomain node2 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

# Private
192.168.10.1 node1-priv.localdomain node1-priv
192.168.10.2 node2-priv.localdomain node2-priv

# Public
192.168.42.186 node1.localdomain node1
192.168.42.23 node2.localdomain node2

# Virtual
192.168.42.181 node1-vip.localdomain node1-vip
192.168.42.182 node2-vip.localdomain node2-vip

# SCAN
192.168.42.191 node-scan.localdomain node-scan
192.168.42.192 node-scan.localdomain node-scan
192.168.52.193 node-scan.localdomain node-scan

6)
[root@node1 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:70:49:71
inet addr:192.168.42.71 Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe70:4971/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1854 errors:0 dropped:0 overruns:0 frame:0
TX packets:2087 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:280022 (273.4 KiB) TX bytes:310865 (303.5 KiB)
Base address:0xd010 Memory:f0000000-f0020000

eth0:1 Link encap:Ethernet HWaddr 08:00:27:70:49:71


inet addr:192.168.42.191 Bcast:192.168.42.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0xd010 Memory:f0000000-f0020000

eth0:2 Link encap:Ethernet HWaddr 08:00:27:70:49:71


inet addr:192.168.42.181 Bcast:192.168.42.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0xd010 Memory:f0000000-f0020000

eth1 Link encap:Ethernet HWaddr 08:00:27:53:30:4B


inet addr:192.168.10.1 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe53:304b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:58890 errors:0 dropped:0 overruns:0 frame:0
TX packets:51830 errors:0 dropped:0 overruns:0 carrier:0

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

collisions:0 txqueuelen:1000
RX bytes:31427482 (29.9 MiB) TX bytes:19663826 (18.7 MiB)
Base address:0xd240 Memory:f0820000-f0840000

lo Link encap:Local Loopback


inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:28184 errors:0 dropped:0 overruns:0 frame:0
TX packets:28184 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:11878110 (11.3 MiB) TX bytes:11878110 (11.3 MiB)

[root@node2 ~]# ifconfig


eth0 Link encap:Ethernet HWaddr 08:00:27:70:49:51
inet addr:192.168.42.39 Bcast:192.168.42.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe70:4951/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1157 errors:0 dropped:0 overruns:0 frame:0
TX packets:861 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:201010 (196.2 KiB) TX bytes:191295 (186.8 KiB)
Base address:0xd010 Memory:f0000000-f0020000

eth0:1 Link encap:Ethernet HWaddr 08:00:27:70:49:51


inet addr:192.168.42.182 Bcast:192.168.42.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Base address:0xd010 Memory:f0000000-f0020000

eth1 Link encap:Ethernet HWaddr 08:00:27:53:30:8D


inet addr:192.168.10.2 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe53:308d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:51395 errors:0 dropped:0 overruns:0 frame:0
TX packets:58356 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:19483144 (18.5 MiB) TX bytes:31020496 (29.5 MiB)
Base address:0xd240 Memory:f0820000-f0840000

lo Link encap:Local Loopback


inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:27122 errors:0 dropped:0 overruns:0 frame:0
TX packets:27122 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:13658297 (13.0 MiB) TX bytes:13658297 (13.0 MiB)

7)
[oracle@rac1 ~]$ db_env

Author: Milap Joshi


Oracle 11gR2 RAC on Virtual Machine

[oracle@rac1 ~]$ srvctl stop database -d PROD -o immediate


[oracle@rac1 ~]$ srvctl start database -d PROD

8) ASM Commands

create diskgroup DATADG1 external redundancy DISK '/dev/sde1';

select path,header_status from v$asm_disks;

select * from v$asm_diskgroup;

alter diskgroup DATADG1 unmount;

alter diskgroup DATADG1 mount;

Author: Milap Joshi

You might also like