Configure Highly Available GNS in Oracle RAC environment
Oracle Clusterware uses Grid Naming Service(GNS) for address resolution in a single-cluster or multi-cluster environment.You can configure your clusters with a single, primary GNS instance, and you can also configure one or more secondary
GNS instances with different roles to provide high availability address lookup and other services to clients.
The secondary GNS instances act as backup for the primary GNS instance. You can configure Primary GNS with clusterware installation but for configure GNS instance for high-available(secondary GNS instance) you need to do it after setup clusterware. The primary instance manages update and resolution operations. The secondary instance only manages resolution operations.
Steps to configure the primary and secondary GNS Instance
1. Create the primary instance of GNS.
srvctl add gns -vip gns_vip -domain gns_subdomain
2. Start the primary GNS instance.
srvctl start gns
Note: Only one primary instance otherwise it abort to start by GNS Service.
3. Export the client data for the secondary GNS instances.
srvctl export gns -clientdata file_name -role secondary
Note: GNS stores this zone data information in OCR and updates secondary GNS instances once they are configured.
4. Copy the data to another node where you create secondary GNS instance.
5. Configure the secondary GNS instance.
srvctl add gns -vip gns_vip -clientdata file_name
6. Start the secondary GNS instance.
srvctl start gns
Note: it updates its zone data on startup the secondary GNS instance.
Change Secondary to primary GNS instance
srvctl modify gns -role primary
Stop or starting GNS instance
srvctl start gns
srvctl stop gns
Remove the instance
srvctl stop gns
srvctl remove gns
Note: you cannot remove primary GNS instance directly, if do so GNS instance stop.