©2015 - 2022 Chad’s Technoworks. Disclaimer and Terms of Use

Chad’s TechnoWorks My Journal On Technology

Information Technology

Oracle Grid Cluster Installation With NFS - page 6

Prev< 1 2 3 4 5 6

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-vip oem-vip.vlabs.net


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 -t

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 -t

--------------------------------------------------------------------------------

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-configured IP for omsvip.


root@s11node1:~# ipadm show-addr

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-addr net0/oemvip

root@s11node1:~# ipadm show-addr

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 -network=1 -ip=172.16.33.99 -vipname=omsvip -user=root

Production Copyright 2007, 2008, Oracle.All rights reserved

2015-06-30 14:06:50: Creating Resource Type

2015-06-30 14:06:50: Executing /opt/app/11.2.0.4/ogrid/bin/crsctl add type app.appvip_net1.type -basetype ora.cluster_vip_net1.type -file /opt/app/11.2.0.4/ogrid/crs/template/appvip.type

2015-06-30 14:06:50: Executing cmd: /opt/app/11.2.0.4/ogrid/bin/crsctl add type app.appvip_net1.type -basetype ora.cluster_vip_net1.type -file /opt/app/11.2.0.4/ogrid/crs/template/appvip.type

2015-06-30 14:06:51: Create the Resource

2015-06-30 14:06:51: Executing /opt/app/11.2.0.4/ogrid/bin/crsctl add resource omsvip -type app.appvip_net1.type -attr "USR_ORA_VIP=172.16.33.99,START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network),STOP_DEPENDENCIES=hard(ora.net1.network),ACL='owner:root:rwx,pgrp:root:r-x,other::r--,user:root:r-x',HOSTING_MEMBERS=s11node1,APPSVIP_FAILBACK="

2015-06-30 14:06:51: Executing cmd: /opt/app/11.2.0.4/ogrid/bin/crsctl add resource omsvip -type app.appvip_net1.type -attr "USR_ORA_VIP=172.16.33.99,START_DEPENDENCIES=hard(ora.net1.network) pullup(ora.net1.network),STOP_DEPENDENCIES=hard(ora.net1.network),ACL='owner:root:rwx,pgrp:root:r-x,other::r--,user:root:r-x',HOSTING_MEMBERS=s11node1,APPSVIP_FAILBACK="

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 -u user:oragrid:r-x


root@s11node1:/opt/app/11.2.0.4/ogrid/bin# ./crsctl setperm resource omsvip -u user:oragrid:r-x

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 -t

--------------------------------------------------------------------------------

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$



Starting The Network Resource

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 -n s11node1

CRS-2672: Attempting to start 'omsvip' on 's11node1'

CRS-2676: Start of 'omsvip' on 's11node1' succeeded

oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$


oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl stat res -t

--------------------------------------------------------------------------------

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-addr

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#



Resource Failover Tests


Let's test the failover of the vip onto the next node as specified.


As grid user,

crsctl relocate resource omsvip -n s11node2


oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$ crsctl relocate resource omsvip -n s11node2

CRS-2673: Attempting to stop 'omsvip' on 's11node1'

CRS-2677: Stop of 'omsvip' on 's11node1' succeeded

CRS-2672: Attempting to start 'omsvip' on 's11node2'

CRS-2676: Start of 'omsvip' on 's11node2' succeeded

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-2673: Attempting to stop 'omsvip' on 's11node2'

CRS-2677: Stop of 'omsvip' on 's11node2' succeeded

CRS-2672: Attempting to start 'omsvip' on 's11node1'

CRS-2676: Start of 'omsvip' on 's11node1' succeeded

oragrid@s11node1:/opt/app/11.2.0.4/ogrid/bin$