Friday, December 25, 2015

Post 65 of the Series - Steps to change the IP of the existing VM's on Oracle Cluster without de-installing anything

By His Command, souls come into being; by His Command, glory and greatness are obtained.
By His Command, some are high and some are low; by His Written Command, pain and pleasure are obtained.
Some, by His Command, are blessed and forgiven; others, by His Command, wander aimlessly forever.
Everyone is subject to His Command; no one is beyond His Command.
O Nanak, one who understands His Command, does not speak in ego. 

Here are the steps to do the ip change on the VM's that we have created. No need to do the full install for new VM.
just make the copy of your existing VM and change the ip's of the VM's and you will be able to run multiple clusters in the same network.

After ip change run machines on different computer or on the same computer. Only draw backup is that we cannot change the hostname of the VM's.


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#########

Change ip's on dbnodes:
On VM execute:

vi /etc/sysconfig/network-scripts/ifcfg-eth0 - IP change
vi /etc/sysconfig/network-scripts/ifcfg-eth1 - IP change
vi /etc/sysconfig/network-scripts/ifcfg-eth2 - IP change
vi /etc/sysconfig/network-scripts/ifcfg-eth3 - IP change
vi /etc/resolv.conf_shld_be - DNS change
vi /etc/hosts - 
cd /etc/udev/rules.d/
rm 70-persistent-net.rules - Let server pick new IP's IP change

Cluster will come-up fine

=======
Fix the SCAN:


nslookup lv-lnp-db62-scan
$GRID_HOME/bin/srvctl config scan
$GRID_HOME/bin/srvctl stop scan_listener
$GRID_HOME/bin/srvctl stop scan
sudo /opt/app/oracle/grid11204/bin/srvctl modify scan -n lv-lnp-db62-scan
$GRID_HOME/bin/srvctl config scan
$GRID_HOME/bin/srvctl start scan
$GRID_HOME/bin/srvctl start scan_listener    
$GRID_HOME/bin/srvctl modify scan_listener -u
sudo /opt/app/oracle/grid11204/bin/srvctl status scan
$GRID_HOME/bin/srvctl status scan_listener

reboot to make sure al looks good

#########

If you want to do the storage change as well then do the following:
So, that this storage is used only by new nodes that we just changed

#########
On db nodes execute the folowing

/u01/app/12.1.0.0/grid/bin/crsctl stop crs
/u01/app/12.1.0.0/grid/bin/crsctl disable crs

#########

On filer VM execute:

vi /etc/sysconfig/network-scripts/ifcfg-eth0 - IP change
vi /etc/sysconfig/network-scripts/ifcfg-eth1 - IP change
vi /etc/sysconfig/network-scripts/ifcfg-eth2 - IP change
vi /etc/sysconfig/network-scripts/ifcfg-eth3 - IP change
vi /etc/resolv.conf_shld_be - DNS change
vi /etc/hosts - 
cd /etc/udev/rules.d/
rm 70-persistent-net.rules - Let server pick new IP's IP change


On dbnodes execute following to point to new storage:

service iscsi restart (may hang, just hit enter and after sometime control+c)
vi /etc/hosts (keep old filer entry and add new filer entry) thne entries will look like :

# iSCSI SAN Server


10.10.1.216 filer02.rac.meditate.com filer02
10.10.1.156 filer03.rac.meditate.com filer03

Delete the iscsi entry pointing to old filer:
iscsiadm -m node -o delete --portal 10.10.1.216:3260

Restart the iscsi, I just got stopping iscsi as:

[root@rac90 ~]# service iscsi restart
Stopping iscsi:                                            [  OK  ]
[root@rac90 ~]#

Add new ip to the server for filer:
iscsiadm -m discovery -t sendtargets -p 10.10.1.146

I got:
[root@rac90 ~]# iscsiadm -m discovery -t sendtargets -p 10.10.1.146
10.10.1.156:3260,1 iqm.mgmt.volumes-san

Update server to start iscsi at every reboot:
chkconfig --level 345 iscsi on


Bounce 

and after bounce u should be able to see the disks
ls -lart /dev/asm*

enable crs 
/u01/app/12.1.0.0/grid/bin/crsctl enable crs

start crs
/u01/app/12.1.0.0/grid/bin/crsctl start crs



All should come-up fine

Enjoy and have FUN !


Great is His greatness, as great as His Name.
Great is His greatness, as True is His justice. 
Great is His greatness, as permanent as His Throne.
Great is His greatness, as He knows our utterances.
Great is His greatness, as He understands all our affections.
Great is His greatness, as He gives without being asked.
Great is His greatness, as He Himself is all-in-all.
O Nanak, His actions cannot be described.
Whatever He has done, or will do, is all by His Own Will.


No comments:

Post a Comment