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

How oracle 11gR2RAC modifies public ip

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article is about how oracle 11gR2RAC modifies public ip. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Ⅰ modifies public to select a node (select rac1 here)

View hosts settings

[root@rac2 bin] # cat / etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

# public

192.168.215.188 rac1

192.168.215.189 rac2

# private

10.0.0.118 rac1-priv

10.0.0.119 rac2-priv

# vip

192.168.215.120 rac1-vip

192.168.215.121 rac2-vip

# scan

192.168.215.122 scanip

View crs resource status

[root@rac2 bin] #. / crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.FRA.dg

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.LISTENER.lsnr

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.OCR.dg

ONLINE OFFLINE rac1

ONLINE OFFLINE rac2

Ora.asm

ONLINE ONLINE rac1 Started

ONLINE ONLINE rac2 Started

Ora.gsd

OFFLINE OFFLINE rac1

OFFLINE OFFLINE rac2

Ora.net1.network

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.ons

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.registry.acfs

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE rac2

Ora.cvu

1 ONLINE ONLINE rac2

Ora.oc4j

1 ONLINE ONLINE rac2

Ora.orcl.db

1 ONLINE ONLINE rac1 Open

2 ONLINE ONLINE rac2 Open

Ora.orcl.ssss.svc

1 ONLINE ONLINE rac2

2 ONLINE ONLINE rac1

Ora.rac1.vip

1 ONLINE ONLINE rac1

Ora.rac2.vip

1 ONLINE ONLINE rac2

Ora.scan1.vip

1 ONLINE ONLINE rac2

OCR disk group is offline, check ocr status

Grid@rac1 ~] $ocrcheck

Status of Oracle Cluster Registry is as follows:

Version: 3

Total space (kbytes): 262120

Used space (kbytes): 3388

Available space (kbytes): 258732

ID: 1954953290

Device/File Name: + OCRA

Device/File integrity check succeeded

Device/File not configured

Device/File not configured

Device/File not configured

Device/File not configured

Cluster registry integrity check succeeded

Logical corruption check bypassed due to non-privileged user

If you find an invalid disk group OCR, delete it. (this step was replaced by ocr in my previous experiment.)

[grid@rac1] $srvctl remove diskgroup-g OCR

[grid@rac1] $crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.FRA.dg

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.LISTENER.lsnr

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.asm

ONLINE ONLINE rac1 Started

ONLINE ONLINE rac2 Started

Ora.gsd

OFFLINE OFFLINE rac1

OFFLINE OFFLINE rac2

Ora.net1.network

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.ons

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.registry.acfs

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE rac2

Ora.cvu

1 ONLINE ONLINE rac2

Ora.oc4j

1 ONLINE ONLINE rac2

Ora.orcl.db

1 ONLINE ONLINE rac1 Open

2 ONLINE ONLINE rac2 Open

Ora.orcl.ssss.svc

1 ONLINE ONLINE rac2

2 ONLINE ONLINE rac1

Ora.rac1.vip

1 ONLINE ONLINE rac1

Ora.rac2.vip

1 ONLINE ONLINE rac2

Ora.scan1.vip

1 ONLINE ONLINE rac2

View current public configuration

[root@rac1 bin] #. / oifcfg getif

Eth2 10.0.0.0 global cluster_interconnect

Eth0 192.168.215.0 global public

If it is displayed as 215 network segment, it should be changed to 56 network segment.

[root@rac1 bin] #. / oifcfg delif-global eth0/192.168.215.0 # Delete 215IP address range

[root@rac1 bin] #. / oifcfg setif-global eth0/192.168.56.0:public # set 56 network segment

[root@rac1 bin] #. / oifcfg getif # check the modification. Take a look at both nodes.

Eth2 10.0.0.0 global cluster_interconnect

Eth0 192.168.56.0 global public

[root@rac2 bin] #. / oifcfg getif

Eth2 10.0.0.0 global cluster_interconnect

Eth0 192.168.56.0 global public

Modify the two-node hosts file to change only the network segment of pubic ip

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

# public

192.168.56.188 rac1

192.168.56.189 rac2

# private

10.0.0.118 rac1-priv

10.0.0.119 rac2-priv

# vip

192.168.215.120 rac1-vip

192.168.215.121 rac2-vip

# scan

192.168.215.122 scanip

If the actual public address is changed to 56 network segment, both nodes should be changed.

[root@rac1 bin] # vi / etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

HWADDR=08:00:27:9c:25:21

TYPE=Ethernet

UUID=c2ec39dd-92bf-41fc-8d41-21d78536c9f9

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

IPADDR=192.168.56.189

NETMASK=255.255.255.0

GATEWAY=192.168.56.1

IPV6INIT=no

USERCTL=no

Service network restart after modification

Ⅱ modify vip still choose rac1 (official document is to stop one node to modify this node, and then start to modify the next node)

Stop the instance and vip resources of Node 1

[root@rac1 bin] #. / srvctl stop instance-d orcl-n rac1

[root@rac1 bin] #. / srvctl stop vip-n rac1-f

PRCC-1017: 192.168.215.190 was already stopped on rac1

PRCR-1005: Resource ora.rac1.vip is already stopped

Modify the vip corresponding to two nodes

[root@rac1 bin] #. / srvctl modify nodeapps-n rac1-A 192.168.56.120/255.255.255.0/eth0

[root@rac1 bin] #. / srvctl modify nodeapps-n rac2-A 192.168.56.121/255.255.255.0/eth0

View the result

[root@rac1 bin] #. / srvctl config nodeapps-a

Network exists: 1/192.168.56.0/255.255.255.0/eth0, type static

VIP exists: / 192.168.56.120/192.168.56.120/192.168.56.0/255.255.255.0/eth0, hosting node rac1

VIP exists: / 192.168.56.121/192.168.56.121/192.168.56.0/255.255.255.0/eth0, hosting node rac2

Restart vip and instance

[root@rac1 bin] #. / srvctl start vip-n rac1

PRKO-2420: VIP is already started on node (s): rac1

[root@rac1 bin] #. / srvctl start listener-n rac1

PRCC-1015: LISTENER was already running on rac1

PRCR-1004: Resource ora.LISTENER.lsnr is already running

[root@rac1 bin] #. / srvctl start instance-d orcl-n rac1

PRCC-1015: orcl was already running on rac1

PRCR-1004: Resource ora.orcl.db is already running

Rebooted itself? Take a look at the resource status

[root@rac1 bin] #. / crsctl stat res-t

NAME TARGET STATE SERVER STATE_DETAILS

Local Resources

Ora.DATA.dg

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.FRA.dg

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.LISTENER.lsnr

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.asm

ONLINE ONLINE rac1 Started

ONLINE ONLINE rac2 Started

Ora.gsd

OFFLINE OFFLINE rac1

OFFLINE OFFLINE rac2

Ora.net1.network

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.ons

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Ora.registry.acfs

ONLINE ONLINE rac1

ONLINE ONLINE rac2

Cluster Resources

Ora.LISTENER_SCAN1.lsnr

1 ONLINE ONLINE rac1

Ora.cvu

1 ONLINE ONLINE rac2

Ora.oc4j

1 ONLINE ONLINE rac2

Ora.orcl.db

1 ONLINE ONLINE rac1 Open

2 ONLINE ONLINE rac2 Open

Ora.orcl.ssss.svc

1 ONLINE ONLINE rac2

2 ONLINE ONLINE rac1

Ora.rac1.vip

1 ONLINE ONLINE rac1

Ora.rac2.vip

1 ONLINE ONLINE rac2

Ora.scan1.vip

1 ONLINE ONLINE rac1

[root@rac1 bin] #

Modify two-node hosts file

[root@rac1 bin] # vi / etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

# public

192.168.56.188 rac1

192.168.56.189 rac2

# private

10.0.0.118 rac1-priv

10.0.0.119 rac2-priv

# vip

192.168.56.120 rac1-vip

192.168.56.121 rac2-vip

# scan

192.168.215.122 scanip

~

My scanip name is scanip.

[root@rac2 bin] #. / srvctl config scan

SCAN name: scanip, Network: 1/192.168.56.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: / scanip/192.168.215.122

# shows that it is still 215 network segment

Stop scan and listener

[root@rac2 bin] #. / srvctl stop scan_listener

[root@rac2 bin] #. / srvctl stop scan

Modify two-node hosts file

[root@rac2 bin] # vi / etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6

# public

192.168.56.188 rac1

192.168.56.189 rac2

# private

10.0.0.118 rac1-priv

10.0.0.119 rac2-priv

# vip

192.168.56.120 rac1-vip

192.168.56.121 rac2-vip

# scan

192.168.56.122 scanip # modified to 56 network segment

Modify scanip

[root@rac2 bin] #. / srvctl modify scan-n scanip # refresh scanip and actually read addresses from hosts

[root@rac2 bin] #. / srvctl config scan # View refresh status

SCAN name: scanip, Network: 1/192.168.56.0/255.255.255.0/eth0

SCAN VIP name: scan1, IP: / scanip/192.168.56.122

Modify successfully. Restart scan and listener

[root@rac2 bin] #. / srvctl start scan

[root@rac2 bin] #. / srvctl start scan_listener

Thank you for reading! This is the end of the article on "how oracle 11gR2RAC modifies public ip". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out 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

Database

Wechat

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

12
Report