How to Modify public Network information including VIP in Oracle clusterware (document ID 276434.1)

Source: Internet
Author: User
Tags hosting

Applies To:

Oracle database-enterprise edition-version 11.2.0.3 to 12.1.0.2 [Release 11.2 to 12.1]
Information in this document applies to any platform.

PURPOSE

The purpose of this note are to illustrate what to change a public hostname, public IP, a Virtual IP Address (VIP), VIP Host Name or other VIP attributes in an Oracle clusterware/grid Infrastructure environment.

SCOPE

Oracle Database 10g and 11g use VIPs (Virtual IP) in clustered environments for clients to connect to the Database. These VIPs is static IP addresses associated with (virtual) hostnames and resolved through DNS (except when using 11gR2 G NS).

During the installation of the Oracle Clusterware users is prompted to enter a virtual IP and virtual hostname for each o f the node in the cluster. These is stored within the OCR (Oracle Cluster Registry) and different components within the HA framework depend on these VIPs. If for some reason the need arises to change either the VIP, the VIP hostname, or the subnet, netmask etc, this procedure should be followed.

For changes associated with private Network/cluster interconnect, please refer to Note 283684.1DETAILS

Case I. Changing public hostname

Public hostname are recorded in OCR, it is entered during installation phase. It can is modified after the installation. The only-to-modify public hostname are by deleting the node and then add the node back with a new hostname, or reinstall T He clusterware.

Case Ii. Changing public IP only without changing interface, subnet or netmask

If The change is a public IP address and the new ones was still in the same subnet, nothing needs-be do on cluster Ware layer, all changes need to is done at OS layer to reflect the change.

1. Shutdown Oracle Clusterware Stack
2. Modify the IP address at network layer, DNS and/etc/hosts file to reflect
3. Restart Oracle Clusterware Stack

Above change can is done in rolling fashion, Eg:one node at a time.

Case III. Changing public network interface, subnet or netmask

If the change involves different subnet (netmask) or interface, delete the existing interface information from OCR and add  It back with the correct information is required. In the example here, the subnet are changed from 10.2.156.0 to 10.2.166.0 via and separate Commands-first a ' delif ' fol lowed by a ' setif ':

% $CRS _home/bin/oifcfg/oifcfg Delif-global <if_name>[/<subnet>]
% $CRS _home/bin/oifcfg/oifcfg setif-global <if_name>/<subnet>:p ublic

For example:
% $CRS _home/bin/oifcfg Delif-global eth0/10.2.156.0
% $CRS _home/bin/oifcfg Setif-global eth0/10.2.166.0:public

Then make the "change" at OS layer. There is no requirement to restart Oracle clusterware unless OS change requires a node reboot. This can is done in rolling fashion.

Once public network was changed, its associated VIP and SCAN VIP was also required to change, refer to case IV and Case v.

Note:for 11gR2, above command requires Clusterware RUNNINGOn all nodes, otherwise PRIF-33 and PRIF-32 would be reported, i.e.
[Email protected] bin]$/oifcfg Delif-global eth0/192.168.1.0
Prif-33:failed to set or delete interface because hosts could not be discovered
Crs-02307:no GPNP Services on requested remote hosts.
Prif-32:error in checking for profiles availability for host Racnode2
CRS-02306:GPNP Service on host ' Racnode2 ' not found.

Case IV. Changing VIPs associated with public network change

Planning for VIP Changes

In general, a complete outage are only required for pre-10.2.0.3 release. From 10.2.0.3 onwards, the Asm/database instance dependency on the VIP resource are removed, so the VIP could be modified W Ithout have to take down the Asm/database instance, only client connections to the database would be affected when VIP is Down. If The modification is a node specific and then only connection to that node would be affected during the time of the change.

Please follow case III-Ensure public network changes is made first. If there is a node reboot or Clusterware Restart after the OS network change, VIP won't start, please skip to step Mod Ifying VIP and its associated Attributes ".

Gathering Current VIP Configuration

1. Gather the existing setup
For 10g and 11gR1, as Oracle clusterware owner:

$ srvctl Config nodeapps-n <node> a

eg
$ srvctl Config nodeapps-n racnode1-a
VIP exists.:/racnode1-vip/101.17.80.184/255.255.254.0/eth1


For 11gR2, as Grid Infrastructure owner:

$ srvctl Config nodeapps-a

eg
$ srvctl Config nodeapps-a
Network exists:1/101.17.80.0/255.255.254.0/eth1, type static
VIP exists:/racnode1-vip/101.17.80.184/101.17.80.0/255.255.254.0/eth1, hosting node Racnode1
VIP exists:/racnode2-vip/101.17.80.186/101.17.80.0/255.255.254.0/eth1, hosting node Racnode2


2. Verify VIP Status

10.2 and 11.1:
$ crs_stat-t

11.2:
$ crsctl Stat res-t
-It should show VIPs is ONLINE

$ ifconfig-a
(Netstat-in for HP and Ipconfig/all for Windows)
-VIP logical interface is bound to the public network interface

Stopping Resources

3. Stop the Nodeapps resources (and all dependent resources asm/db only if required):

10g and 11gR1, as Oracle clusterware owner:

$ srvctl Stop instance-d <db_name> i <inst_name> (optional for 10.2.0.3+)
$ srvctl Stop asm-n <node_name> (optional for 10.2.0.3+)
$ srvctl Stop Nodeapps-n <node_name>

eg
$ srvctl Stop instance-d racdb-i RACDB1
$ srvctl Stop Asm-n Racnode1
$ srvctl Stop Nodeapps-n Racnode1


11gR2, as Grid Infrastructure owner:

$ srvctl Stop instance-d <db_name>-n <node_name> (optional)
$ srvctl Stop vip-n <node_name> F

eg
$ srvctl Stop instance-d racdb-n racnode1
$ srvctl Stop Vip-n racnode1-f

Note 1:the-f option is required for 11gR2 to stop listener resource, otherwise following error would occur:
Prcr-1014:failed to stop Resource ORA.RACNODE1.VIP
Prcr-1065:failed to stop Resource ORA.RACNODE1.VIP
Crs-2529:unable to act on the ' ORA.RACNODE1.VIP ' because that would require stopping or relocating ' Ora. Listener.lsnr ', but the force option is not specified
...


4. Verify VIP is now OFFLINE and the interface are no longer bound to the public network interface

$ crs_stat-t (or $ crsctl stat res-t for 11gR2)

$ ifconfig-a
(Netstat-in for HP and ipconfig/all for Windows)

modifying VIP and its associated Attributes

5. Determine the new VIP Ip/subnet/netmask or VIP hostname, make the "network Change" on OS first, ensure the new VIP is Reg Istered in DNS or modified in/etc/hosts (for unix/linux) and \windows\system32\drivers\etc\hosts file (for WINDOWS). If the network interface is changed, ensure the new interface are available on the server before proceeding with the Modifi cation.

For example:
New VIP is:110.11.70.11 RACNODE1-NVIP
New Subnet is 110.11.70.0
New Netmask is 255.255.255.0
New interface is eth2


6. Modify the VIP resource, as root User:

# Srvctl Modify Nodeapps-n <node>-A <new_vip_address or New_vip_hostname>/<netmask>/<[if1[if2 ... ]]>

eg
# srvctl Modify Nodeapps-n racnode1-a racnode1-nvip/255.255.255.0/eth2

Note:starting with 11.2, the VIPs depend on the network resource (ora.net1.network), the OCR only records the VIP Hostnam E or the IP address associated with the VIP resource. The network attributes (Subnet/netmask/interface) is recorded with the network resource. When the Nodeapps resource was modified, the network resoure (ora.net1.network) attributes is also modified implicitly.

From 11.2.0.2 onwards, if only subnet/netmask/interface change is required, network resource can be modified directly via Srvctl Modify Network command.
As Root User:
# srvctl Modify Network-k <network_number>] [-s <subnet>/<netmask>[/if1[|if2 ...]
eg
# srvctl Modify Network-k 1-s 110.11.70.0/255.255.255.0/eth2

There is no need to modify VIP or SCAN If other attributes be not changed.


* A special case for 11gR2 modifying the VIP hostname only without changing the IP address.

For EXAMPLE:ONLY VIP hostname changes from RACNODE1-VIP to RACNODE1-NVIP, IPs and other attributes remain the same.

If The IP address is not changed, above Modify command would not be the change of the USR_ORA_VIP value in ' crsctl stat res ora.racnode1. Vip-p ' output. Please use the following command:
# Crsctl Modify Res ora.racnode1.vip-attr USR_ORA_VIP=RACNODE1-NVIP

Verify The changes for USR_ORA_VIP field:
# crsctl Stat res ora.racnode1.vip-p |grep USR_ORA_VIP

Note:for Windows platform, the interface name needs to being in quote (") if there are a space in between, eg:
As Administrator user or software install User:
> Srvctl Modify nodeapps-n racnode1-a 110.11.70.11/255.255.255.0/"Local area Connection 1"


7. Verify the Change

$ srvctl Config nodeapps-n <node> A (10g and 11gR1)
$ srvctl Config nodeapps-a (11gR2)

eg
$ srvctl Config nodeapps-n racnode1-a
VIP exists.:/racnode1-nvip/110.11.70.11/255.255.255.0/eth2

Restarting Resources

8. Start the Nodeapps and the other resources

10g and 11gR1, as Oracle clusterware owner:

$ srvctl Start Nodeapps-n <node_name>
$ srvctl Start asm-n <node_name> (optional for 10.2.0.3+)
$ srvctl Start instance-d <dbanme>-i <inst> (optional for 10.2.0.3+)

eg
$ srvctl Start Nodeapps-n racnode1
$ srvctl Start Asm-n racnode1
$ srvctl start instance-d racdb-i RACDB1

11gR2, as Grid Infrastructure owner:

$ srvctl Start Vip-n <node_name>
$ srvctl Start Listener-n <node_name>
$ srvctl Start instance-d <db_name>-n <node_name> (optional)

eg
$ srvctl Start Vip-n racnode1
$ srvctl Start Listener-n racnode1
$ srvctl start instance-d racdb-n racnode1


9. Verify the new VIP is ONLINE and bind to the public network interface

$ crs_stat-t (or $ crsctl stat res-t for 11gR2)

$ ifconfig-a
(Netstat-in for HP or Ipconfig/all for Windows)


Repeat the same steps for the rest nodes of the cluster only if the similar was required.

Others

Modify Listener.ora, Tnsnames.ora and Local_listener/remote_listener parameter to reflect the VIP change if necessary .

Case v. Change SCAN VIP associated with public network change

With Grid Infrastructure 11gR2, scan and Scan VIP is introduced for client connections. To modify the SCAN VIP, please refer to

Note 952903.1 How to update the IP address of the SCAN VIP resources (ORA.SCAN<N>.VIP)
Note 972500.1 How to Modify scan Setting or scan Listener ports after installation

Note:if rolling back the required, repeat the commands which has been run, replace the new value with original Value to restore the original configuration.

REFERENCES

Note:952903.1-how to update the IP address of the SCAN VIP resources (ORA.SCAN{N}.VIP)
Note:283684.1-how to Modify Private Network information in Oracle clusterware

How to Modify public Network information including VIP in Oracle clusterware (document ID 276434.1)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.