Get the App
SLTechnology News&Howtos  ›  Database  › 

How to modify various ip addresses of rac cluster in linux

Shulou Source: shulou.com Published: 2022-05-31 15:38:57 11月03日 Update

This article mainly introduces "how to modify various ip addresses of rac clusters in linux". In daily operation, I believe many people have doubts about how to modify various ip addresses of rac clusters in linux. The editor consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts of "how to modify various ip addresses of rac clusters in linux". Next, please follow the editor to study!

Modify the ip address:

1. View the interface configuration and modify:

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/oifcfg getif

Enp0s3 192.168.6.0 global public public network ip segment

Enp0s8 10.10.10.0 global cluster_interconnect private network ip segment

Delete the original public and private IP address:

[root@rac1] # / oracle/app/11.2.0/grid/bin/oifcfg delif-global enp0s3

[root@rac1] # / oracle/app/11.2.0/grid/bin/oifcfg delif-global enp0s8

Reset the new Public IP:

[root@rac1] # / oracle/app/11.2.0/grid/bin/oifcfg setif-global enp0s3/192.168.60.0:public

[root@rac1] # / oracle/app/11.2.0/grid/bin/oifcfg setif-global enp0s8/10.10.20.0:cluster_inerconnect

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/oifcfg getif

two。 Stop the has service:

/ oracle/app/11.2.0/grid/bin/crsctl stop has

3. Modify public and private IP addresses through operating system commands

Linux: vi / etc/sysconfig/network-scripts/ifcfg-enp0s3

Systemctl restart network

Modify SCAN domain name configuration (there is DNS domain name resolution, modify domain name mapping)

Modify hosts file public IP address, VIP address, SCAN address

Vi / etc/hosts

4. Start has:

/ oracle/app/11.2.0/grid/bin/crsctl start has

5. View and modify network resources

/ oracle/app/11.2.0/grid/bin/srvctl config network

Network exists: 1/192.168.6.0/255.255.255.0/enp0s3, type static

/ oracle/app/11.2.0/grid/bin/srvctl modify network-k 1-S 192.168.60.0/255.255.255.0/enp0s3-v

6. Reconfigure SCAN VIP and SCAN Listener

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl config scan

SCAN name: rac-scan, Network: 1/192.168.6.0/255.255.255.0/enp0s3

SCAN VIP name: scan1, IP: / rac-scan/192.168.6.254

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl config scan_listener

SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl stop scan_listener

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl stop scan

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl remove scan_listener

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl remove scan

[root@rac1] # / oracle/app/11.2.0/grid/bin/srvctl add scan-n scan (new scan name)-k 1-S 192.168.60.0/255.255.255.0/enp0s3

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl add scan_listener

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl start scan

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl start scan_listener

7. Reconfigure vip

[root@rac1] # / oracle/app/11.2.0/grid/bin/srvctl config vip-n rac1

[root@rac1] # / oracle/app/11.2.0/grid/bin/srvctl config vip-n rac2

VIP exists: / rac1-vip/192.168.6.102/192.168.6.0/255.255.255.0/enp0s3, hosting node rac1

[root@rac1] # / oracle/app/11.2.0/grid/bin/crsctl stop resource ora.rac1.vip-f

[root@rac1] # / oracle/app/11.2.0/grid/bin/crsctl stop resource ora.rac2.vip-f

[root@rac1] # / oracle/app/11.2.0/grid/bin/srvctl modify nodeapps-A 192.168.60.101/255.255.255.0/enp0s3-n rac1

[root@rac1] # / oracle/app/11.2.0/grid/bin/srvctl modify nodeapps-A 192.168.60.201/255.255.255.0/enp0s3-n rac2

[root@rac1] # / oracle/app/11.2.0/grid/bin/crsctl start resource ora.rac1.vip-f

[root@rac1] # / oracle/app/11.2.0/grid/bin/crsctl start resource ora.rac2.vip-f

Ps:-crsctl eval stop resource ora.cdbrac.db-unsupported (highlight 12c change, eval is a simulation command) Doc ID 1966448.1

8. Start local snooping

[root@rac1] # / oracle/app/11.2.0/grid/bin/srvctl start listener-n rac1

[root@rac1] # / oracle/app/11.2.0/grid/bin/srvctl start listener-n rac2

9. Modify database instance parameters

Alter system set local_listener=' (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.60.101) (PORT=1521) 'scope=both sid='prod1'

Alter system set local_listener=' (DESCRIPTION= (ADDRESS_LIST= (ADDRESS= (PROTOCOL=TCP) (HOST=192.168.60.201) (PORT=1521) 'scope=both sid='prod2'

Alter system register

10. Check the status of resources

Ifconfig

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl config scan

[root@rac1 ~] # / oracle/app/11.2.0/grid/bin/srvctl config scan_listener

Gridlrlgridlsnrctl status listener_scan1

Grid$crsctl status res-t

At this point, the study on "how to modify various ip addresses of rac clusters in linux" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Address cluster learning configuration domain name command more network segment resource help private practical next operating system parameter name instance interface data database Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MySQL Linux Apple Shulou Information