Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Operation method of Oracle10g RAC + AIX6 IP address switching

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the operation method of Oracle10g RAC + AIX6 IP address switching, the content is very detailed, interested friends can refer to, hope to be helpful to you.

In order to upgrade the production environment of a bank's credit system, the IP address of the server that is about to be produced is required to keep the original IP address of the production server unchanged, and the pre-production RAC server IP address needs to be switched to the production server IP.

The switching record is as follows:

Hardware environment

L there are P780-2 database servers, which are mainly configured as follows:

There are 8 CPU.

16GB of memory

L database server disk array

Software environment

L operating system: AIX 6.1 Murray 05

L Cluster software: HACMP 5.5.1 ORACLE CRS10.2.0.1

L database: ORACLE 10G DATABASE RELEASE 1

L database patch set: 10.2.0.5

Network environment before IP handoff

Ora01

Ora02

HA boot IP address (private IP)

172.168.28.1/172.168.128.1

Netmask 255.255.255.224

172.168.28.1/172.168.128.1

Netmask 255.255.255.224

RAC service IP address

211.7.28.7/255.255.255.224

211.7.28.8/255.255.255.224

HA server IP address

211.7.28.1/255.255.255.224

211.7.28.2/255.255.255.224

Public IP address

211.7.28.5/255.255.255.224

211.7.28.6/255.255.255.224

Network environment after IP handover

Ora01

Ora02

HA boot IP address (private IP)

192.168.128.1/192.168.128.1

Netmask 255.255.255.224

192.168.128.1/192.168.128.1

Netmask 255.255.255.224

RAC service IP address

213.7.28.17/255.255.255.224

213.7.28.18/255.255.255.224

HA server IP address

213.7.28.11/255.255.255.224

213.7.28.12/255.255.255.224

Public IP address

213.7.28.15/255.255.255.224

213.7.28.16/255.255.255.224

2. Modify the HACMP IP address (1) obtain the IP address configured in the current HACMP environment

# / usr/sbin/cluster/utilities/cllsif > / tmp/cllsif.orig

The / tmp/cllsif.orig file will contain the current IP address of the HACMP Nic.

(2) stop the HACMP service of all nodes

# smit clstop-- > Select two nodes of HA-- > enter to stop the HACMP service.

(3) edit / etc/hosts on the two nodes respectively, and change the boot and service to the required IP address. Because the boot has not changed, only the service IP is modified.

(4) change Service IP in HACMP configuration

1) Delete the original service IP label

# smit hacmp-- > Extended Configuration-- > Extended Topology Configuration-- > Configure HACMP Nodes-- > Change/Show a Node in the HACMP Cluster-- > Select a node-- > re-select a new boot IP at Communication Path to Node-- > enter confirmation.

2) add a new Service IP Label

# smit hacmp-- > Extended Configuration-- > Extended Resource Configuration-- > HACMP Extended Resources Configuration-- > Configure HACMP Service IP Labels/Addresses-- > Add a Service IP Label/Address-- > Configurable on Multiple Nodes-- > Select a network (such as net_ether_01)-> Select a new Server IP tag at IP Label/Address (you should see the changed server IP in the list)-> enter confirmation.

(5) change the service IP of another node with the method in (4).

(6) synchronous HACMP.

# smit hacmp-- > Extended Configuration-- > Extended Verification and Synchronization-- > Select Both-- > enter confirmation at Verify and Synchronize or Both.

(7) start HACMP

# smit clstart-- > Select two nodes to start.

# / usr/sbin/cluster/utilities/cllsif > / tmp/cllsif.new / / View the IP settings after HA startup, compare the / tmp/cllsif.new file with the previous / tmp/cllsif.orig file, and all ip address changes will be reflected.

Note: after changing the Public IP address, it is found that the modified IP is still mounted on the server's en2 Nic after the operating system restarts. After performing the deletion using the following command.

# ifconfig en2 211.7.28.5 netmask 255.255.255.224 delete

The restart operating system found that the modified address still exists.

Solution: delete the en2 Nic in the operating system and reconfigure the en2 Nic as follows:

1) ifconfig-a check your network card physical and logical devices

# ifconfig en2 down

# ifconfig en0 detach

2) rmdev-Rdl en0

3) rmdev-Rdl ent0

4) cfgmgr-v

5) smit mktcpip reconfigures your network card information.

After rebooting the operating system, the modified IP address no longer exists.

3. Modify RAC public IP address and modify RAC PUBLIC IP address as follows:

(1) first use the following command to view the configuration information of the current PUBLIC address.

$$ORA_CRS_HOME/bin/oifcfg getif

Eth0 172.168.28.0 global cluster_interconnect

Eth3 211.7.28.0 global public

(2) to modify the Public Nic address, first delete the Nic configuration information with the following command, and then add the modified Nic configuration information. The specific operations are as follows:

$$ORA_CRS_HOME/bin/oifcfg delif-global eth3

$$ORA_CRS_HOME/bin/oifcfg setif-global eth3/211.7.28.0:public

If the VPC configuration is deleted, the method is the same:

$$ORA_CRS_HOME/bin/oifcfg delif-global eth0

$ORA_CRS_HOME/bin/oifcfg setif-global eth3/172.168.28.0: cluster_interconnect

(3) verify the newly configured network information with the following command.

$$ORA_CRS_HOME/bin/oifcfg getif

Eth0 172.168.28.0 global cluster_interconnect

Eth3 211.7.28.0 global public

The purpose of RAC VIP switching this section is to change the hostname of the virtual IP address (VIP) or other VIP or VIP parameters in Oracle RAC / Oracle cluster / grid infrastructure environment.

Note: this note can only be used to change the IP address or hostname VIP or other parameters related to VIP.

(1) verify the current VIP configuration

First, verify the current configuration information of VIP by running the following command:

Srvctl config nodeapps-n-a

You can see the current VIP hostname, VIP address, and interface information with the parameter-a.

$srvctl config nodeapps-n ora01-a

VIP exists.: / ora01-vip/211.7.28.7/255.255.255.224/Public

The above information

The VIP Hostname is' node1-v'

The VIP IP address is' 211.7.28.7'

The VIP subnet mask is' 255.255.255.224'

The Interface Name used by the VIP is called 'Public'

After determining the current configuration information, determine which configurations do not need to be changed, and determine the current configuration and the new address information.

(2) stop system resources

Once you are ready to modify the configuration information, stop all resources that depend on VIP, including the instance of the RAC database at that node.

Stop all services with the following command.

$crs_stop-all

Verify that VIP is not running through the 'ifconfig-a' command, and if you can't see the VIP address through these commands, VIP has stopped running.

(III) Editing / etc/hosts file

Change the VIP to the required IP address.

# vi / etc/hosts

127.0.0.1 localhost loopback # loopback (lo0) name/address

# public network

211.7.28.15 ora01

211.7.28.16 ora02

# virtual IP

211.7.28.17 ora01-vip

211.7.28.18 ora02-vip

# service IP

211.7.28.11 ora01-ser

211.7.28.12 ora02-ser

# HACMP IP

172.168.28.1 boot1-ip1

172.168.28.2 boot2-ip1

172.168.128.1 boot1-ip2

172.168.128.2 boot2-ip2

(4) modify node VIP command

When making IP changes, you must require the Clusterware software to be running. Use the 'srvctl modify nodeapps' command to modify the node information, as follows

Srvctl modify nodeapps-n [- o] [- A]

Parameter book title:

-n node name.

-O installation directory of cluster software (CRS-Home).

-A The node level VIP address (/ netmask [/ if1 [| if2 |...]]).

The current operation is as follows:

$srvctl modify nodeapps-n ora01-A 211.7.28.17/255.255.255.0/eth3

Note: on AIX or Unix systems, this command should be run with root privileges. If you run this command with oracle, you will report the following error:

PRKO-2117: This command should be executed as the system privilege user.

Solution: just execute the following command under the root user to import the oracle environment variable.

Export ORACLE_BASE=/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/10g/db_1

Export PATH=$PATH:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin:/usr/bin:/etc:/usr/bin/X11:/usr/local/bin

The same method modifies the VIP address of node 2.

(5) modify the IP information in listener.ora and tnsnames.ora against the host IP address.

Note: if you do not modify the PUBLIC and VIP information of the corresponding server in listener.ora and tnsnames.ora, the listening will not start normally.

(6) start the CRS node application with the following command.

$crs_start-all

At this point all CRS configurations should be ONLINE.

The operation method of Oracle10g RAC + AIX6 IP address switching is shared here. I hope the above content can be helpful to everyone and learn more knowledge. If you think the article is good, you can share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report