©2015 -
Oracle Grid Cluster Installation With NFS -
APPLICATION RESOURCE CONFIGURATION
Adding An Application VIP Resource In The Cluster
In this exercise, we'll add an existing VIP to be managed by the grid cluster. Later on, this VIP will be used by an application which in this case is Oracle's OEM.
Having the VIP controlled by the cluster allows it to have failover capability to another available node once the current node goes down.
It is required that the VIP can be resolved either locally or through DNS.
In my case, I had it resolved locally, and so I had my entry at the /etc/hosts:
172.16.33.99 oem-
Since in my previous demonstration, I had this configured physically on the network interface, we have to drop VIP in order for it to be controlled by the grid cluster.
So without further ado, let's begin our exercise.
Check The Status Of the Grid Cluster
Ensure that all nodes are up and all the critical cluster components are running.
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crs_stat -
Name Type Target State Host
-
ora....ER.lsnr ora....er.type ONLINE ONLINE s11node1
ora....N1.lsnr ora....er.type ONLINE ONLINE s11node1
ora.asm ora.asm.type OFFLINE OFFLINE
ora.cvu ora.cvu.type ONLINE ONLINE s11node1
ora.gsd ora.gsd.type OFFLINE OFFLINE
ora....network ora....rk.type ONLINE ONLINE s11node1
ora.oc4j ora.oc4j.type ONLINE ONLINE s11node1
ora.ons ora.ons.type ONLINE ONLINE s11node1
ora....ry.acfs ora....fs.type OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....E1.lsnr application ONLINE ONLINE s11node1
ora....de1.gsd application OFFLINE OFFLINE
ora....de1.ons application ONLINE ONLINE s11node1
ora....de1.vip ora....t1.type ONLINE ONLINE s11node1
ora....SM2.asm application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora....de2.gsd application OFFLINE OFFLINE
ora....de2.ons application ONLINE ONLINE s11node2
ora....de2.vip ora....t1.type ONLINE ONLINE s11node2
ora.scan1.vip ora....ip.type ONLINE ONLINE s11node1
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl stat res -
-
NAME TARGET STATE SERVER STATE_DETAILS
-
Local Resources
-
ora.LISTENER.lsnr
ONLINE ONLINE s11node1
OFFLINE OFFLINE s11node2
ora.asm
OFFLINE OFFLINE s11node1 Instance Shutdown
OFFLINE OFFLINE s11node2
ora.gsd
OFFLINE OFFLINE s11node1
OFFLINE OFFLINE s11node2
ora.net1.network
ONLINE ONLINE s11node1
ONLINE ONLINE s11node2
ora.ons
ONLINE ONLINE s11node1
ONLINE ONLINE s11node2
ora.registry.acfs
OFFLINE OFFLINE s11node1
OFFLINE OFFLINE s11node2
-
Cluster Resources
-
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE s11node1
ora.cvu
1 ONLINE ONLINE s11node1
ora.oc4j
1 ONLINE ONLINE s11node1
ora.s11node1.vip
1 ONLINE ONLINE s11node1
ora.s11node2.vip
1 ONLINE ONLINE s11node2
ora.scan1.vip
1 ONLINE ONLINE s11node1
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$
Dropping An Existing VIP For Use With Cluster
Switch to root and drop the pre-
root@s11node1:~# ipadm show-
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4 dhcp ok 172.16.33.120/24
net0/oemvip static ok 172.16.33.99/24
net0/v4b static ok 172.16.33.100/24
net0/v4c static ok 172.16.33.118/24
net1/v4 dhcp ok 192.168.65.111/24
net1/v4a static ok 169.254.246.197/16
lo0/v6 static ok ::1/128
net0/v6 addrconf ok fe80::20c:29ff:fe1b:7a7b/10
net1/v6 addrconf ok fe80::250:56ff:fe21:4912/10
root@s11node1:~# ipadm delete-
root@s11node1:~# ipadm show-
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4 dhcp ok 172.16.33.120/24
net0/v4b static ok 172.16.33.100/24
net0/v4c static ok 172.16.33.118/24
net1/v4 dhcp ok 192.168.65.111/24
net1/v4a static ok 169.254.246.197/16
lo0/v6 static ok ::1/128
net0/v6 addrconf ok fe80::20c:29ff:fe1b:7a7b/10
net1/v6 addrconf ok fe80::250:56ff:fe21:4912/10
root@s11node1:~#
Add A Network Resource To The Grid Cluster
Login as root since only root can modify network interfaces.
root@s11node1:~# cd /opt/app/11.2.0.4/ogrid/bin
root@s11node1:/opt/app/11.2.0.4/ogrid/bin#
root@s11node1:/opt/app/11.2.0.4/ogrid/bin# ./appvipcfg create -
Production Copyright 2007, 2008, Oracle.All rights reserved
2015-
2015-
2015-
2015-
2015-
2015-
root@s11node1:/opt/app/11.2.0.4/ogrid/bin#
Grant Run/Exec Permissions To Grid User To Manage Network Resource
Next we'll configure the cluster to allow the Oracle Grid software owner to run the script to start the VIP.
As root, execute the command below:
crsctl setperm resource omsvip -
root@s11node1:/opt/app/11.2.0.4/ogrid/bin# ./crsctl setperm resource omsvip -
root@s11node1:/opt/app/11.2.0.4/ogrid/bin#
Let's check the grid cluster status, we expect that omsvip resource is offline.
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl stat res -
-
NAME TARGET STATE SERVER STATE_DETAILS
-
Local Resources
-
ora.LISTENER.lsnr
ONLINE ONLINE s11node1
OFFLINE OFFLINE s11node2
ora.asm
OFFLINE OFFLINE s11node1 Instance Shutdown
OFFLINE OFFLINE s11node2
ora.gsd
OFFLINE OFFLINE s11node1
OFFLINE OFFLINE s11node2
ora.net1.network
ONLINE ONLINE s11node1
ONLINE ONLINE s11node2
ora.ons
ONLINE ONLINE s11node1
ONLINE ONLINE s11node2
ora.registry.acfs
OFFLINE OFFLINE s11node1
OFFLINE OFFLINE s11node2
-
Cluster Resources
-
omsvip
1 OFFLINE OFFLINE
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE s11node1
ora.cvu
1 ONLINE ONLINE s11node1
ora.oc4j
1 ONLINE ONLINE s11node1
ora.s11node1.vip
1 ONLINE ONLINE s11node1
ora.s11node2.vip
1 ONLINE ONLINE s11node2
ora.scan1.vip
1 ONLINE ONLINE s11node1
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$
Now that oragrid user has permission on the omsvip resource, we can proceed to start it up as grid user.
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl start resource omsvip -
CRS-
CRS-
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl stat res -
-
NAME TARGET STATE SERVER STATE_DETAILS
-
Local Resources
-
ora.LISTENER.lsnr
ONLINE ONLINE s11node1
OFFLINE OFFLINE s11node2
ora.asm
OFFLINE OFFLINE s11node1 Instance Shutdown
OFFLINE OFFLINE s11node2
ora.gsd
OFFLINE OFFLINE s11node1
OFFLINE OFFLINE s11node2
ora.net1.network
ONLINE ONLINE s11node1
ONLINE ONLINE s11node2
ora.ons
ONLINE ONLINE s11node1
ONLINE ONLINE s11node2
ora.registry.acfs
OFFLINE OFFLINE s11node1
OFFLINE OFFLINE s11node2
-
Cluster Resources
-
omsvip
1 ONLINE ONLINE s11node1
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE s11node1
ora.cvu
1 ONLINE ONLINE s11node1
ora.oc4j
1 ONLINE ONLINE s11node1
ora.s11node1.vip
1 ONLINE ONLINE s11node1
ora.s11node2.vip
1 ONLINE ONLINE s11node2
ora.scan1.vip
1 ONLINE ONLINE s11node1
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$
Now, let's see how it looks like at the network interface of this newly started resource.
root@s11node1:/opt/app/11.2.0.4/ogrid/bin# ipadm show-
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4 dhcp ok 172.16.33.120/24
net0/v4a static ok 172.16.33.99/24
net0/v4b static ok 172.16.33.100/24
net0/v4c static ok 172.16.33.118/24
net1/v4 dhcp ok 192.168.65.111/24
net1/v4a static ok 169.254.246.197/16
lo0/v6 static ok ::1/128
net0/v6 addrconf ok fe80::20c:29ff:fe1b:7a7b/10
net1/v6 addrconf ok fe80::250:56ff:fe21:4912/10
root@s11node1:/opt/app/11.2.0.4/ogrid/bin#
Let's test the failover of the vip onto the next node as specified.
As grid user,
crsctl relocate resource omsvip -
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl relocate resource omsvip -
CRS-
CRS-
CRS-
CRS-
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl stat res omsvip
NAME=omsvip
TYPE=app.appvip_net1.type
TARGET=ONLINE
STATE=ONLINE on s11node2
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$
Now that's done, let's failback the vip to node1 since the application that needs it is there:
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl relocate resource omsvip
CRS-
CRS-
CRS-
CRS-
oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$