How to add a new SCAN listener in Oracle 11gR2 RAC setup


As an Oracle DBA each one of us might see such activity in the projects with RAC setup. It is not quite very easy to add a SCAN listener when your environment doesn’t use DNS server.

Environment:

2 Node RAC 11gR2 setup
2 SCAN listeners already configured
DNS server is not configured
SCAN was configured using /etc/hosts on the node
Challenge:

When your environment is configured with SCAN with /etc/hosts file on the node, it is not possible to directly add a new SCAN listener using the same /etc/hosts file to the RAC setup.

Steps to add SCAN listener:

Check the current configuration of SCAN and SCAN_LISTENER on both the nodes.
[oracle@rac_node1 ~]# srvctl config scanSCAN name: racscan, Network: 1/192.168.0.0/255.255.255.0/bond0

SCAN VIP name: scan1, IP: /scan-rac/192.168.0.10

SCAN name: racscan, Network: 1/192.168.0.0/255.255.255.0/bond0

SCAN VIP name: scan2, IP: /scan-rac/192.168.0.11

[oracle@rac_node1 ~]# srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521

SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521

Check the current status of SCAN and SCAN_LISTENER
[oracle@rac_node1 ~]# srvctl status scanSCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node rac_node2

SCAN VIP scan2 is enabled

SCAN VIP scan2 is running on node rac_node1

[oracle@rac_node1 ~]# srvctl status scan_listenerSCAN Listener LISTENER_SCAN1 is enabled

SCAN listener LISTENER_SCAN1 is running on node rac_node2

SCAN Listener LISTENER_SCAN2 is enabled

SCAN listener LISTENER_SCAN2 is running on node rac_node1

I have added a new IP of scan in /etc/hosts of both the nodes as below
192.168.0.10 racscan192.168.0.11 racscan

192.168.0.12 racscan

Stopped scan_listener and scan then modified the existing scan with ROOT privilege.
[oracle@rac_node1 ~]$ srvctl stop scan_listener[oracle@rac_node1 ~]$ srvctl stop scan

[root@rac_node1 ~]# srvctl modify scan -n racscan

Checked the configuration of scan to identify if new IP address of scan is registered.
[root@rac_node1 ~]# srvctl config scanSCAN name: rac-scan, Network: 1/192.168.0.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /rac-scan.localdomain/192.168.0.10

SCAN VIP name: scan2, IP: /rac-scan.localdomain/192.168.0.11

There is the PROBLEM the new IP address is not registered in the scan configuration. We will not be able to add a new SCAN using /etc/hosts file on the server.
I have now removed the entries of SCAN in /etc/hosts file and then configured DNS for SCAN IP addresses and VIP’s as well.
Then modified the SCAN configuration.
[root@rac_node1 ~]# srvctl modify scan -n racscan[root@rac_node1 ~]# srvctl config scan

SCAN name: rac-scan, Network: 1/192.168.0.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /rac-scan.localdomain/192.168.0.10

SCAN VIP name: scan2, IP: /rac-scan.localdomain/192.168.0.11

SCAN VIP name: scan3, IP: /rac-scan.localdomain/192.168.0.11

Here is the ANSWER, the third IP has been now configured to scan. Let us now start SCAN and SCAN_LISTENER to complete this activity successfully.
[oracle@rac_node1 ~]$ srvctl start scan_listener[oracle@rac_node1 ~]$ srvctl start scan

[oracle@rac_node1 ~]# srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled

SCAN listener LISTENER_SCAN1 is running on node rac_node2

SCAN Listener LISTENER_SCAN2 is enabled

SCAN listener LISTENER_SCAN2 is running on node rac_node1

SCAN Listener LISTENER_SCAN3 is enabled

SCAN listener LISTENER_SCAN3 is running on node rac_node1

Conclusion:

Adding a new SCAN listener through /etc/hosts is quite a challenge and clusterware software seems not having such intelligence to identify a new IP from /etc/hosts. So the solution that would work fine if you had to add new SCAN listener is through DNS server.

It was very interesting when I have received an activity to ADD a SCAN listener to the existing RAC 11gR2 setup. As an Oracle DBA each one of us might see such activity in the projects with RAC setup. It is not quite very easy to add a SCAN listener when your environment doesn’t use DNS server.

Environment:

2 Node RAC 11gR2 setup
2 SCAN listeners already configured
DNS server is not configured
SCAN was configured using /etc/hosts on the node
Challenge:

When your environment is configured with SCAN with /etc/hosts file on the node, it is not possible to directly add a new SCAN listener using the same /etc/hosts file to the RAC setup.

Steps to add SCAN listener:

Check the current configuration of SCAN and SCAN_LISTENER on both the nodes.
[oracle@rac_node1 ~]# srvctl config scanSCAN name: racscan, Network: 1/192.168.0.0/255.255.255.0/bond0

SCAN VIP name: scan1, IP: /scan-rac/192.168.0.10

SCAN name: racscan, Network: 1/192.168.0.0/255.255.255.0/bond0

SCAN VIP name: scan2, IP: /scan-rac/192.168.0.11

[oracle@rac_node1 ~]# srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521

SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521

Check the current status of SCAN and SCAN_LISTENER
[oracle@rac_node1 ~]# srvctl status scanSCAN VIP scan1 is enabled

SCAN VIP scan1 is running on node rac_node2

SCAN VIP scan2 is enabled

SCAN VIP scan2 is running on node rac_node1

[oracle@rac_node1 ~]# srvctl status scan_listenerSCAN Listener LISTENER_SCAN1 is enabled

SCAN listener LISTENER_SCAN1 is running on node rac_node2

SCAN Listener LISTENER_SCAN2 is enabled

SCAN listener LISTENER_SCAN2 is running on node rac_node1

I have added a new IP of scan in /etc/hosts of both the nodes as below
192.168.0.10 racscan192.168.0.11 racscan

192.168.0.12 racscan

Stopped scan_listener and scan then modified the existing scan with ROOT privilege.
[oracle@rac_node1 ~]$ srvctl stop scan_listener[oracle@rac_node1 ~]$ srvctl stop scan

[root@rac_node1 ~]# srvctl modify scan -n racscan

Checked the configuration of scan to identify if new IP address of scan is registered.
[root@rac_node1 ~]# srvctl config scanSCAN name: rac-scan, Network: 1/192.168.0.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /rac-scan.localdomain/192.168.0.10

SCAN VIP name: scan2, IP: /rac-scan.localdomain/192.168.0.11

There is the PROBLEM the new IP address is not registered in the scan configuration. We will not be able to add a new SCAN using /etc/hosts file on the server.
I have now removed the entries of SCAN in /etc/hosts file and then configured DNS for SCAN IP addresses and VIP’s as well.
Then modified the SCAN configuration.
[root@rac_node1 ~]# srvctl modify scan -n racscan[root@rac_node1 ~]# srvctl config scan

SCAN name: rac-scan, Network: 1/192.168.0.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: /rac-scan.localdomain/192.168.0.10

SCAN VIP name: scan2, IP: /rac-scan.localdomain/192.168.0.11

SCAN VIP name: scan3, IP: /rac-scan.localdomain/192.168.0.11

Here is the ANSWER, the third IP has been now configured to scan. Let us now start SCAN and SCAN_LISTENER to complete this activity successfully.
[oracle@rac_node1 ~]$ srvctl start scan_listener[oracle@rac_node1 ~]$ srvctl start scan

[oracle@rac_node1 ~]# srvctl status scan_listener

SCAN Listener LISTENER_SCAN1 is enabled

SCAN listener LISTENER_SCAN1 is running on node rac_node2

SCAN Listener LISTENER_SCAN2 is enabled

SCAN listener LISTENER_SCAN2 is running on node rac_node1

SCAN Listener LISTENER_SCAN3 is enabled

SCAN listener LISTENER_SCAN3 is running on node rac_node1

Conclusion:

Adding a new SCAN listener through /etc/hosts is quite a challenge and clusterware software seems not having such intelligence to identify a new IP from /etc/hosts. So the solution that would work fine if you had to add new SCAN listener is through DNS server.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s