Saturday, November 8, 2014

How to modify interconnect device/settings in 11gR2 Clusterware

Let's imagine the following situation.
You have two interconnect interfaces. Suddenly, all of them have become unaccessible, your rac immediately stopped. How to rule it out ?
Build up new interconnect, using new cards, of course.
But you will not be able to run clusterware services like HAIP and other becouse your new interconnect device name does not consistent with interconnect device names in OLR (Oracle Local Registry on each node) and OCR.
Actions ?

1. Rename you interconnect device by operating system means (modify udev net-persistent-device-names file, for example, and run udevadm trigger command on each node), and rerun your clusterware afterwards.

OR

2. Modify OLR content on each node

$ cd $CRS_HOME/gpnp/$(hostname)/profiles/peer

Here will be signed profile.xml, modifications only allowed with gpnptool ($CRS_HOME/bin) utility.

query profile.2 in some manner like that:
$ gpnptool getpval -p=profile.2 -net
$ gpnptool getpval -p=profile.2 -net2:net_ip
$ gpnptool getpval -p=profile.2 -net2:net_ada

unsign profile.xml to new profile.2 :
$ gpnptool unsign -p=profile.xml -o=profile.2

rename interconnect adapter name in profile.2 :

$ gpnptool edit -p=profile.2 -net2:net_ada=new_if_name -o=profile.2 -ovr

set if needed new IP subnet for interconnect :
$ gpnptool edit -p=profile.2 -net2:net_ip=subnet.0 -o=profile.2 -ovr

sign profile.2 :
$ gpnptool sign -p=profile.2 -o=profile.2.xml.signed -w=/$CRS_HOME/gpnp/$(hostname)/wallets/peer

make a rotation :
$ mv profile.xml profile.xml.orig

$ cp profile.2.xml.signed profile.xml

run clusterware :
# /etc/init.d/ohasd start

After successful running, with help of oifcfg, delete old interconnect data from OCR by
$ oifcfg delif -global old_if_name.

Repeat above steps related to profile.xml on each node