Whether you’re using GNS or a manual IP configuration, the availability of DNS is required to support the cluster configuration. If using GNS, a DHCP server configuration is also required. In this post I will showing you how to configure both the DNS and DHCP on Windows Server
Configuring DNS
It is necessary to create a delegated subdomain (e.g., grid1.example.com), which is managed by the Grid Naming Service (GNS). In Windows you can create the subdomain as follows
1. Right click on the domain name (e.g., example.com) and select the "New Delegation.."
2. Provide the Subdomain name as grid1 ( e.g., grid1.example.com) and click Next
3. Note that GNS is a cluster resource that requires its own VIP. The VIP is allocated within DNS. At any one time, GNS will only be active on one node in the cluster. If this node is shutdown, then Oracle Clusterware will automatically relocate the GNS VIP to one of the remaining nodes in the cluster.
Here the host name is provided as - cluster1-gns.grid1.example.com and the VIP IP as 10.91.119.184
4. Once you click "OK" you will get a confirmation screen as below.
Configuring DHCP
For our installation, we have configured DHCP to assign a range of 10 addresses that DHCP can allocate (10.91.119.185 to 10.91.119.195).
Configuration on the Cluster Nodes
On each node in the cluster, the /etc/resolv.conf is configured as follows:
search example.com grid1.example.com
nameserver 10.91.119.134
options attempts:2
options timeout:1
and you /etc/hosts will have entries only for you Private IPs
root@coltdb01 grid]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
192.168.1.1 coltdb01-priv.example.com coltdb01-priv
192.168.1.2 coltdb02-priv.example.com coltdb02-priv
Testing the Setup
The cluvfy utility has been enhanced to test GNS before you go through the installation process and finding out it all failed. Before you install, you invoke runcluvfy comp gns -precrsinst as in this example:
[oracle@coltdb01 grid]$ ./runcluvfy.sh comp gns -precrsinst -domain grid1.example.com -vip 10.91.119.185 -verbose -n coltdb01
WARNING:
Could not access or create trace file path "/tmp/bootstrap/cv/log". Trace information could not be collected
Verifying GNS integrity
Checking GNS integrity...
Checking if the GNS subdomain name is valid...
The GNS subdomain name "grid1.example.com" is a valid domain name
Checking if the GNS VIP is a valid address...
GNS VIP "10.91.119.185" resolves to a valid IP address
Checking the status of GNS VIP...
GNS integrity check passed
Verification of GNS integrity was successful.
Setting up the Grid Plug and Play Information Page
As the oracle user, start the OUI using runInstaller.sh command and choose the Advance Installation option
In the Grid Plug and Play Information Page provide the following information
1. Provide the cluster name,scan name, GNS subdomain name and the GNS VIP address.
2. Add the Cluster Public hostname and Vitual Hostname should be AUTO
4. After the successful execution of root.sh on both the nodes, you can see SCAN IPs and VIPs are dynamically assigned to both the nodes.
Post Validation
[oracle@coltdb01 bin]$ ./cluvfy comp gns -postcrsinst -verbose
Verifying GNS integrity
Checking GNS integrity...
Checking if the GNS subdomain name is valid...
The GNS subdomain name "grid1.example.com" is a valid domain name
Checking if the GNS VIP belongs to same subnet as the public network...
Public network subnets "10.91.119.0" match with the GNS VIP "10.91.119.0"
Checking if the GNS VIP is a valid address...
GNS VIP "10.91.119.184" resolves to a valid IP address
Checking the status of GNS VIP...
Checking if FDQN names for domain "grid1.example.com" are reachable
GNS resolved IP addresses are reachable
GNS resolved IP addresses are reachable
GNS resolved IP addresses are reachable
GNS resolved IP addresses are reachable
GNS resolved IP addresses are reachable
Checking status of GNS resource...
Node Running? Enabled?
------------ ------------------------ ------------------------
coltdb01 yes yes
coltdb02 no yes
GNS resource configuration check passed
Checking status of GNS VIP resource...
Node Running? Enabled?
------------ ------------------------ ------------------------
coltdb01 yes yes
coltdb02 no yes
GNS VIP resource configuration check passed.
GNS integrity check passed
Verification of GNS integrity was successful.
[oracle@coltdb01 bin]$ ./srvctl config gns -l
Name Type Value
cluster1-scan A 10.91.119.186
cluster1-scan A 10.91.119.187
cluster1-scan A 10.91.119.188
cluster1-scan1-vip A 10.91.119.186
cluster1-scan2-vip A 10.91.119.187
cluster1-scan3-vip A 10.91.119.188
coltdb01-vip A 10.91.119.185
coltdb02-vip A 10.91.119.189
As you can see, the GNS daemon will allocate three IP addresses from the range of addresses offered by the DHCP server. The IP addresses are records in DNS that resolve to the SCAN name in a round robin fashion
Adding Nodes
Executing the following command on one of the existing nodes in $GRID_HOME/oui/bin was enough to add a node to a cluster with GNS enabled:
[oracle@london1 bin]$ ./addNode.sh "CLUSTER_NEW_NODES={newNodePublicIP}"