How to modify the SCAN VIP address ?

With the introduction of Oracle 11g Release 2 also Single Client Acces Name is introduced, the so called SCAN. During installation the you defined the SCAN name which will be resolved in the DNS to 3 ip addresses. Optional you can define one ip address in the hostfile if not using the SCAN name but Oracle advise to use 3. But there can be case where you want to modify the IP addresses involved in the DNS, only modifing the DNS is not enough you need to “refresh “ the SCAN name with IP addresses also.
This blog explains how to perform those steps.

Validating the current scan name configured using srvctl config scan command.
[oracle@server1 ~]$ srvctl config scan
SCAN name: cluster1-scan, Network: 1/192.168.100.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.100.82/192.168.100.82
SCAN VIP name: scan2, IP: /192.168.100.83/192.168.100.83
SCAN VIP name: scan3, IP: /191.168.100.81/191.168.100.81

As you can see in the above output the scan name is cluster1-scan. But when you look to scan3 you will notice the IP adres is not starting with 192, but with 191.
This is incorrect, we want to modify this. Of course if you want to modify all the ip address this is also possible, but be ware that you must define the addresses in the same subnet as the Public interface.

So how can we modify the scan information ?
When we list the srvctl modify command, we will notice there is only one option.

[oracle@server1 ~]$ srvctl modify scan -h
Modifies the SCAN name.
 
Usage: srvctl modify scan -n <scan_name>
    -n <scan_name>           Domain name qualified SCAN name
    -h                       Print usage

First we update the DNS entries to modify the incorrect IP into the correct one. Our dns file is called db.grid-it.nl
$ORIGIN grid-it.nl.
cluster1-scan        A       191.168.100.81
cluster1-scan        A       192.168.100.82
cluster1-scan        A       192.168.100.83
 
correct:
$ORIGIN grid-it.nl.
cluster1-scan        A       192.168.100.81
cluster1-scan        A       192.168.100.82
cluster1-scan        A       192.168.100.83
 
As the DNS is caching in memory make sure a reload is performed.
Optionally use DIG or ping command to validate the IP address are modified correctly and can be used.
[root@dnsserver]# /etc/init.d/named reload
Reloading named:                                           [ OK ]

Now the DNS server is modified lets perform the modify statement and validate the action
[oracle@server1 ~]$ srvctl modify scan -n cluster1-scan
PRCS-1034 : Failed to modify Single Client Access Name cluster1-scan
PRCR-1071 : Failed to register or update resource ora.scan3.vip
CRS-0245: User doesn’t have enough privilege to perform the operation
PRCR-1071 : Failed to register or update resource ora.scan2.vip
CRS-0245: User doesn’t have enough privilege to perform the operation
PRCR-1071 : Failed to register or update resource ora.scan1.vip
CRS-0245: User doesn’t have enough privilege to perform the operation
 
As you can see from the above the modification of the scan must be performed as root user.

[oracle@server1 ~]$ su -
Password:
[root@server1 ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base for ORACLE_HOME=/u01/app/11.2.0/grid is /u01/app/oracle
[root@server1 ~]# srvctl modify scan -n cluster1-scan
 
No ouput is provided so what is the current status ?

[root@server1 ~]# srvctl config scan
SCAN name: cluster1-scan, Network: 1/192.168.100.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.100.83/192.168.100.83
SCAN VIP name: scan2, IP: /192.168.100.81/192.168.100.81
SCAN VIP name: scan3, IP: /192.168.100.82/192.168.100.82
 
As we can see the ip address is modified, but also notice the scan vip name is changed, due to the modification.

Lets start the scan vips and validate the status of the vip.

[oracle@server1 ~]$ srvctl start scan
PRCC-1014 : scan1 was already running
PRCC-1014 : scan3 was already running
 
[oracle@server1 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is running on node server1
SCAN VIP scan2 is enabled
SCAN VIP scan2 is running on node server1
SCAN VIP scan3 is enabled
SCAN VIP scan3 is running on node server2 
 

This entry was posted in GRID Infrastructure, Linux, Real Application Cluster and tagged , , . Bookmark the permalink.

Comments are closed.