Oracle 10g rac ip/VIP address modification example

Source: Internet
Author: User

Oracle 10g rac ip/VIP address modification example
I. Preparations 1. Database Information

Operating system version: OEL5.4 x64
Database Version: Oracle 10.2.0.5 x64 RAC

2. IP address information

Note: The server host name cannot be changed. If you want to change the name, you need to reinstall CRS to solve the problem. It is better to reinstall it.
The environment in this article is 10 Gb rac + ocfs + asm, And the heartbeat address remains unchanged. The IP address uses the same network segment and different IP addresses due to environmental restrictions, but the process is the same as that of the different network segments.

Original IP Address:
192.168.0.6 node1: 192.168.0.206
192.168.0.7 node2: 192.168.0.207
192.168.0.8 node1-vip to: 192.168.0.208
192.168.0.9 node2-vip to: 192.168.0.209
10.10.10.10 node1-priv unchanged
The 10.10.10.20 node2-priv remains unchanged

Adjusted IP Address:
192.168.0.206 node1
192.168.0.207 node2
Node1-vip 192.168.0.208
192.168.0.209 node2-vip
10.10.10.10 node1-priv
10.10.10.20 node2-priv

2. Stop the oracle rac service. 1. Close the oracle rac process and run it on any node. Node 1 is used here.

[Root @ node1 ~] # Cd/u01/app/oracle/product/10.2.0/crs/bin
[Root @ node1 ~] # Pwd
/U01/app/oracle/product/10.2.0/crs/bin

# Shut down the database in sequence, such as asm, node application, and crs.

[Root @ node1 bin] #./srvctl stop database-d orcl
[Root @ node1 bin] #./srvctl stop asm-n node1
[Root @ node1 bin] #./srvctl stop asm-n node2
[Root @ node1 bin] #./srvctl stop nodeapps-n node1
[Root @ node1 bin] #./srvctl stop nodeapps-n node2

# View the closing status

[Root @ node1 bin] #./crs_stat-t

Name Type Target State Host
------------------------------------------------------------
Ora... SM1.asm application OFFLINE
Ora... E1.lsnr application OFFLINE
Ora. node1.gsd application OFFLINE
Ora. node1.ons application OFFLINE
Ora. node1.vip application OFFLINE
Ora... SM2.asm application OFFLINE
Ora... E2.lsnr application OFFLINE
Ora. node2.gsd application OFFLINE
Ora. node2.ons application OFFLINE
Ora. node2.vip application OFFLINE
Ora. orcl. db application OFFLINE
Ora... l1.inst application OFFLINE
Ora... l2.inst application OFFLINE

2. Disable the crs background process

# Note: It must be executed by the root user on all (node1, node2) nodes.

[Root @ node1 bin] #/etc/init. d/init. crs stop

Shutting down Oracle Cluster Ready Services (CRS ):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons shoshould exit soon.


[Root @ node2 bin] #/etc/init. d/init. crs stop

Shutting down Oracle Cluster Ready Services (CRS ):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons shoshould exit soon.

3. Modify the/etc/hosts file of server IP address 1. node1 and node2. Keep the two nodes consistent

[Root @ node1 bin] # vi/etc/hosts

192.168.0.206 node1
192.168.0.207 node2
Node1-vip 192.168.0.208
192.168.0.209 node2-vip
10.10.10.10 node1-priv
10.10.10.20 node2-priv

2. Modify the eth0 address and gateway respectively on the two nodes. The heartbeat address remains unchanged and remains unchanged.

Node1 node:
[Root @ node1 bin] # more/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
BOOTPROTO = static
HWADDR = 00: 0C: 29: EA: C7: 1F
IPADDR = 192.168.0.206
NETMASK = 255.255.255.0
ONBOOT = yes

Node2 node:
[Root @ node2 bin] # more/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE = eth0
BOOTPROTO = static
ONBOOT = yes
IPADDR = 192.168.0.207
NETMASK = 255.255.255.0
HWADDR = 00: 0c: 29: 6c: 08: aa

 

3. Restart the network service

# Service network restart
# Service network restart

4. Start crs.1. start crs on two nodes (node1 and node2) and disable services started with crs.

[Root @ node1 bin] #/etc/init. d/init. crs start
Startup will be queued to init within 30 seconds.

[Root @ node2 bin] #/etc/init. d/init. crs start
Startup will be queued to init within 30 seconds.

# Because the IP address has not been modified, some servers cannot be started successfully and need to be disabled.

[Root @ node1 bin] #./crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... SM1.asm application ONLINE node1
Ora... E1.lsnr application ONLINE OFFLINE
Ora. node1.gsd application ONLINE OFFLINE
Ora. node1.ons application ONLINE node1
Ora. node1.vip application ONLINE node1
Ora... SM2.asm application ONLINE node2
Ora... E2.lsnr application ONLINE OFFLINE
Ora. node2.gsd application ONLINE OFFLINE
Ora. node2.ons application ONLINE node2
Ora. node2.vip application ONLINE node2
Ora. orcl. db application ONLINE OFFLINE
Ora... l1.inst application ONLINE OFFLINE
Ora... l2.inst application ONLINE OFFLINE


# Disable all services

[Root @ node1 bin] #./srvctl stop database-d orcl
[Root @ node1 bin] #./srvctl stop asm-n node1
[Root @ node1 bin] #./srvctl stop asm-n node2
[Root @ node1 bin] #./srvctl stop nodeapps-n node1
[Root @ node1 bin] #./srvctl stop nodeapps-n node2

# Confirm to close

[Root @ node1 bin] #./crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... SM1.asm application OFFLINE
Ora... E1.lsnr application OFFLINE
Ora. node1.gsd application OFFLINE
Ora. node1.ons application OFFLINE
Ora. node1.vip application OFFLINE
Ora... SM2.asm application OFFLINE
Ora... E2.lsnr application OFFLINE
Ora. node2.gsd application OFFLINE
Ora. node2.ons application OFFLINE
Ora. node2.vip application OFFLINE
Ora. orcl. db application OFFLINE
Ora... l1.inst application OFFLINE
Ora... l2.inst application OFFLINE
[Root @ node1 bin] #

2. Use oifcfg to modify Nic settings. oifconfig can be used to set and view Nic usage methods.

��: Perform operations on node1 and node2. If the modified CIDR block is the same, do not do this. However, if the other CIDR blocks are the same, perform the following operations:

# View the current configuration

[Root @ node1 bin] #./oifcfg getif-global

Eth0 192.168.0.0 global public
Eth1 10.10.10.0 global cluster_interconnect

# Deleting the current configuration

[Root @ node1 bin] #./oifcfg delif-global eth0
[Root @ node1 bin] #./oifcfg delif-global eth1
[Root @ node1 bin] #./oifcfg getif

# Re-add, inline and heartbeat CIDR blocks (corresponding IP address subnet mask configured CIDR blocks)
[Root @ node1 bin] #./oifcfg setif-global eth0/192.168.0.0: public
[Root @ node1 bin] #./oifcfg setif-global eth1/10.10.10.0: cluster_interconnect

[Root @ node1 bin] #./oifcfg getif
Eth0 192.168.0.0 global public
Eth1 10.10.10.0 global cluster_interconnect

[Root @ node1 bin] #./oifcfg iflist

Eth0 192.168.0.0
Eth1 10.10.10.0

3. Modify the VIP address of node1 and node2

[Root @ node1 bin] #./srvctl modify nodeapps-n node1-A 192.168.0.208/255.255.255.0/eth0
[Root @ node1 bin] #./srvctl modify nodeapps-n node2-A 192.168.0.209/255.255.255.0/eth0
 

4. Set listener. ora and tnsnames. ora in node1 and node2.

# View the original IP address and change it to the current IP address.

[Root @ node1 bin] # vi/u01/app/oracle/product/10.2.0/db_1/network/admin/listener. ora

SID_LIST_LISTENER_NODE1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME =/u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)

LISTENER_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = node1-vip) (PORT = 1521) (IP = FIRST ))
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.0.206) (PORT = 1521) (IP = FIRST ))
)
)

5. Operate on node1. start the node application, asm, and database.

[Root @ node1 bin] #./srvctl start nodeapps-n node1
[Root @ node1 bin] #./srvctl start nodeapps-n node2
[Root @ node1 bin] #./srvctl start asm-n node1
[Root @ node1 bin] #./srvctl start asm-n node2
[Root @ node1 bin] #./srvctl start instance-d orcl-I orcl1
[Root @ node1 bin] #./srvctl start instance-d orcl-I orcl2
 

[Root @ node1 bin] #./crs_stat-t
Name Type Target State Host
------------------------------------------------------------
Ora... SM1.asm application ONLINE node1
Ora... E1.lsnr application ONLINE node1
Ora. node1.gsd application ONLINE node1
Ora. node1.ons application ONLINE node1
Ora. node1.vip application ONLINE node1
Ora... SM2.asm application ONLINE node2
Ora... E2.lsnr application ONLINE node2
Ora. node2.gsd application ONLINE node2
Ora. node2.ons application ONLINE node2
Ora. node2.vip application ONLINE node2
Ora. orcl. db application ONLINE node2
Ora... l1.inst application ONLINE node1
Ora... l2.inst application ONLINE node2

If a problem occurs during startup, make a judgment.

6. Confirm the IP address. The modification is complete.

[Root @ node1 bin] # ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: EA: C7: 1F
Inet addr: 192.168.0.206 Bcast: 192.168.0.255 Mask: 255.255.255.0

Eth0: 1 Link encap: Ethernet HWaddr 00: 0C: 29: EA: C7: 1F
Inet addr: 192.168.0.208 Bcast: 192.168.0.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1

Eth1 Link encap: Ethernet HWaddr 00: 0C: 29: EA: C7: 29
Inet addr: 10.10.10.10 Bcast: 10.10.255 Mask: 255.255.255.0


[Root @ node2 ~] # Ifconfig
Eth0 Link encap: Ethernet HWaddr 00: 0C: 29: 6C: 08: AA
Inet addr: 192.168.0.207 Bcast: 192.168.0.255 Mask: 255.255.255.0

Eth0: 1 Link encap: Ethernet HWaddr 00: 0C: 29: 6C: 08: AA
Inet addr: 192.168.0.209 Bcast: 192.168.0.255 Mask: 255.255.255.0
Up broadcast running multicast mtu: 1500 Metric: 1

Eth1 Link encap: Ethernet HWaddr 00: 0C: 29: 6C: 08: B4
Inet addr: 10.10.10.20 Bcast: 10.10.255 Mask: 255.255.255.0

7. Restart the node for testing. The rac starts normally and is normal.

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.