Sunteți pe pagina 1din 40

Oracle 11g RAC Setup on SAN

1. Configuring multipath for SAN


# multipath l
This will display SAN disks with respective wwids , it should be similar on
both nodes.
mpath87 (360060e80057482000000748200000510) dm-93 HP,OPEN-V
[size=2.0G][features=1 queue_if_no_path][hwhandler=0][rw]
mpath72 (360060e80057482000000748200000421) dm-78 HP,OPEN-V
[size=2.0G][features=1 queue_if_no_path][hwhandler=0][rw]
mpath86 (360060e80057482000000748200000500) dm-92 HP,OPEN-V
[size=2.0G][features=1 queue_if_no_path][hwhandler=0][rw]
mpath71 (360060e80057482000000748200000511) dm-77 HP,OPEN-V
[size=2.0G][features=1 queue_if_no_path][hwhandler=0][rw]
mpath85 (360060e80057482000000748200000410) dm-91 HP,OPEN-V
[size=2.0G][features=1 queue_if_no_path][hwhandler=0][rw]

Take backup of /etc/multipath.conf file

Edit /etc/multipath.conf file and add the entries of the


disks you want to use for ocr, vote and asm. (Both

Node 1 and Node 2)


multipath {
wwid
360060e80057482000000748200000440
alias
ocr1
path_grouping_policy group_by_prio
path_selector
"round-robin 0"
failback
immediate
rr_weight
uniform
no_path_retry
10
rr_min_io
100
}
multipath {
wwid
360060e80057482000000748200000441
alias
ocr2
path_grouping_policy group_by_prio
path_selector
"round-robin 0"
failback
immediate
rr_weight
uniform
no_path_retry
10
rr_min_io
100}

We need to make entry in multipath.conf file both nodes, make


sure in both the nodes the wwid for a specified disk (alias) should
be same.
Similarly we make entry for all required disks i.e ocr1,
ocr2,vote1,vote2,vote3 and asmdata1 to asmdata30 on both
nodes. (Here all ocr and vote disks are 2GB each and all asmdata
disks are 100GB each)

# /etc/init.d/multipathd restart
After the multipath restart the disks we named in
multipath.conf will listed in /dev/mapper.
# cd /dev/mapper
#ls
[root@blrpmdmdb001 etc]#
brw-rw---brw-rw---brw-rw---brw-rw---brw-rw---brw-rw---brw------brw------brw------brw-rw---brw-rw---brw-rw----

1
1
1
1
1
1
1
1
1
1
1
1

root
root
root
root
root
root
root
root
root
root
root
root

disk
disk
disk
disk
disk
disk
root
root
root
disk
disk
disk

253, 72 Mar 14 22:15 mpath96


253, 73 Mar 14 22:15 mpath97
253, 74 Mar 14 22:15 mpath98
253, 88 Mar 14 22:15 mpath99
253, 93 Mar 15 01:55 ocr1
253, 78 Mar 14 22:15 ocr2
253, 99 Mar 14 22:15 vg00-lvol1
253, 101 Mar 14 22:15 vg01-lvol1
253, 100 Mar 14 22:15 vg02-lvol1
253, 92 Mar 14 22:15 vote1
253, 77 Mar 14 22:15 vote2
253, 91 Mar 14 22:15 vote3

To create partitions on the disks


# fdisk /dev/mapper/ocr1 (From only one node)

on node1

[root@blrpmdmdb001 etc]# fdisk /dev/mapper/ocr1

Command (m for help): p


Disk /dev/mapper/ocr1: 2147 MB, 2147942400 bytes
255 heads, 63 sectors/track, 261 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot

Start

End

Blocks

Id

System

Command (m for help): n


Command action
e
extended
p
primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-261, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-261, default 261):
Using default value 261
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
WARNING: Re-reading the partition table failed with error 22: Invalid
argument. The kernel still uses the old table. The new table will be used at
the next reboot. Syncing disks.
[root@blrpmdmdb001 etc]#

[root@blrpmdmdb001 mapper]# partprobe


[root@blrpmdmdb001 mapper]# pwd
/dev/mapper
[root@blrpmdmdb001 mapper]#
brw-rw---- 1 root disk 253,

91 Mar 14 22:15 vote3

[root@blrpmdmdb001 mapper]# kpartx -l /dev/mapper/ocr1


ocr1p1 : 0 4192902 /dev/mapper/ocr1 63

[root@blrpmdmdb001 mapper]# kpartx -a /dev/mapper/ocr1


[root@blrpmdmdb001 mapper]# ll
brw-rw---- 1 root disk 253,

93 Mar 15 01:55 ocr1

brw-rw---- 1 root disk 253, 102 Mar 15 01:58 ocr1p1


brw-rw---- 1 root disk 253, 78 Mar 14 22:15 ocr2
brw------- 1 root root 253, 99 Mar 14 22:15 vg00-lvol1
brw------- 1 root root 253, 101 Mar 14 22:15 vg01-lvol1
brw------- 1 root root 253, 100 Mar 14 22:15 vg02-lvol1
brw-rw---- 1 root disk 253, 92 Mar 14 22:15 vote1
brw-rw---- 1 root disk 253, 77 Mar 14 22:15 vote2
brw-rw---- 1 root disk 253, 91 Mar 14 22:15 vote3
[root@blrpmdmdb001 mapper]# kpartx -a /dev/mapper/ocr1

Kpartx l will list all disk partitions and kpartx -a will


add the disk partitions
After kpartx you can see a new partition ocr1p1
is added to the /dev/mapper
Repeat the fdisk, partprobe, kpartx steps for all
the required disk partitions i.e ocr2,
vote1,vote2,vote3, asmdata1to asmdata30.
[root@blrpmdmdb001 mapper]#
brw-rw---- 1 root disk 253, 88 Mar
brw-rw---- 1 root disk 253, 93 Mar
brw-rw---- 1 root disk 253, 102 Mar
brw-rw---- 1 root disk 253, 78 Mar
brw-rw---- 1 root disk 253, 103 Mar
brw------- 1 root root 253, 99 Mar
brw------- 1 root root 253, 101 Mar
brw------- 1 root root 253, 100 Mar
brw-rw---- 1 root disk 253, 92 Mar
brw-rw---- 1 root disk 253, 104 Mar
brw-rw---- 1 root disk 253, 77 Mar
brw-rw---- 1 root disk 253, 105 Mar
brw-rw---- 1 root disk 253, 91 Mar
brw-rw---- 1 root disk 253, 106 Mar
[root@blrpmdmdb001 mapper]#

14
15
15
15
15
14
14
14
15
15
15
15
15
15

22:15
01:55
01:58
02:01
02:05
22:15
22:15
22:15
02:02
02:05
02:03
02:05
02:03
02:05

mpath99
ocr1
ocr1p1
ocr2
ocr2p1
vg00-lvol1
vg01-lvol1
vg02-lvol1
vote1
vote1p1
vote2
vote2p1
vote3
vote3p1

Run kpartx commands in node 2 for all disk partitions.

Now in Node2: run kpartx commands


[root@blrpmdmdb002 mapper]# pwd
/dev/mapper
[root@blrpmdmdb002 mapper]# ll
brw-rw---brw-rw---brw-rw---brw-rw----rw-r--r-brw------brw------brw------brw-rw---brw-rw---brw-rw----

1
1
1
1
1
1
1
1
1
1
1

root
root
root
root
root
root
root
root
root
root
root

disk
disk
disk
disk
root
root
root
root
disk
disk
disk

253, 72
253, 73
253, 93
253, 78
65536
253, 99
253, 101
253, 100
253, 92
253, 77
253, 91

Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar

14
14
14
14
14
14
14
14
14
14
14

11:51
11:51
11:51
11:51
15:52
11:51
11:51
11:51
11:51
11:51
11:51

mpath98
mpath99
ocr1
ocr2
typescript
vg00-lvol1
vg01-lvol1
vg02-lvol1
vote1
vote2
vote3

[root@blrpmdmdb002 mapper]# pwd


/dev/mapper
[root@blrpmdmdb002 mapper]# kpartx -l /dev/mapper/ocr1
ocr1p1 : 0 4192902 /dev/mapper/ocr1 63
[root@blrpmdmdb002 mapper]# kpartx -l /dev/mapper/ocr2
ocr2p1 : 0 4192902 /dev/mapper/ocr2 63
[root@blrpmdmdb002 mapper]# kpartx -l /dev/mapper/vote1
vote1p1 : 0 4192902 /dev/mapper/vote1 63
[root@blrpmdmdb002 mapper]# kpartx -l /dev/mapper/vote2
vote2p1 : 0 4192902 /dev/mapper/vote2 63
[root@blrpmdmdb002 mapper]# kpartx -l /dev/mapper/vote3
vote3p1 : 0 4192902 /dev/mapper/vote3 63
[root@blrpmdmdb002 mapper]#
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
brw-rw---brw-rw---brw-rw---brw-rw---brw-rw---brw-rw---brw-rw----rw-r--r-brw------brw------brw------brw-rw---brw-rw---brw-rw---brw-rw----

1
1
1
1
1
1
1
1
1
1
1
1
1
1
1

root
root
root
root
root
root
root
root
root
root
root
root
root
root
root

mapper]#
mapper]#
mapper]#
mapper]#
mapper]#
mapper]#
disk
disk
disk
disk
disk
disk
disk
root
root
root
root
disk
disk
disk
disk

kpartx
kpartx
kpartx
kpartx
kpartx
ll

253, 71
253, 72
253, 73
253, 93
253, 102
253, 78
253, 103
73728
253, 99
253, 101
253, 100
253, 92
253, 104
253, 77
253, 105

Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar

-a
-a
-a
-a
-a
14
14
14
14
14
14
14
14
14
14
14
14
14
14
14

/dev/mapper/ocr1
/dev/mapper/ocr2
/dev/mapper/vote1
/dev/mapper/vote2
/dev/mapper/vote3
11:51
11:51
11:51
11:51
16:09
11:51
16:09
16:08
11:51
11:51
11:51
11:51
16:09
11:51
16:09

mpath97
mpath98
mpath99
ocr1
ocr1p1
ocr2
ocr2p1
typescript
vg00-lvol1
vg01-lvol1
vg02-lvol1
vote1
vote1p1
vote2
vote2p1

brw-rw---- 1 root disk 253, 91 Mar 14 11:51 vote3


brw-rw---- 1 root disk 253, 106 Mar 14 16:09 vote3p1

# Configure bond0, bond1 bonding (Both Node 1


and Node 2)
[root@blrpmdmdb001 mapper]#

cd /etc/sysconfig/network-scripts/

Node 1:
[root@blrpmdmdb001 network-scripts]# cat
DEVICE=bond0
IPADDR=10.1.3.8
#NETWORK=10.1.3.1
NETMASK=255.255.255.0
GATEWAY=10.1.3.1
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
[root@blrpmdmdb001 network-scripts]# pwd
/etc/sysconfig/network-scripts
[root@blrpmdmdb001 network-scripts]#
DEVICE=bond1
IPADDR=192.168.0.15
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

ifcfg-bond0

cat ifcfg-bond1

Node 2:
[root@blrpmdmdb002 network-scripts]#
DEVICE=bond0
IPADDR=10.1.3.9
#NETWORK=10.1.3.1
NETMASK=255.255.255.0
GATEWAY=10.1.3.1
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
TYPE=BOND

cat ifcfg-bond0

[root@blrpmdmdb002 network-scripts]#
DEVICE=bond1
IPADDR=192.168.0.15
NETMASK=255.255.255.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes

cat ifcfg-bond1

# Configure eth0, eth1,eth2,eth3 to the bond0 and


bond1

(Both Node 1 and Node 2)


[root@blrpmdmdb001 network-scripts]# cat ifcfg-eth0
# Broadcom Corporation NetXtreme II BCM5706 Gigabit Ethernet
DEVICE=eth0
BOOTPROTO=none
HWADDR=78:E7:D1:FB:0F:F2
ONBOOT=yes
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
[root@blrpmdmdb001 network-scripts]# cat ifcfg-eth1
# Broadcom Corporation NetXtreme II BCM5706 Gigabit Ethernet
DEVICE=eth1
BOOTPROTO=none
HWADDR=78:E7:D1:FB:0F:F4
ONBOOT=yes
MASTER=bond0
SLAVE=yes
TYPE=Ethernet
[root@blrpmdmdb001 network-scripts]# cat ifcfg-eth2
# Broadcom Corporation NetXtreme II BCM5706 Gigabit Ethernet
DEVICE=eth2
BOOTPROTO=none
ONBOOT=yes
MASTER=bond1
SLAVE=yes
TYPE=Ethernet
[root@blrpmdmdb001 network-scripts]# cat ifcfg-eth3
# Broadcom Corporation NetXtreme II BCM5706 Gigabit Ethernet
DEVICE=eth3
BOOTPROTO=none
ONBOOT=yes
MASTER=bond1
SLAVE=yes
TYPE=Ethernet

#Check /etc/hosts file and based on Private IP provided in


hosts file alter same in bond1 in both nodes:
[root@blrpmdmdb001 network-scripts

] #

cat /etc/hosts

# Do not remove the following line, or various programs


# that require network functionality will fail.
127.0.0.1
localhost.localdomain localhost
::1
localhost6.localdomain6 localhost6
# bond0 (Public IP , eth0 & eth1)
10.1.3.8
blrpmdmdb001.kescom.org
10.1.3.9
blrpmdmdb002.kescom.org

blrpmdmdb001
blrpmdmdb002

# bond1 (Interconnect Private IP , eth0 & eth1)


192.168.10.3
192.168.10.4

blrpmdmdb001-priv.kescom.org
blrpmdmdb002-priv.kescom.org

blrpmdmdb001-priv
blrpmdmdb002-priv

blrpmdmdb001-vip.kescom.org
blrpmdmdb002-vip.kescom.org

blrpmdmdb001-vip
blrpmdmdb002-vip

# Virtual IP
10.1.30.80
10.1.30.90

/etc/hosts file should be similar on both nodes. Try pinging Private


IP, it should ping in both nodes and VIP will not work. Now Based on
bond 1 IP update IPADDR in /etc/sysconfig/network-scripts/ifcfgbond1 on Both Nodes
Node 1:
[root@blrpmdmdb001 ~]# Vi /etc/sysconfig/networkscripts/ifcfg-bond1
DEVICE=bond1
IPADDR=192.168.10.3
NETMASK=255.255.0.0
USERCTL=no
BOOTPROTO=none
ONBOOT=yes
TYPE=BOND

Node 2:
[root@blrpmdmdb002 ~]# Vi /etc/sysconfig/networkscripts/ifcfg-bond1
DEVICE=bond1
IPADDR=192.168.10.4
NETMASK=255.255.0.0
BOOTPROTO=none

ONBOOT=yes
USERCTL=no
TYPE=BOND

# adding groups oinstall , asm , crs, dba


(Both Node 1 and Node 2)
In node1
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
oinstall:x:501:
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001

~]# cat /etc/group | grep oinstall


~]# /usr/sbin/groupadd -g 501 oinstall
~]# cat /etc/group | grep oinstall
~]# /usr/sbin/groupadd -g 504 asm
~]# /usr/sbin/groupadd -g 506 asmdba
~]# /usr/sbin/groupadd -g 503 dba
~]#

[root@blrpmdmdb001 ~]# cat /etc/group | egrep "oinstall|asm|


dba"
oinstall:x:501:
asm:x:504:
asmdba:x:506:
dba:x:503:
In Node2
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
dba"
oinstall:x:501:
asmdba:x:506:
asm:x:504:
dba:x:503:
[root@blrpmdmdb002

mapper]# cd
~]# /usr/sbin/groupadd -g 501 oinstall
~]# /usr/sbin/groupadd -g 506 asmdba
~]# /usr/sbin/groupadd -g 504 asm
~]# /usr/sbin/groupadd -g 503 dba
~]# cat /etc/group | egrep "oinstall|asm|

~]#

# adding Users asm , crs, oracle


(Both Node 1 and Node 2)
Node 1:

[root@blrpmdmdb001 ~]#
[root@blrpmdmdb001 ~]# /usr/sbin/useradd -u 501 -g oinstall
crs
[root@blrpmdmdb001 ~]# /usr/sbin/useradd -u 504 -g oinstall
-G asm,asmdba asm
[root@blrpmdmdb001 ~]# /usr/sbin/useradd -u 502 -g oinstall
-G dba,asm,asmdba oracle
[root@blrpmdmdb001 ~]#
Node 2:
[root@blrpmdmdb002 ~]# /usr/sbin/useradd -u 501 -g oinstall
crs
[root@blrpmdmdb002 ~]# /usr/sbin/useradd -u 504 -g oinstall
-G asm,asmdba asm
[root@blrpmdmdb002 ~]# /usr/sbin/useradd -u 503 -g oinstall
-G dba,asm,asmdba oracle
[root@blrpmdmdb002 ~]#

# changing ownership of OCR and voting disks


(Both Node 1 and Node 2)
Node 1
[root@blrpmdmdb001 mapper]# pwd
/dev/mapper
[root@blrpmdmdb001 mapper]#
brw-rw---brw-rw---brw-rw---brw-rw---brw-rw---brw------brw------brw------brw-rw---brw-rw---brw-rw----

1
1
1
1
1
1
1
1
1
1
1

root
root
root
root
root
root
root
root
root
root
root

disk
disk
disk
disk
disk
root
root
root
disk
disk
disk

253,
253,
253,
253,
253,
253,
253,
253,
253,
253,
253,

88
95
103
78
93
104
106
105
94
101
77

Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar

15
15
15
15
15
15
15
15
15
15
15

18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34

mpath99
ocr1
ocr1p1
ocr2
ocr2p1
vg00-lvol1
vg01-lvol1
vg02-lvol1
vote1
vote1p1
vote2

brw-rw---- 1 root disk 253,


brw-rw---- 1 root disk 253,
[root@blrpmdmdb001
/dev/mapper
[root@blrpmdmdb001
/dev/mapper/ocr*
[root@blrpmdmdb001
[root@blrpmdmdb001
/dev/mapper/vote*
[root@blrpmdmdb001

90 Mar 15 18:34 vote2p1


92 Mar 15 18:34 vote3

mapper]# pwd
mapper]# chown root:oinstall
mapper]# chmod 0640 /dev/mapper/ocr*
mapper]# chown crs:oinstall
mapper]# chmod 0640 /dev/mapper/vote*

brw-rw---- 1 root disk


253,
brw-r----- 1 root oinstall 253,
brw-r----- 1 root oinstall 253,
brw-r----- 1 root oinstall 253,
brw-r----- 1 root oinstall 253,
brw------- 1 root root
253,
brw------- 1 root root
253,
brw------- 1 root root
253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
[root@blrpmdmdb001 mapper]#

88
95
103
78
93
104
106
105
94
101
77
90
92
102

Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar

15
15
15
15
15
15
15
15
15
15
15
15
15
15

18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34
18:34

mpath99
ocr1
ocr1p1
ocr2
ocr2p1
vg00-lvol1
vg01-lvol1
vg02-lvol1
vote1
vote1p1
vote2
vote2p1
vote3
vote3p1

Node 2:
brw-rw---- 1 root disk 253,
[root@blrpmdmdb002 mapper]#
/dev/mapper/ocr*
[root@blrpmdmdb002 mapper]#
[root@blrpmdmdb002 mapper]#
/dev/mapper/vote*
[root@blrpmdmdb002 mapper]#
[root@blrpmdmdb002 mapper]#
brw-rw---brw-rw---brw-r----brw-r----brw-r----brw-r-----

1
1
1
1
1
1

root
root
root
root
root
root

disk
disk
oinstall
oinstall
oinstall
oinstall

102 Mar 15 08:34 vote3p1


chown root:oinstall
chmod 0640 /dev/mapper/ocr*
chown crs:oinstall
chmod 0640 /dev/mapper/vote*

253, 72 Mar 15
253, 73 Mar 15
253, 94 Mar 15
253, 103 Mar 15
253, 78 Mar 15
253, 88 Mar 15

08:34
08:34
08:34
08:34
08:34
08:34

mpath98
mpath99
ocr1
ocr1p1
ocr2
ocr2p1

brw------- 1 root root


253,
brw------- 1 root root
253,
brw------- 1 root root
253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
brw-r----- 1 crs oinstall 253,
[root@blrpmdmdb002 mapper]#

104
106
105
93
100
77
101
92
102

Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar
Mar

15
15
15
15
15
15
15
15
15

08:34
08:34
08:34
08:34
08:34
08:34
08:34
08:34
08:34

vg00-lvol1
vg01-lvol1
vg02-lvol1
vote1
vote1p1
vote2
vote2p1
vote3
vote3p1

# Add Entries for OCR and Vote disks in


/etc/rc.d/rc.local file and run the script (Both
Nodes)
Before change in rc.local
[root@blrpmdmdb001 ~]# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init
scripts.
# You can put your own initialization stuff in here if you
don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
[root@blrpmdmdb001 ~]#
After change in rc.local (done in both nodes)
[root@blrpmdmdb002 mapper]# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init
scripts.
# You can put your own initialization stuff in here if you
don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local

# OCR disk
chown root:oinstall /dev/mapper/ocr*
chmod 0640 /dev/mapper/ocr*
# VOTE disk
chown crs:oinstall /dev/mapper/vote*
chmod 0640 /dev/mapper/vote*

And execute it in both the nodes


[root@blrpmdmdb001 mapper]# /etc/rc.d/rc.local
[root@blrpmdmdb001 mapper]#

# Modify Kernel Parameters in Both Nodes

[root@blrpmdmdb001 mapper]# vi /etc/sysctl.conf


# Controls the maximum shared segment size, in bytes
#kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in
pages
#kernel.shmall = 4294967296
kernel.shmall = 2097152
kernel.shmmax = 10737418240
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.aio-max-size =1048576
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 2097152

# Modify /etc/security/limits.conf in both nodes


[root@blrpmdmdb001 mapper]# vi/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024

oracle hard nofile 65536

# Modify /etc/pam.d/login in both nodes


# Add below entry in /etc/pam.d/login
session required pam_limits.so

# Create directories and set permissions in Both


Nodes
Node 1:
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001

~]#
~]#
~]#
~]#
~]#
~]#

mkdir
mkdir
mkdir
mkdir
mkdir
mkdir

-p
-p
-p
-p
-p
-p

/u01/app
/u02/app
/u03/app
/u01/app/crs
/u02/app/asm
/u03/app/oracle

[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001

~]#
~]#
~]#
~]#
~]#
~]#

chown
chmod
chown
chmod
chown
chmod

-R
-R
-R
-R
-R
-R

root:oinstall /u01/app
775 /u01/app/
asm:oinstall /u02/app/
775 /u02/app/
oracle:oinstall /u03/app/
775 /u03/app/

[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
[root@blrpmdmdb001
/u03/app/oracle
[root@blrpmdmdb001
[root@blrpmdmdb001

~]#
~]#
~]#
~]#
~]#

chown
chmod
chown
chmod
chown

-R
-R
-R
-R
-R

root:oinstall /u01/app/crs
775 /u01/app/crs
asm:oinstall /u02/app/asm/
775 /u02/app/asm/
oracle:oinstall

~]# chmod -R 775 /u03/app/oracle/


~]#

[oracle@blrpmdmdb001 ~ ]# ls -l /u01 /u02 /u03


/u01:
total 20
drwxrwxr-x 4 root oinstall 4096 Mar 19 2011 app
drwx------ 2 root root
16384 Mar 11 2011 lost+found
/u02:
total 20

drwxrwxr-x 6 asm oinstall 4096 Mar 20


drwx------ 2 root root
16384 Mar 11

2011 app
2011 lost+found

/u03:
total 20
drwxrwxr-x 6 oracle oinstall 4096 May 31 11:47 app
drwx------ 2 root
root
16384 Mar 11 2011 lost+found
[root@blrpmdmdb001 app]# ls -l /u01/app/ /u02/app/ /u03/app/
/u01/app/:
total 8
drwxrwxr-x 3 root oinstall 4096 Mar 15 12:51 crs
/u02/app/:
total 8
drwxrwxr-x 2 asm oinstall 4096 Mar 15 12:53 asm
/u03/app/:
total 8
drwxrwxr-x 2 oracle oinstall 4096 Mar 15 12:53 oracle
Node 2:
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002

~]#
~]#
~]#
~]#
~]#
~]#

mkdir
mkdir
mkdir
mkdir
mkdir
mkdir

-p
-p
-p
-p
-p
-p

/u01/app
/u02/app
/u03/app
/u01/app/crs
/u02/app/asm
/u03/app/oracle

[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002

~]#
~]#
~]#
~]#
~]#
~]#

chown
chmod
chown
chmod
chown
chmod

-R
-R
-R
-R
-R
-R

root:oinstall /u01/app
775 /u01/app/
asm:oinstall /u02/app/
775 /u02/app/
oracle:oinstall /u03/app/
775 /u03/app/

[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
[root@blrpmdmdb002
/u03/app/oracle
[root@blrpmdmdb002
[root@blrpmdmdb002 ~]#

~]#
~]#
~]#
~]#
~]#

chown
chmod
chown
chmod
chown

-R
-R
-R
-R
-R

root:oinstall /u01/app/crs
775 /u01/app/crs
asm:oinstall /u02/app/asm/
775 /u02/app/asm/
oracle:oinstall

~]# chmod -R 775 /u03/app/oracle/

[oracle@blrpmdmdb002 ~ ]# ls -l
/u01:

/u01 /u02 /u03

total 20
drwxrwxr-x 4 root oinstall 4096 Mar 19
drwx------ 2 root root
16384 Mar 11

2011 app
2011 lost+found

/u02:
total 20
drwxrwxr-x 6 asm oinstall 4096 Mar 20
drwx------ 2 root root
16384 Mar 11

2011 app
2011 lost+found

/u03:
total 20
drwxrwxr-x 6 oracle oinstall 4096 May 31 11:47 app
drwx------ 2 root
root
16384 Mar 11 2011 lost+found
[root@blrpmdmdb002 app]# ls -l /u01/app/ /u02/app/ /u03/app/
/u01/app/:
total 8
drwxrwxr-x 3 root oinstall 4096 Mar 15 12:51 crs
/u02/app/:
total 8
drwxrwxr-x 2 asm oinstall 4096 Mar 15 12:53 asm
/u03/app/:
total 8
drwxrwxr-x 2 oracle oinstall 4096 Mar 15 12:53 oracle
# Check all necessary RPMs are installed or not.
# Check date on both nodes, it should same, If not same set date

# Configure Oracle Installation Owner shell limits


in /etc/Profile
# Configuring User Equivalence (ssh) for crs,
oracle, asm in both Nodes
Create the directories and change the
permissions on each node
[crs@blrpmdmdb001 ~]$ mkdir ~/.ssh
[crs@blrpmdmdb001 ~]$ chmod 700 ~/.ssh

Enter the command /usr/bin/ssh-keygen -t rsa on each


node:
[crs@blrpmdmdb001 ~]$ /usr/bin/ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/crs/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/crs/.ssh/id_rsa.
Your public key has been saved in /home/crs/.ssh/id_rsa.pub.
The key fingerprint is:
07:ef:9e:f8:58:eb:ff:dc:e8:e9:71:d9:e4:64:d5:3d
crs@blrpmdmdb001.ad.infosys.com

Create the file authorized_keys


[crs@blrpmdmdb001 ~]$ cd .ssh/
[crs@blrpmdmdb001 .ssh]$ cat id_rsa.pub >> authorized_keys

Transport the file authorized_keys to each node


appending the id_rsa.pub value each time and once done
circulate the final file back to each node from last
node.
[crs@blrpmdmdb001 .ssh]$ scp authorized_keys
crs@172.21.13.214:/home/crs/.ssh/
The authenticity of host '172.21.13.214 (172.21.13.214)' can't be
established.
RSA key fingerprint is
af:09:84:c2:1f:b3:ed:af:e2:ac:32:ce:d7:c0:8b:d3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.21.13.214' (RSA) to the list of
known hosts.
crs@172.21.13.214's password:
authorized_keys
100% 411
0.4KB/s
00:00

Repeat the steps in Node 2 and scp the authorized_keys


file back to Node 1.
Create ssh session from each node to each
node(including itself)

[crs@blrpmdmdb001 .ssh]$ ssh kasitesccb2.ad.infosys.com date


The authenticity of host 'kasitesccb2.ad.infosys.com
(172.21.13.214)' can't be established.
RSA key fingerprint is
af:09:84:c2:1f:b3:ed:af:e2:ac:32:ce:d7:c0:8b:d3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'kasitesccb2.ad.infosys.com' (RSA) to
the list of known hosts.
Enter passphrase for key '/home/crs/.ssh/id_rsa':
Tue Feb 22 19:50:36 IST 2011
[crs@blrpmdmdb001 .ssh]$ ssh kasitesccb2 date
The authenticity of host 'kasitesccb2 (172.21.13.214)' can't be
established.
RSA key fingerprint is
af:09:84:c2:1f:b3:ed:af:e2:ac:32:ce:d7:c0:8b:d3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'kasitesccb2' (RSA) to the list of
known hosts.
Enter passphrase for key '/home/crs/.ssh/id_rsa':
Tue Feb 22 19:50:44 IST 2011

Issue the below commands( this is to be done each


time we need to create the equivalence)
[crs@blrpmdmdb001 .ssh]$ exec /usr/bin/ssh-agent $SHELL
[crs@blrpmdmdb001 .ssh]$ /usr/bin/ssh-add
Enter passphrase for /home/crs/.ssh/id_rsa:
(passphrase you give as oracle)
Identity added: /home/crs/.ssh/id_rsa (/home/crs/.ssh/id_rsa)
[crs@blrpmdmdb001 .ssh]$ ssh kasitesccb2 date
Tue Feb 22 19:52:15 IST 2011
[crs@blrpmdmdb001 .ssh]$
# Set Hangcheck Timer in /etc/modprobe.conf
root@blrpmdmdb001]# vi /etc/modprobe.conf
ADD #
options hangcheck-timer hangcheck_tick=10 hangcheck_margin=10
hangcheck_reboot=1
TO LOAD #

root@blrpmdmdb001]# /sbin/modprobe -v hangcheck-timer

# Install CVUQDISK Package on Both Nodes


[root@chnpccbdb101 ~]# rpm -ivh cvuqdisk-1.0.1-1.rpm
Preparing...
########################################### [100%]
1:cvuqdisk
########################################### [100%]
[root@chnpccbdb101 ~]#

# Cluster Installation
Installer: linux_x86_11gR1_clusterware
Unzip linux_x86_11gR1_clusterware
You will see runcluvfy.sh file inside clusterware directory.
$ ./runcluvfy.sh stage -pre crsinst -n chnpccbdb101,hnpccbdb102
-verbose > cluvfy_precrsinst.txt
It will create a output file cluvfy_precrsinst.txt
In cluvfy_precrsinst.txt make sure all checks are PASSED.
Once everything PASSED, start clusterware installation.
[crs@chnpccbdb101 clusterware]$ pwd
/home/crs/clusterware
[crs@chnpccbdb101 clusterware]$ ls
cluvfy
response
runcluvfy_precrsinst.txt
stage
cluvfy_crs_preinst.txt rpm
runcluvfy_precrsinst.txt.bak upgrade
doc
runcluvfy_precrsinst1.txt
runcluvfy.sh
welcome.html
install
runcluvfy_precrsinst2.txt
runInstaller
[crs@chnpccbdb101 clusterware]$ ./runInstaller

After Clusterware Install, Apply 11.1.0.7 Patch:


-------------after successful install ----crs_start
crs_start.bin crs_stat
crs_stat.bin
crs_stop
crs_stop.bin
[crs@blrpmdmdb001 bin]$ ./crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
ONLINE
blrp...b002
ora....002.ons application
ONLINE
ONLINE
blrp...b002
ora....002.vip application
ONLINE
ONLINE
blrp...b002
[crs@blrpmdmdb001 bin]$ crsctl check crs
bash: crsctl: command not found
[crs@blrpmdmdb001 bin]$ ./crsctl
crsctl
crsctl.bin
[crs@blrpmdmdb001 bin]$ ./crsctl check crs
Cluster Synchronization Services appears healthy
Cluster Ready Services appears healthy
Event Manager appears healthy
[crs@blrpmdmdb001 bin]$ ./crsctl check cssd
Cluster Synchronization Services appears healthy
[crs@blrpmdmdb001 bin]$ ./crsctl check crsd
Cluster Ready Services appears healthy
[crs@blrpmdmdb001 bin]$ ./crsctl check evmd
Event Manager appears healthy
[crs@blrpmdmdb001 bin]$ ./crsctl query crs activeversion
Oracle Clusterware active version on the cluster is
[11.1.0.6.0]
[crs@blrpmdmdb001 bin]$ ./ocrcheck
Status of Oracle Cluster Registry is as follows :
Version
:
2
Total space (kbytes)
:
2096108
Used space (kbytes)
:
1900
Available space (kbytes) :
2094208
ID
: 1132620323

Device/File Name
check succeeded
Device/File Name

: /dev/mapper/ocr1p1
Device/File integrity
: /dev/mapper/ocr2p1
Device/File integrity

check succeeded
Cluster registry integrity check succeeded
[crs@blrpmdmdb001 bin]$ ./crsctl query css votedisk
0.
0
/dev/mapper/vote1p1
1.
0
/dev/mapper/vote2p1
2.
0
/dev/mapper/vote3p1
Located 3 voting disk(s).
[crs@blrpmdmdb001 bin]$ olsnodes
bash: olsnodes: command not found
[crs@blrpmdmdb001 bin]$ ./olsnodes
blrpmdmdb001
blrpmdmdb002
[crs@blrpmdmdb001 bin]$ ./crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
ONLINE
blrp...b002
ora....002.ons application
ONLINE
ONLINE
blrp...b002
ora....002.vip application
ONLINE
ONLINE
blrp...b002
[crs@blrpmdmdb001 bin]$ ./crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
ONLINE
blrp...b002

ora....002.ons application
ONLINE
ONLINE
blrp...b002
ora....002.vip application
ONLINE
ONLINE
blrp...b002
[crs@blrpmdmdb001 bin]$ ./crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
ONLINE
blrp...b002
ora....002.ons application
ONLINE
ONLINE
blrp...b002
ora....002.vip application
ONLINE
ONLINE
blrp...b002
[crs@blrpmdmdb001 bin]$ ./crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
OFFLINE
ora....002.ons application
ONLINE
OFFLINE
ora....002.vip application
ONLINE
ONLINE
blrp...b001
[crs@blrpmdmdb001 bin]$ ./crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
OFFLINE
ora....002.ons application
ONLINE
OFFLINE
ora....002.vip application
ONLINE
ONLINE
blrp...b001

[crs@blrpmdmdb001 bin]$ ./crs_stat -t


Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
OFFLINE
ora....002.ons application
ONLINE
OFFLINE
ora....002.vip application
ONLINE
ONLINE
blrp...b001
[crs@blrpmdmdb001 bin]$ ./crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
OFFLINE
ora....002.ons application
ONLINE
OFFLINE
ora....002.vip application
ONLINE
ONLINE
blrp...b001
[crs@blrpmdmdb001 bin]$
after server- node2

restart

[crs@blrpmdmdb001 bin]$ ./crs_stat -t


Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
ONLINE
ONLINE
blrp...b002
ora....002.ons application
ONLINE
ONLINE
blrp...b002

ora....002.vip application
blrp...b002
[crs@blrpmdmdb001 bin]$

ONLINE

ONLINE

[crs@blrpmdmdb002 ~]$ srvctl stop nodeapps -n blrpmdmdb002


[crs@blrpmdmdb001 ~]$ crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
ONLINE
ONLINE
blrp...b001
ora....001.ons application
ONLINE
ONLINE
blrp...b001
ora....001.vip application
ONLINE
ONLINE
blrp...b001
ora....002.gsd application
OFFLINE
OFFLINE
ora....002.ons application
OFFLINE
OFFLINE
ora....002.vip application
OFFLINE
OFFLINE
[crs@blrpmdmdb001 ~]$ srvctl stop nodeapps -n blrpmdmdb001
[crs@blrpmdmdb001 ~]$ crs_stat -t
Name
Type
Target
State
Host
-----------------------------------------------------------ora....001.gsd application
OFFLINE
OFFLINE
ora....001.ons application
OFFLINE
OFFLINE
ora....001.vip application
OFFLINE
OFFLINE
ora....002.gsd application
OFFLINE
OFFLINE
ora....002.ons application
OFFLINE
OFFLINE
ora....002.vip application
OFFLINE
OFFLINE

ASM INSTALLATIONS:
[root@chnpccbdb101 RACInstallables]# cd asm
[root@chnpccbdb101 asm]#
[root@chnpccbdb101 asm]# ls
oracleasm-2.6.18-164.11.1.el5-2.0.5-1.el5.x86_64.rpm
oracleasm-support-2.1.7-1.el5.x86_64.rpm
oracleasmlib-2.0.4-1.el5.x86_64.rpm
[root@chnpccbdb101 asm]#
[root@chnpccbdb101 asm]# rpm -ivh oracleasm-support-2.1.71.el5.x86_64.rpm
warning: oracleasm-support-2.1.7-1.el5.x86_64.rpm: Header V3
DSA signature: NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]

1:oracleasm-support
########################################### [100%]
[root@chnpccbdb101 asm]# rpm -ivh oracleasm-2.6.18164.11.1.el5-2.0.5-1.el5.x86_64.rpm
warning: oracleasm-2.6.18-164.11.1.el5-2.0.51.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID
1e5e0159
Preparing...
########################################### [100%]
1:oracleasm-2.6.18164.11########################################### [100%]
[root@chnpccbdb101 asm]#
[root@chnpccbdb101 asm]# rpm -ivh oracleasmlib-2.0.41.el5.x86_64.rpm
warning: oracleasmlib-2.0.4-1.el5.x86_64.rpm: Header V3 DSA
signature: NOKEY, key ID 1e5e0159
Preparing...
########################################### [100%]
1:oracleasmlib
########################################### [100%]
[root@chnpccbdb101 asm]# rpm -qa|grep oracleasm
oracleasmlib-2.0.4-1.el5
oracleasm-support-2.1.7-1.el5
oracleasm-2.6.18-164.11.1.el5-2.0.5-1.el5
[root@chnpccbdb101 asm]#

1. What is the major difference between 10g and 11g RAC?

Well, there is not much difference between 10g and 11gR (1) RAC.

But there is a significant difference in 11gR2.

Prior to 11gR1(10g) RAC, the following were managed by Oracle CRS

Databases

Instances

Applications

Node Monitoring

Event Services

High Availability

From 11gR2(onwards) its completed HA stack managing and providing the following resources as like the other cluster software like VCS
etc.

Databases

Instances

Applications

Cluster Management

Node Management

Event Services

High Availability

Network Management (provides DNS/GNS/MDNSD services on behalf of other traditional services) and SCAN Single Access Client Naming
method, HAIP

Storage Management (with help of ASM and other new ACFS filesystem)

Time synchronization (rather depending upon traditional NTP)

Removed OS dependent hang checker etc, manages with own additional monitor process

2. What are Oracle Cluster Components?

Cluster Interconnect (HAIP)

Shared Storage (OCR/Voting Disk)

Clusterware software

3. What are Oracle RAC Components?

VIP, Node apps etc.

4. What are Oracle Kernel Components (nothing but how does Oracle RAC database differs than Normal single instance database in
terms of Binaries and process)

Basically Oracle kernel need to switched on with RAC On option when you convert to RAC, that is the difference as it facilitates few RAC bg process like
LMON,LCK,LMD,LMS etc.

To turn on RAC
# link the oracle libraries
$ cd $ORACLE_HOME/rdbms/lib
$ make -f ins_rdbms.mk rac_on
# rebuild oracle
$ cd $ORACLE_HOME/bin
$ relink oracle

Oracle RAC is composed of two or more database instances. They are composed of Memory structures and background processes same as the single
instance database.Oracle RAC instances use two processes GES(Global Enqueue Service), GCS(Global Cache Service) that enable cache fusion.Oracle RAC
instances are composed of following background processes:

ACMSAtomic Controlfile to Memory Service (ACMS)


GTX0-jGlobal Transaction Process
LMONGlobal Enqueue Service Monitor
LMDGlobal Enqueue Service Daemon
LMSGlobal Cache Service Process
LCK0Instance Enqueue Process
RMSnOracle RAC Management Processes (RMSn)
RSMNRemote Slave Monitor

5. What is Clusterware?

Software that provides various interfaces and services for a cluster. Typically, this includes capabilities that:

Allow the cluster to be managed as a whole

Protect the integrity of the cluster

Maintain a registry of resources across the cluster

Deal with changes to the cluster

Provide a common view of resources

6. What are the background process that exists in 11gr2 and functionality?

Process Name

Functionality

crsd

The CRS daemon (crsd) manages cluster resources based on configuration information that is stored in Oracle Cluster Registry
(OCR) for each resource. This includes start, stop, monitor, and failover operations. The crsd process generates events when the
status of a resource changes.

cssd

Cluster Synchronization Service (CSS): Manages the cluster configuration by controlling which nodes are members of the cluster
and by notifying members when a node joins or leaves the cluster. If you are using certified third-party clusterware, then CSS
processes interfaces with your clusterware to manage node membership information. CSS has three separate processes: the CSS
daemon (ocssd), the CSS Agent (cssdagent), and the CSS Monitor (cssdmonitor). The cssdagent process monitors the cluster and
provides input/output fencing. This service formerly was provided by Oracle Process Monitor daemon (oprocd), also known as
OraFenceService on Windows. A cssdagent failure results in Oracle Clusterware restarting the node.

diskmon

Disk Monitor daemon (diskmon): Monitors and performs input/output fencing for Oracle Exadata Storage Server. As Exadata
storage can be added to any Oracle RAC node at any point in time, the diskmon daemon is always started when ocssd is started.

evmd

Event Manager (EVM): Is a background process that publishes Oracle Clusterware events

mdnsd

Multicast domain name service (mDNS): Allows DNS requests. The mDNS process is a background process on Linux and UNIX,
and a service on Windows.

gnsd

Oracle Grid Naming Service (GNS): Is a gateway between the cluster mDNS and external DNS servers. The GNS process performs
name resolution within the cluster.

ons

Oracle Notification Service (ONS): Is a publish-and-subscribe service for communicating Fast Application Notification (FAN) events

oraagent

oraagent: Extends clusterware to support Oracle-specific requirements and complex resources. It runs server callout scripts when
FAN events occur. This process was known as RACG in Oracle Clusterware 11g Release 1 (11.1).

orarootagent

Oracle root agent (orarootagent): Is a specialized oraagent process that helps CRSD manage resources owned by root, such as
the network, and the Grid virtual IP address

oclskd

Cluster kill daemon (oclskd): Handles instance/node evictions requests that have been escalated to CSS

gipcd

Grid IPC daemon (gipcd): Is a helper daemon for the communications infrastructure

ctssd

Cluster time synchronisation daemon(ctssd) to manage the time syncrhonization between nodes, rather depending on NTP

7. Under which user or owner the process will start?

Component

Name of the Process

Owner

Oracle High Availability Service

ohasd

init, root

Cluster Ready Service (CRS)

Cluster Ready Services

root

Cluster Synchronization Service (CSS)

ocssd,cssd monitor, cssdagent

grid owner

Event Manager (EVM)

evmd, evmlogger

grid owner

Cluster Time Synchronization Service (CTSS)

octssd

root

Oracle Notification Service (ONS)

ons, eons

grid owner

Oracle Agent

oragent

grid owner

Oracle Root Agent

orarootagent

root

Grid Naming Service (GNS)

gnsd

root

Grid Plug and Play (GPnP)

gpnpd

grid owner

Multicast domain name service (mDNS)

mdnsd

grid owner

8. What is startup sequence in Oracle 11g RAC? 11g RAC startup sequence?

Click here to know more details

9. As you said Voting & OCR Disk resides in ASM Diskgroups, but as per startup sequence OCSSD starts first before than ASM, how is it
possible?

How does OCSSD starts if voting disk & OCR resides in ASM Diskgroups?

You might wonder how CSSD, which is required to start the clustered ASM instance, can be started if voting disks are stored in ASM? This sounds like a
chicken-and-egg problem: without access to the voting disks there is no CSS, hence the node cannot join the cluster. But without being part of the cluster,
CSSD cannot start the ASM instance. To solve this problem the ASM disk headers have new metadata in 11.2: you can use kfed to read the header of an
ASM disk containing a voting disk. The kfdhdb.vfstart and kfdhdb.vfend fields tell CSS where to find the voting file. This does not require the ASM instance
to be up. Once the voting disks are located, CSS can access them and joins the cluster.

Source: Pro Oracle Database 11g RAC on Linux- Martin Bach Amazon.com

10. How does SCAN works?

1.

Client Connected through SCAN name of the cluster (remember all three IP addresses round robin resolves to same Host name (SCAN Name),
here in this case our scan name is cluster01-scan.cluster01.example.com

2.

The request reaches to DNS server in your corp and then resolves to one of the node out of three. a. If GNS (Grid Naming service or domain
is configured) that is a subdomain configured in the DNS entry for to resolve cluster address the request will be handover to GNS (gnsd)

3.

Here in our case assume there is no GNS, now the with the help of SCAN listeners where end points are configured to database listener.

4.

Database Listeners listen the request and then process further.

5.

In case of node addition, Listener 4, client need not to know or need not change any thing from their tns entry (address of 4 th node/instance)
as they just using scan IP.

6.

Same case even in the node deletion.

11. What is GNS?

Grid Naming service is alternative service to DNS , which will act as a sub domain in your DNS but managed by Oracle, with GNS the connection is routed
to the cluster IP and manages internally.

12. What is GPNP?

Grid Plug and Play along with GNS provide dynamic

In previous releases, adding or removing servers in a cluster required extensive manual preparation.

In Oracle Database 11g Release 2, GPnP allows each node to perform the following tasks dynamically:

Negotiating appropriate network identities for itself

Acquiring additional information from a configuration profile

Configuring or reconfiguring itself using profile data, making host names and addresses resolvable on the network

For example a domain should contain

Cluster name: cluster01

Network domain: example.com

GPnP domain: cluster01.example.com

To add a node, simply connect the server to the cluster and allow the cluster to configure the node.

To make it happen, Oracle uses the profile located in $GI_HOME/gpnp/profiles/peer/profile.xml which contains the cluster resources, for example disk
locations of ASM. etc.

So this profile will be read local or from the remote machine when plugged into cluster and dynamically added to cluster.

13. What are the file types that ASM support and keep in disk groups?

Control files

Flashback logs

Data Pump dump sets

Data files

DB SPFILE

Data Guard configuration

Temporary data files

RMAN backup sets

Change tracking bitmaps

Online redo logs

RMAN data file copies

OCR files

Archive logs

Transport data files

ASM SPFILE

14. List Key benefits of ASM?

Stripes files rather than logical volumes

Provides redundancy on a file basis

Enables online disk reconfiguration and dynamic rebalancing

Reduces the time significantly to resynchronize a transient failure by tracking changes while disk is offline

Provides adjustable rebalancing speed

Is cluster-aware

Supports reading from mirrored copy instead of primary copy for extended clusters

Is automatically installed as part of the Grid Infrastructure

15. List key benefits of Oracle Grid Infrastructure?

16. List some of the background process that used in ASM?

Process

Description

RBAL

Opens all device files as part of discovery and coordinates the rebalance activity

ARBn

One or more slave processes that do the rebalance activity

GMON

Responsible for managing the disk-level activities such as drop or offline and advancing the ASM

disk group compatibility


MARK

Marks ASM allocation units as stale when needed

Onnn

One or more ASM slave processes forming a pool of connections to the ASM instance for
exchanging messages

PZ9n

One or more parallel slave processes used in fetching data on clustered ASM installation from
GV$ views

13. What is node listener?

In 11gr2 the listeners will run from Grid Infrastructure software home

The node listener is a process that helps establish network connections from ASM clients to the ASM instance.

Runs by default from the Grid $ORACLE_HOME/bin directory

Listens on port 1521 by default

Is the same as a database instance listener

Is capable of listening for all database instances on the same machine in addition to the ASM instance

Can run concurrently with separate database listeners or be replaced by a separate database listener

Is named tnslsnr on the Linux platform

15. What is SCAN listener?

A scan listener is something that additional to node listener which listens the incoming db connection requests from the client which got through the scan
IP, it got end points configured to node listener where it routes the db connection requests to particular node listener.

16. What is the difference between CRSCTL and SRVCTL?

crsctl manages clusterware-related operations:

Starting and stopping Oracle Clusterware

Enabling and disabling Oracle Clusterware daemons

Registering cluster resources

srvctl manages Oracle resourcerelated operations:

Starting and stopping database instances and services

Also from 11gR2 manages the cluster resources like network,vip,disks etc

17. How to control Oracle Clusterware?

To start or stop Oracle Clusterware on a specific node:

# crsctl stop crs

# crsctl start crs

To enable or disable Oracle Clusterware on a specific node:

# crsctl enable crs

# crsctl disable crs

19. How to check the cluster (all nodes) status?

To check the viability of Cluster Synchronization Services (CSS) across nodes:

$ crsctl check cluster

CRS-4537: Cluster Ready Services is online

CRS-4529: Cluster Synchronization Services is online

CRS-4533: Event Manager is online

20. How to check the cluster (one node) status?

$ 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

21. How to find Voting Disk location?

To determine the location of the voting disk:

# crsctl query css votedisk

## STATE File Universal Id File Name Disk group

- -

1. ONLINE 8c2e45d734c64f8abf9f136990f3daf8 (ASMDISK01) [DATA]

2. ONLINE 99bc153df3b84fb4bf071d916089fd4a (ASMDISK02) [DATA]

3. ONLINE 0b090b6b19154fc1bf5913bc70340921 (ASMDISK03) [DATA]

Located 3 voting disk(s).

22. How to find Location of OCR?

cat /etc/oracle/ocr.loc

ocrconfig_loc=+DATA

local_only=FALSE

#OCRCHECK (also about OCR integrity)

23. List some background process that used in ASM Instances?

Process

Description

RBAL

Opens all device files as part of discovery and coordinates the rebalance activity

ARBn

One or more slave processes that do the rebalance activity

GMON

Responsible for managing the disk-level activities such as drop or offline and advancing the ASM
disk group compatibility

MARK

Marks ASM allocation units as stale when needed

Onnn

One or more ASM slave processes forming a pool of connections to the ASM instance for
exchanging messages

PZ9n

One or more parallel slave processes used in fetching data on clustered ASM installation from
GV$ views

24. What are types of ASM Mirroring?

Disk Group Type

Supported MirroringLevels

Default Mirroring Level

External redundancy

Unprotected (None)

Unprotected (None)

Normal redundancy

Two-wayThree-wayUnprotected
(None)

Two-way

High redundancy

Three-way

Three-way

25. What is ASM Striping?

ASM can use variable size data extents to support larger files, reduce memory requirements, and improve performance.

Each data extent resides on an individual disk.

Data extents consist of one or more allocation units.

The data extent size is:

Equal to AU for the first 20,000 extents (019999)

Equal to 4 AU for the next 20,000 extents (2000039999)

Equal to 16 AU for extents above 40,000

ASM stripes files using extents with a coarse method for load balancing or a fine method to reduce latency.

Coarse-grained striping is always equal to the effective AU size.

Fine-grained striping is always equal to 128 KB.

26. How many ASM Diskgroups can be created under one ASM Instance?

ASM imposes the following limits:

63 disk groups in a storage system

10,000 ASM disks in a storage system

Two-terabyte maximum storage for each ASM disk (non-Exadata)

Four-petabyte maximum storage for each ASM disk (Exadata)

40-exabyte maximum storage for each storage system

1 million files for each disk group

ASM file size limits (database limit is 128 TB):

1.

External redundancy maximum file size is 140 PB.

2.

Normal redundancy maximum file size is 42 PB.

3.

High redundancy maximum file size is 15 PB.

27. How to find the cluster network settings?

To determine the list of interfaces available to the cluster:

$ oifcfg iflist p -n

To determine the public and private interfaces that have been configured:

$ oifcfg getif

eth0 192.0.2.0 global public

eth1 192.168.1.0 global cluster_interconnect

To determine the Virtual IP (VIP) host name, VIP address, VIP subnet mask, and VIP interface name:

$ srvctl config nodeapps -a

VIP exists.:host01

VIP exists.: /192.0.2.247/192.0.2.247/255.255.255.0/eth0

28. How to change Public or VIP Address in RAC Cluster?

Click here for details

29. How to change Cluster interconnect in RAC?

On a single node in the cluster, add the new global interface specification:

$ oifcfg setif -global eth2/192.0.2.0:cluster_interconnect

Verify the changes with oifcfg getif and then stop Clusterware on all nodes by running the following command as root on each node:

# oifcfg getif

# crsctl stop crs

Assign the network address to the new network adapters on all nodes using ifconfig:

#ifconfig eth2 192.0.2.15 netmask 255.255.255.0 broadcast 192.0.2.255

Remove the former adapter/subnet specification and restart Clusterware:

$ oifcfgdelif -global eth1/192.168.1.0

# crsctl start crs

30. Managing or Modifying SCAN in Oracle RAC?

To add a SCAN VIP resource:

$ srvctl add scan -n cluster01-scan

To remove Clusterware resources from SCAN VIPs:

$ srvctl remove scan [-f]

To add a SCAN listener resource:

$ srvctl add scan_listener

$ srvctl add scan_listener -p 1521

To remove Clusterware resources from all SCAN listeners:

$ srvctl remove scan_listener [-f]

31. How to check the node connectivity in Oracle Grid Infrastructure?

$ cluvfy comp nodecon -n all verbose

32. Can I stop all nodes in one command? Meaning that stopping whole cluster ?

In 10g its not possible, where in 11g it is possible

[root@pic1]# crsctl start cluster -all


[root@pic2]# crsctl stop cluster all

33. What is OLR? Which of the following statements regarding the Oracle Local Registry (OLR) is true?

1.Each cluster node has a local registry for node-specific resources.

2.The OLR should be manually created after installing Grid Infrastructure on each node in the cluster.

3.One of its functions is to facilitate Clusterware startup in situations where the ASM stores the OCR and voting disks.

4.You can check the status of the OLR using ocrcheck.

34. What is runfixup.sh script in Oracle Clusterware 11g release 2 installation

With Oracle Clusterware 11g release 2, Oracle Universal Installer (OUI) detects when the minimum requirements for an installation are not met, and
creates shell scripts, called fixup scripts, to finish incomplete system configuration steps. If OUI detects an incomplete task, then it generates fixup scripts
(runfixup.sh). You can run the fixup script after you click the Fix and Check Again Button.

The Fixup script does the following:

If necessary sets kernel parameters to values required for successful installation, including:

Shared memory parameters.

Open file descriptor and UDP send/receive parameters.

Sets permissions on the Oracle Inventory (central inventory) directory. Reconfigures primary and secondary group memberships for the installation owner,
if necessary, for the Oracle Inventory directory and the operating system privileges groups.

Sets shell limits if necessary to required values.

35. How to stop whole cluster with single command

crsctl stop cluster (possible only from 11gr2), please note crsctl commands becomes global now, if you do not specify node specifically the
command executed globally for example
crsctl stop crs (stops in all crs resource in all nodes)
crsctl stop crs n <ndeoname) (stops only in specified node)

36. CRS is not starting automatically after a node reboot, what you do to make it happen?

crsctl enable crs (as root)

to disable

crsctl disable crs (as root)

37. What are server pools in 11gr2?

Read here

38. What is policy managed databases in RAC?

Read here

39. What is Load balancing & how does it work?

You must read here & here

40. Describe high level Steps to convert single instance to RAC?

Read here

41. What is the difference between TAF and FAN & FCF? at what conditions you use them?

1) TAF with tnsnames


a feature of Oracle Net Services for OCI8 clients. TAF is transparent application failover which will move a session to a backup connection if the session
fails. With Oracle 10g Release 2, you can define the TAF policy on the service using dbms_service package. It will only work with OCI clients. It will only
move the session and if the parameter is set, it will failover the select statement. For insert, update or delete transactions, the application must be TAF
aware and roll back the transaction. YES, you should enable FCF on your OCI client when you use TAF, it will make the failover faster.
Note: TAF will not work with JDBC thin.
2) FAN with tnsnames with aq notifications true

FAN is a feature of Oracle RAC which stands for Fast Application Notification. This allows the database to notify the client of any change (Node up/down,
instance up/down, database up/down). For integrated clients, inflight transactions are interrupted and an error message is returned. Inactive connections
are terminated.
FCF is the client feature for Oracle Clients that have integrated with FAN to provide fast failover for connections. Oracle JDBC Implicit Connection Cache,
Oracle Data Provider for .NET (ODP.NET) and Oracle Call Interface are all integrated clients which provide the Fast Connection Failover feature.
3) FCF, along with FAN when using connection pools
FCF is a feature of Oracle clients that are integrated to receive FAN events and abort inflight transactions, clean up connections when a down event is
received as well as create new connections when a up event is received. Tomcat or JBOSS can take advantage of FCF if the Oracle connection pool is used
underneath. This can be either UCP (Universal Connection Pool for JAVA) or ICC (JDBC Implicit Connection Cache). UCP is recommended as ICC will be
deprecated in a future release.

4) ONS, with clusterware either FAN/FCF

ONS is part of the clusterware and is used to propagate messages both between nodes and to application-tiers
ONS is the foundation for FAN upon which is built FCF.
RAC uses FAN to publish configuration changes and LBA events. Applications can react as those published events in two way :
- by using ONS api (you need to program it)

- by using FCF (automatic by using JDBC implicit connection cache on the application server)
you can also respond to FAN event by using server-side callout but this on the server side (as their name suggests it)

Relationship between FAN/FCF/ONS

ONS > FAN > FCF


ONS -> send/receive messages on local and remote nodes.
FAN -> uses ONS to notify other processes about changes in configuration of service level
FCF -> uses FAN information working with conection pools JAVA and others.

42. Can you add voting disk online? Do you need voting disk backup?

Yes, as per documentation, if you have multiple voting disk you can add online, but if you have only one voting disk , by that cluster will be down as its
lost you just need to start crs in exclusive mode and add the votedisk using

crsctl add votedisk <path>

43. You have lost OCR disk, what is your next step?

The cluster stack will be down due to the fact that cssd is unable to maintain the integrity, this is true in 10g, From 11gR2 onwards, the crsd stack will be
down, the hasd still up and running. You can add the ocr back by restoring the automatic backup or import the manual backup,

Read complete steps here

44. What happens when ocssd fails, what is node eviction? how does node eviction happens? For all answer will be same.

Read here

45. What is virtual IP and how does it works?

Read here

46. Describe some rac wait events you experienced?

Oracle RAC Wait events

and this table,

47. Can you modify VIP address after your cluster installation?

Yes, read here

48. How do you interpret AWR report in RAC instances, what sections in awr report for rac instances are most important?

Read here.

Update 12-May-2013, Some practical questions added here

1. Viewing Contents in OCR/Voting disks

There are three possible ways to view the OCR contents.


a.

OCRDUMP (or)

b.

crs_stat -p

c.

By using strings.

(or)

Voting disk contents are not persistent and are not required to view the contents, because the voting disk contents will be
overwritten. if still need to view, strings are used.

2. Server pools Read in my blog

3. Verifying Cluster Interconnect

Cluster interconnects can be verified by:


i.

oifcfg getif

ii.

From AWR Report.

iii.

show parameter cluster_interconnect

iv.

srvctl config network

4. Does scan IP required or we can disable it

SCAN IP can be disabled if not required. However SCAN IP is mandatory during the RAC installation. Enabling/disabling SCAN IP
is mostly used in oracle apps environment by the concurrent manager (kind of job scheduler in oracle apps).
To disable the SCAN IP,
i.

Do not use SCAN IP at the client end.

ii.

Stop scan listener


srvctl stop scan_listener

iii.

Stop scan
srvctl stop scan (this will stop the scan vip's)

iv.

Disable scan and disable scan listener


srvctl disable scan

5. Migrating to new Diskgroup scenarious

a.

Case 1: Migrating disk group from one storage to other with same name
1. Consider the disk group is DATA,
2. Create new disks in DATA pointing towards the new storage (EMC),
a) Partioning provisioning done by storage and they give you the device name or mapper like /dev/mapper/asakljdlas
3. Add the new disk to diskgroup DATA
a) Alter diskgroup data add disk '/dev/mapper/asakljdlas'
3. drop the old disks from DATA with which rebalancing is done automatically.
If you want you can the rebalance by alter system set asm_power_limit =12 for full throttle.
alter diskgroup data drop disk 'path to hitachi storage'
Note: you can get the device name in v$asm_disk in path column.
4. Request SAN team to detach the old Storage (HITACHI).

b.

Case 2: Migrating disk group from one to another with different diskgroup name.
1) Create the Disk group with new name in the new storage.
2) Create the spfile in new diskgroup and change the parameter scope = spfile for control files etc.
3) Take a control file backup in format +newdiskgroup
4) Shutdown the db, startup nomount the database
5) restore the control file from backup (now the control will restore to new diskgroup)
6) Take the RMAN backup as copy of all the databases with new format.
RMAN> backup database as copy format '+newdiskgroup name' ;
3) RMAN> Switch database to copy.
4) Verify dba_data_files,dba_temp_files, v$log that all files are pointing to new diskgroup name.

c.

Case 3: Migrating disk group to new storage but no additional diskgroup given
1) Take the RMAN backup as copy of all the databases with new format and place it in the disk.
2) Prepare rename commands from v$log ,v$datafile etc (dynamic queries)
3) Take a backup of pfile and modify the following referring to new diskgroup name
.control_files
.db_create_file_dest
.db_create_online_log_dest_1
.db_create_online_log_dest_2
.db_recovery_file_des
4) stop the database
5) Unmount the diskgroup
asmcmd umount ORA_DATA
6) use asmcmd renamedg (11gr2 only) command to rename to new diskgroup
renamedg phase=both dgname=ORA_DATA newdgname=NEW_DATA verbose=true
7)

mount the diskgroup

asmcmd mount NEW_DATA


8) start the database in mount with new pfile taken backup in step 3
9) Run the rename file scripts generated at step2
9) Add the diskgroup to cluster the cluster (if using rac)
srvctl modify database -d orcl -p +NEW_FRA/orcl/spfileorcl.ora
srvctl modify database -d orcl -a "NEW_DATA"
srvctl config database -d orcl
srvctl start database -d orcl
10) Delete the old diskgroup from cluster
crsctl delete resource ora.ORA_DATA.dg
11) Open the database.

7. Database rename in RAC, what could be the checklist for you?

a.

Take the outputs of all the services that are running on the databases.

b.

set cluster_database=FALSE

c.

Drop all the services associated with the database.

d.

Stop the database

e.

Startup mount

f.

Use nid to change the DB Name.

Generic question, If using ASM the usual location for the datafile would be
+DATA/datafile/OLDDBNAME/system01.dbf'
Does NID changes this path too? to reflect the new db name?
Yes it will, by using proper directory structure it will create a links to original directory structure.
+DATA/datafile/NEWDBNAME/system01.dbf'
this has to be tested,

We dont have test bed, but thanks to Anji who confirmed it will

g.

Change the parameters according to the new database name

h.

Change the password file.

i.

Stop the database.

j.

Mount the database

k.

Open database with Reset logs

l.

Create spfile from pfile.

m.

Add database to the cluster.

n.

Create the services that are dropped in prior to rename.

o.

Bounce the database.

8.How to find the database in which particular service is attached to when you have a large number of databases running in the server, you cannot check
one by one manually

Write a shell script to read the database name from oratab and iterate the loop taking inpt as DB name in srvctl to get the result.
#!/bin/ksh
ORACLE_HOME=
PATH=$ORACLE_HOME/bin:$PATH
LD_LIBRARY_PATH=${SAVE_LLP}:${ORACLE_HOME}/lib
export TNS_ADMIN ORACLE_HOME PATH LD_LIBRARY_PATH
for INSTANCE in `cat /etc/oratab|grep -v "^#"|cut -f1 -d: -s`
do
export ORACLE_SID=$INSTANCE
echo `srvctl status service -d $INSTANCE -s $1| grep -i "is running"`
done

9. Difference between OHAS and CRS


OHAS is complete cluster stack which includes some kernel level tasks like managing network,time synchronization, disks etc, where the CRS has the
ability to manage the resources like database,listeners,applications, etc With both of this Oracle provides the high availabilityclustering services rather
only affinity to databases.

S-ar putea să vă placă și