Please see my other blog for Oracle EBusiness Suite Posts - EBMentors

Search This Blog

Note: All the posts are based on practical approach avoiding lengthy theory. All have been tested on some development servers. Please don’t test any post on production servers until you are sure.

Monday, October 08, 2012

Adding vip resource (11gR2 Linux)

Enviroment: Oracle Linux 5 update 5 64bit, Oracle RAC 11gR2

While installing  RDBMS software on Oracle 11gR2 cluster following error was encountered.



as error showed that vip resource is not existing for one of the node, it was added as below.
1-  First check the nodeapps status

[root@rac2 bin]# ./srvctl status nodeapps
VIP rac1-vip is enabled
VIP rac1-vip is running on node: rac1
Network is enabled
Network is running on node: rac1
Network is running on node: rac2
GSD is disabled
GSD is not running on node: rac1
GSD is not running on node: rac2
ONS is enabled
ONS daemon is running on node: rac1
ONS daemon is running on node: rac2
eONS is enabled
eONS daemon is running on node: rac1
eONS daemon is running on node: rac2

You observe that no rac2-vip resource is not running.

2- Further confirm by checking the config and ping
[root@rac2 bin]# ./srvctl config nodeapps -a
VIP exists.:rac1
VIP exists.: /rac1-vip/132.35.21.187/255.255.255.0/eth0

[root@rac2 bin]# ping rac2-vip
PING rac2-vip.localdomain (132.35.21.188) 56(84) bytes of data.
From rac2.localdomain (132.35.21.178) icmp_seq=2 Destination Host Unreachable
From rac2.localdomain (132.35.21.178) icmp_seq=3 Destination Host Unreachable
From rac2.localdomain (132.35.21.178) icmp_seq=4 Destination Host Unreachable

--- rac2-vip.localdomain ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3002ms
, pipe 3


3- try to add the resource
[root@rac2 bin]# ./srvctl add vip -n rac2 -A rac2-vip/255.255.255.0/eth0 -k 2
PRCN-2049 : The network attributes specified (network number: 2, subnet: 132.35.21.0, adapters: eth0) conflict with an already registered network (network number: 1, subnet: 132.35.21.0, adapters: eth0)
you get the error for network attributes so change and then retry.
[root@rac2 bin]# ./srvctl add vip -n rac2 -A rac2-vip/255.255.255.0/eth0 -k 1
[root@rac2 bin]#

4- Check that resource is added or not
[root@rac2 bin]# ./crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1       
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1       
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1       
ora.eons       ora.eons.type  ONLINE    ONLINE    rac1       
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              
ora....network ora....rk.type ONLINE    ONLINE    rac1       
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE              
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1       
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    OFFLINE   OFFLINE              
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    ONLINE    rac2       
ora.rac2.gsd   application    OFFLINE   OFFLINE              
ora.rac2.ons   application    ONLINE    ONLINE    rac2       
ora.rac2.vip   ora....t1.type OFFLINE   OFFLINE              
ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1       
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1       

it is added but not ONLINE

5- start the nodeapps
[root@rac2 bin]# ./srvctl start nodeapps

6- Check the resource again
[root@rac2 bin]# ./crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora.DATA.dg    ora....up.type ONLINE    ONLINE    rac1       
ora....N1.lsnr ora....er.type ONLINE    ONLINE    rac1       
ora.asm        ora.asm.type   ONLINE    ONLINE    rac1       
ora.eons       ora.eons.type  ONLINE    ONLINE    rac1       
ora.gsd        ora.gsd.type   OFFLINE   OFFLINE              
ora....network ora....rk.type ONLINE    ONLINE    rac1       
ora.oc4j       ora.oc4j.type  OFFLINE   OFFLINE              
ora.ons        ora.ons.type   ONLINE    ONLINE    rac1       
ora....SM1.asm application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    OFFLINE   OFFLINE              
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   ora....t1.type ONLINE    ONLINE    rac1       
ora....SM2.asm application    ONLINE    ONLINE    rac2       
ora.rac2.gsd   application    OFFLINE   OFFLINE              
ora.rac2.ons   application    ONLINE    ONLINE    rac2       
ora.rac2.vip   ora....t1.type ONLINE    ONLINE    rac2       
ora....ry.acfs ora....fs.type ONLINE    ONLINE    rac1       
ora.scan1.vip  ora....ip.type ONLINE    ONLINE    rac1       
[root@rac2 bin]#

Now it is ONLINE

7- Ping it also
[root@rac2 bin]# ping rac2-vip
PING rac2-vip.localdomain (132.35.21.188) 56(84) bytes of data.
64 bytes from rac2-vip.localdomain (132.35.21.188): icmp_seq=1 ttl=64 time=0.029 ms
64 bytes from rac2-vip.localdomain (132.35.21.188): icmp_seq=2 ttl=64 time=0.021 ms
64 bytes from rac2-vip.localdomain (132.35.21.188): icmp_seq=3 ttl=64 time=0.022 ms

--- rac2-vip.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2124ms
rtt min/avg/max/mdev = 0.021/0.024/0.029/0.003 ms

Removing VIP
If for some reason you want to remove VIP resource, follow the below.
Check vip config
[root@rac2 bin]# ./srvctl config vip -n rac2
VIP exists.:rac2
VIP exists.: /132.35.21.188/132.35.21.188/255.255.255.0/eth0
Stop vip
[root@rac2 bin]# ./srvctl stop vip -n rac2
PRCR-1014 : Failed to stop resource ora.rac2.vip
PRCR-1065 : Failed to stop resource ora.rac2.vip
CRS-2529: Unable to act on 'ora.rac2.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified

[root@rac2 bin]# ./srvctl stop vip -n rac2 -f
Remove vip
[root@rac2 bin]# ./srvctl remove vip -i rac2
Please confirm that you intend to remove the VIPs rac2 (y/[n]) y

add vip again
[root@rac2 bin]# ./srvctl add vip -n rac2 -A rac2-vip/255.255.255.0/eth0 -k 1
[root@rac2 bin]#
check again
[root@rac2 bin]# ./srvctl config vip -n rac2
VIP exists.:rac2
VIP exists.: /rac2-vip/132.35.21.188/255.255.255.0/eth0

3 comments:

Dilip said...

Hi, Thank you for your support, It was very accurate and great helpful for me.

Regards,

Dilip Singh

Mahi said...

Good article. With the help of the steps you provided here I was able to resolve our production issue.

M.Asif khan said...

Good article and very very helpful for me.