• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to change the SCAN IP address (SCAN VIP resources) in 11gR2 Grid (CRS) environment

By admin

The IP addresses associated with the SCAN VIP resources are initially set when the SCAN resources are created. Any changes to the DNS entry for the SCAN are not automatically propagated to the clusterware and need to be done manually. This applies only to installations that are not using GNS. The information in this note can also be helpful in cases where SCAN was originally configured with just one address and is now being expanded to accommodate three IP addresses.

Below is an example using the following configuration:

The name of the SCAN is scan.example.com
subnet of the public network is 10.100.10.0
netmask for the public network is 255.255.255.0
name of the public interface is eth1
old IP addresses: 10.100.10.81, 10.100.10.82 & 10.100.10.83
new IP addresses: 10.100.10.121, 10.100.10.122 & 10.100.10.123

Stopping & starting the SCAN VIPs/listeners can be done by the grid user, however, the ‘srvctl modify scan’ command must be executed by the root user, so it’s practical to execute all steps as the root user.

Modifying SCAN VIP resources

1. Before the SCAN VIPs can be changed, the entry for the SCAN name on the Domain Name Server (DNS) needs to be updated with the new IP addresses. This usually will be done by a network administrator. To check the current setting, the following command can be used:

# nslookup [scan_name]

A lookup of the SCAN on the DNS server shows that the entry has already been updated with the new IP addresses:

$ nslookup scan.example.com 
Server:         dns1.example.com
Address:        10.100.10.70#53

Name:   scan.example.com
Address: 10.100.10.123
Name:   scan.example.com
Address: 10.100.10.122
Name:   scan.example.com
Address: 10.100.10.121

2. To check the current IP address(es) of the SCAN VIPs, run the following commands as the root user:

# $GRID_HOME/bin/srvctl config scan

Here,
$GRID_HOME : home path for GRID software.

The SCAN VIP resources will still show the old IP addresses:

# $GRID_HOME/bin/srvctl config scan
SCAN name: scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /scan.example.com/10.100.10.81
SCAN VIP name: scan2, IP: /scan.example.com/10.100.10.82
SCAN VIP name: scan3, IP: /scan.example.com/10.100.10.83

3. Stop the SCAN listeners and SCAN as root user.

# GRID_HOME/bin/srvctl stop scan_listener
# GRID_HOME/bin/srvctl stop scan

Verify if SCAN and SCAN listener has stopped.

# $GRID_HOME/bin/srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
# $GRID_HOME/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running

4. Next refresh the SCAN VIPs with the new IP addresses from the DNS entry:

# $GRID_HOME/bin/srvctl modify scan -n [scan_name]

For example :

# $GRID_HOME/bin/srvctl modify scan -n scan.example.com

5. To check if the SCAN VIPs have been changed, run the following command, it should now show the new IP addresses.

# GRID_HOME/bin/srvctl config scan
SCAN name: scan, Network: 1/10.100.10.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /scan.example.com/10.100.10.121
SCAN VIP name: scan2, IP: /scan.example.com/10.100.10.122
SCAN VIP name: scan3, IP: /scan.example.com/10.100.10.123

6. Restart SCAN & SCAN listener:

# GRID_HOME/bin/srvctl start scan 
# GRID_HOME/bin/srvctl start scan_listener

7. If the number of SCAN VIPs has changed, the SCAN listener needs to be updated:

# GRID_HOME/bin/srvctl modify scan_listener -u
NOTE: If the SCAN VIPs are being changed because of a change of the subnet of the public network additional changes may be required , e.g. the node VIPs and the network resource (ora.net1.network).

Filed Under: oracle, RAC

Some more articles you might also be interested in …

  1. Oracle Database : How to set Environment Variables Using Srvctl
  2. Upgrading to Oracle 12c using RMAN DUPLICATE with “NOOPEN” clause and “BACKUP LOCATION”
  3. How to Extend ocfs2 Filesystem with tunefs.ocfs2 Command (Whole device used without partitions)
  4. How To Create Device Alias For ASM Disks Using mknod On Linux/Unix
  5. What Happens and What to Do when the SPFILE has been Manually Modified
  6. How to upgrade RMAN catalog SCHEMA from 11g to 12.1.0.2 without upgrading the catalog database
  7. Dynamic Oracle Net Server Tracing
  8. Managing Oracle Database Backup with RMAN (Examples included)
  9. How an SQL query is executed in Oracle Database
  10. How to check and repair ACFS with FSCK

You May Also Like

Primary Sidebar

Recent Posts

  • How to Disable IPv6 on Ubuntu 18.04 Bionic Beaver Linux
  • How to Capture More Logs in /var/log/dmesg for CentOS/RHEL
  • Unable to Start RDMA Services on CentOS/RHEL 7
  • How to rename a KVM VM with virsh
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary