Friday, January 15, 2010

11gR2 Add VIP to Node

I'm just curious on Forums.
PRKO-2165 : VIP does not exist on node(s) : linux2
I'd like to know Add VIP to a node idea. So, Tested It.

Virtual IP = 192.168.254.92

/etc/hosts file:
192.168.254.92 RHEL5-TEST-VIP
# ./srvctl status nodeapps
Network is enabled
Network is running on node: rhel5-test
GSD is disabled
GSD is not running on node: rhel5-test
ONS is enabled
ONS daemon is running on node: rhel5-test
eONS is enabled
eONS daemon is running on node: rhel5-test
PRKO-2165 : VIP does not exist on node(s) : rhel5-test
# ./srvctl start nodeapps
PRKO-2421 : Network resource is already started on node(s): rhel5-test
PRKO-2439 : VIP does not exist.
PRKO-2422 : ONS is already started on node(s): rhel5-test
PRKO-2423 : eONS is already started on node(s): rhel5-test
$ ./crsstat vip
HA Resource Target State (Host)
----------- ------ -----
ora.scan1.vip ONLINE ONLINE on rhel5-test
# ping 192.168.254.92
PING 192.168.254.92 (192.168.254.92) 56(84) bytes of data.
From 192.168.254.91 icmp_seq=1 Destination Host Unreachable
From 192.168.254.91 icmp_seq=2 Destination Host Unreachable

--- 192.168.254.92 ping statistics ---
2 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3999ms
Try to add VIP on my node.
srvctl add vip -n node_name -A {name|ip}/netmask[/if1[if2|...]]
[-k network_number] [-v]
# ./srvctl add vip -n rhel5-test -A 192.168.254.92/255.255.255.0/eth0 -k 2
PRCN-2049 : The network attributes specified (network number: 2, subnet: 192.168.254.0, adapters: eth0) conflict with an already registered network (network number: 1, subnet: 192.168.254.0, adapters: eth0)
So, changed network_number:
# ./srvctl add vip -n rhel5-test -A 192.168.254.92/255.255.255.0/eth0 -k 1
Check again & again.
$ ./crsstat vip
HA Resource Target State (Host)
----------- ------ -----
ora.rhel5-test.vip OFFLINE OFFLINE
ora.scan1.vip ONLINE ONLINE on rhel5-test
# ping 192.168.254.92
PING 192.168.254.92 (192.168.254.92) 56(84) bytes of data.
From 192.168.254.91 icmp_seq=1 Destination Host Unreachable
From 192.168.254.91 icmp_seq=2 Destination Host Unreachable

--- 192.168.254.92 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 999ms
$ srvctl start nodeapps
PRKO-2421 : Network resource is already started on node(s): rhel5-test
PRKO-2422 : ONS is already started on node(s): rhel5-test
PRKO-2423 : eONS is already started on node(s): rhel5-test
Or
$ srvctl start vip -n rhel5-test
Check again.
$ ./crsstat vip
HA Resource Target State (Host)
----------- ------ -----
ora.rhel5-test.vip ONLINE ONLINE on rhel5-test
ora.scan1.vip ONLINE ONLINE on rhel5-test
# ping 192.168.254.92
PING 192.168.254.92 (192.168.254.92) 56(84) bytes of data.
64 bytes from 192.168.254.92: icmp_seq=1 ttl=64 time=0.043 ms
64 bytes from 192.168.254.92: icmp_seq=2 ttl=64 time=0.049 ms

--- 192.168.254.92 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
# ./srvctl config vip -n rhel5-test
VIP exists.:rhel5-test
VIP exists.: /192.168.254.92/192.168.254.92/255.255.255.0/eth0
That's a example to fun -)

By the way, we should add vip by name.
From /etc/hosts file:
192.168.254.92 RHEL5-TEST-VIP
# ./srvctl stop vip -n rhel5-test -f
# ./srvctl remove vip -i rhel5-test
Please confirm that you intend to remove the VIPs rhel5-test (y/[n]) y
Check:
$ ./crsstat vip
HA Resource Target State (Host)
----------- ------ -----
ora.scan1.vip ONLINE ONLINE on rhel5-test
start add VIP:
# ./srvctl add vip -n rhel5-test -A rhel5-test-vip/255.255.255.0/eth0 -k 1
# ./srvctl config vip -n rhel5-test
VIP exists.:rhel5-test
VIP exists.: /rhel5-test-vip/192.168.254.92/255.255.255.0/eth0
Check:
$ ./crsstat vip
HA Resource Target State (Host)
----------- ------ -----
ora.rhel5-test.vip OFFLINE OFFLINE
ora.scan1.vip ONLINE ONLINE on rhel5-test
then start...
# ./srvctl start vip -n rhel5-test
$ ./crsstat vip
HA Resource Target State (Host)
----------- ------ -----
ora.rhel5-test.vip ONLINE ONLINE on rhel5-test
ora.scan1.vip ONLINE ONLINE on rhel5-test
Nice -)

9 comments:

Anonymous said...

The installation of the 11gR2 grid infrastructure went OK on both nodes.

All resources, including vip, asm, DG, etc are OK and online

crsd is OK on BOTH nodes:

[root@quasar bin]# ./crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.OCR.dg
ONLINE ONLINE mars
ONLINE ONLINE quasar
ora.asm
ONLINE ONLINE mars Started
ONLINE ONLINE quasar Started
ora.net1.network
ONLINE ONLINE mars
ONLINE ONLINE quasar
ora.registry.acfs
ONLINE ONLINE mars
OFFLINE OFFLINE quasar
Cluster Resources
ora.quasar.vip
1 ONLINE ONLINE quasar
[root@quasar bin]#

[root@quasar bin]# ./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

However when adding nodeapps, the crsd daemon dies and any attempt
to restart it fails:

[root@quasar bin]# ./srvctl add nodeapps -n quasar -A quasar-vip/255.255.255.0/eth0 -l 6200 -r 6100 -v
Successfully added node applications.
[root@quasar bin]#

[root@quasar bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services <-----------------------------
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
[root@quasar bin]#

Any advice how to fix this will be greatly appreciated

Regards

Surachart Opun said...

Not sure this situation. Please
- check css log at grid folder.

sonu said...

Hi,

Good content I have found here for Add/Remove VIPs. Really Good.

I have two node cluster on ORACLE VM2.2. "RAC1" is the first node and "RAC2" is the second node. Till now just done with the Grid infrastructure installation part. And try to run your display command for VIPs. Its working fine.

I have stopped the GNS and GNS.VIP.

But after few days I have found below status for VIP. Could you please give me idea what is this actually?

Output of "./crsctl stat res -t" command for VIP is below:

NAME:ora.rac1.vip
TARGET: ONLINE
STATE: INTERMEDIATE
SERVER: rac2
STATE_DETAILS: FAILED OVER


NAME:ora.rac2.vip
TARGET: ONLINE
STATE: ONLINE
SERVER: rac2
STATE_DETAILS:

Guide me for above output.

Thanks

Surachart Opun said...

@sonu

If you use GNS, you should start it and make sure you can resolve DNS.

sonu said...

But I am not using GNS.

Surachart Opun said...

check on node01 (look as rac1-vip failover to node02 now):
$ ./crsctl check crs

Check your CRS starting

sonu said...

Hi,
Find below output of 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

All are online..

Thanks...

Surachart Opun said...

From Your information, I'm not sure your problem.
what happened, if you start vip?

$ srvctl start vip -n rac01 -v

try use "srvctl" start your resource.

and Please show all you see in "./crsctl stat res -t"

sonu said...

I tried to start vip manually on rac1 but it was giving message like: "rac1.vip" already started on "rac2"...

anyways, I have not change anything yet but when I see the crsctl stat rest today it showing me "rac1.vip" online on "rac1"

Thanks for your response.