11g RAC 修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
1. IP修改規劃
|
hostname |
修改前 |
修改後 |
Public-ip |
Node1 |
192.168.150.11 |
192.168.114.11 |
Node2 |
192.168.150.12 |
192.168.114.12 |
|
VIP |
Node1 |
192.168.150.13 |
192.168.114.13 |
Node2 |
192.168.150.14 |
192.168.114.14 |
|
SCAN-IP |
Node1 Node2 |
192.168.150.15 |
192.168.114.15 |
192.168.150.16 |
192.168.114.16 |
||
192.168.150.17 |
192.168.114.17 |
||
Priv-ip
|
Node1 |
172.168.146.101 |
172.168.146.11 |
Node2 |
172.168.146.102 |
172.168.146.12 |
|
|
|
|
|
2. 修改前hosts檔案
- [root@node1 ~]# more /etc/hosts
- 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
- ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
- 192.168.150.11 node1
- 192.168.150.12 node2
- 192.168.150.13 node1-vip
- 192.168.150.14 node2-vip
- 172.168.146.101 node1-priv
- 172.168.146.102 node2-priv
- 192.168.150.15 scanip
- 192.168.150.16 scanip
- 192.168.150.17 scanip
- [root@node2 ~]# crs_stat -t
- Name Type Target State Host
- ------------------------------------------------------------
- ora.CRS.dg ora....up.type ONLINE ONLINE node1
- ora.DATA.dg ora....up.type ONLINE ONLINE node1
- ora....ER.lsnr ora....er.type ONLINE ONLINE node1
- ora.LSNR2.lsnr ora....er.type ONLINE ONLINE node1
- ora....N1.lsnr ora....er.type ONLINE ONLINE node2
- ora....N2.lsnr ora....er.type ONLINE ONLINE node1
- ora....N3.lsnr ora....er.type ONLINE ONLINE node1
- ora.LSNR3.lsnr ora....er.type ONLINE ONLINE node1
- ora.asm ora.asm.type ONLINE ONLINE node1
- ora.cvu ora.cvu.type ONLINE ONLINE node1
- ora.gsd ora.gsd.type ONLINE OFFLINE
- ora....network ora....rk.type ONLINE ONLINE node1
- ora....SM1.asm application ONLINE ONLINE node1
- ora....E1.lsnr application ONLINE ONLINE node1
- ora....E1.lsnr application ONLINE ONLINE node1
- ora....E1.lsnr application ONLINE ONLINE node1
- ora.node1.gsd application ONLINE OFFLINE
- ora.node1.ons application ONLINE ONLINE node1
- ora.node1.vip ora....t1.type ONLINE ONLINE node1
- ora....SM2.asm application ONLINE ONLINE node2
- ora....E2.lsnr application ONLINE ONLINE node2
- ora....E2.lsnr application ONLINE ONLINE node2
- ora....E2.lsnr application ONLINE ONLINE node2
- ora.node2.gsd application ONLINE OFFLINE
- ora.node2.ons application ONLINE ONLINE node2
- ora.node2.vip ora....t1.type ONLINE ONLINE node2
- ora.oc4j ora.oc4j.type ONLINE ONLINE node1
- ora.ons ora.ons.type ONLINE ONLINE node1
- ora.scan1.vip ora....ip.type ONLINE ONLINE node2
- ora.scan2.vip ora....ip.type ONLINE ONLINE node1
- ora.scan3.vip ora....ip.type ONLINE ONLINE node1
- ora.tan.db ora....se.type ONLINE ONLINE node1
- [root@node2 ~]# srvctl status database -d tan
- Instance tan1 is running on node node1
- Instance tan2 is running on node node2
4. 關閉資料及CRS
- [root@node1 ~]# srvctl stop database -d tan
- [root@node1 ~]# srvctl status database -dtan
- Instance tan1 is not running on node node1
- Instance tan2 is not running on node node2
- [root@node1 ~]# srvctl stop listener -nnode1
- [root@node1 ~]# srvctl stop listener -nnode2
- [root@node1 ~]# srvctl stop vip -n node1
- [root@node1 ~]# srvctl stop vip -n node2
- PRCC-1017 : node2-vip was already stoppedon node2
- PRCR-1005 : Resource ora.node2.vip isalready stopped
- [root@node1 ~]# srvctl stop scan_listener
- [root@node1 ~]# srvctl stop scan
2個節點都需要停掉CRS
- [root@node1 ~]# crsctl stop crs
- [root@node2 ~]# crsctl stop crs
驗證:
- [root@node1 ~]# crs_stat -t
- CRS-0184: Cannot communicate with the CRSdaemon.
- [root@node1 ~]# crsctl check crs
- CRS-4639: Could not contact Oracle HighAvailability Services
- [root@node1 ~]# crsctl check cluster
- CRS-4639: Could not contact Oracle HighAvailability Services
- CRS-4000: Command Check failed, orcompleted with errors.
- [root@node1 ~]#
- [root@node1 ~]# ps -ef|grep grid
- root 14062 26218 0 23:46 pts/2 00:00:00 grep grid
暫不修改Priv-ip,修改後如下:
- 192.168.114.11 node1
- 192.168.114.12 node2
- 192.168.114.13 node1-vip
- 192.168.114.14 node2-vip
- 172.168.146.101 node1-priv
- 172.168.146.102 node2-priv
- 192.168.114.15 scanip
- 192.168.114.16 scanip
- 192.168.114.17 scanip
只修改了Public-ip對應的eth0暫不修改priv-ip對應的eth1
- [root@node1 ~]# cd/etc/sysconfig/network-scripts/
- [root@node1network-scripts]# vi ifcfg-eth0
- DEVICE="eth0"
- BOOTPROTO="static"
- HWADDR="00:0C:29:7D:D1:29"
- NM_CONTROLLED="yes"
- ONBOOT="yes"
- TYPE="Ethernet"
- IPADDR=192.168.114.11
- NETMASK=255.255.255.0
- GATEWAY=192.168.115.254
- ~
- [root@node2 ~]# cd/etc/sysconfig/network-scripts/
- [root@node2network-scripts]# vi ifcfg-eth0
- DEVICE="eth0"
- BOOTPROTO=static
- ONBOOT="yes"
- TYPE="Ethernet"
- IPADDR=192.168.114.12
- NETMASK=255.255.255.0
- GATEWAY=192.168.114.254
- HWADDR="00:50:56:27:B7:1A"
- [root@node1 ~]# crsctl start crs
- CRS-4123: Oracle High Availability Serviceshas been started.
- [root@node2 ~]# crsctl start crs
- CRS-4123: Oracle High Availability Serviceshas been started.
- [root@node1 ~]# crsctl check crs
- CRS-4638: Oracle High Availability Servicesis online
- CRS-4535: Cannot communicate with ClusterReady Services
- CRS-4529: Cluster Synchronization Servicesis online
- CRS-4534: Cannot communicate with EventManager
等一會再看
- [root@node1 ~]# crsctl check crs
- CRS-4638: Oracle High Availability Services is online
- CRS-4537: Cluster Ready Services is online
- CRS-4529: Cluster Synchronization Services is online
- CRS-4533: Event Manager is online
- [root@node1 ~]# crs_stat -t
- Name Type Target State Host
- ------------------------------------------------------------
- ora.CRS.dg ora....up.type ONLINE ONLINE node1
- ora.DATA.dg ora....up.type ONLINE ONLINE node1
- ora....ER.lsnr ora....er.type OFFLINE OFFLINE
- ora.LSNR2.lsnr ora....er.type OFFLINE OFFLINE
- ora....N1.lsnr ora....er.type OFFLINE OFFLINE
- ora....N2.lsnr ora....er.type OFFLINE OFFLINE
- ora....N3.lsnr ora....er.type OFFLINE OFFLINE
- ora.LSNR3.lsnr ora....er.type OFFLINE OFFLINE
- ora.asm ora.asm.type ONLINE ONLINE node1
- ora.cvu ora.cvu.type ONLINE OFFLINE
- ora.gsd ora.gsd.type ONLINE OFFLINE
- ora....network ora....rk.type ONLINE OFFLINE
- ora....SM1.asm application ONLINE ONLINE node1
- ora....E1.lsnr application OFFLINE OFFLINE
- ora....E1.lsnr application OFFLINE OFFLINE
- ora....E1.lsnr application OFFLINE OFFLINE
- ora.node1.gsd application ONLINE OFFLINE
- ora.node1.ons application ONLINE OFFLINE
- ora.node1.vip ora....t1.type OFFLINE OFFLINE
- ora....SM2.asm application ONLINE ONLINE node2
- ora....E2.lsnr application OFFLINE OFFLINE
- ora....E2.lsnr application OFFLINE OFFLINE
- ora....E2.lsnr application OFFLINE OFFLINE
- ora.node2.gsd application ONLINE OFFLINE
- ora.node2.ons application ONLINE OFFLINE
- ora.node2.vip ora....t1.type OFFLINE OFFLINE
- ora.oc4j ora.oc4j.type ONLINE ONLINE node1
- ora.ons ora.ons.type ONLINE OFFLINE
- ora.scan1.vip ora....ip.type OFFLINE OFFLINE
- ora.scan2.vip ora....ip.type OFFLINE OFFLINE
- ora.scan3.vip ora....ip.type OFFLINE OFFLINE
- ora.tan.db ora....se.type OFFLINE OFFLINE
[root@node1 ~]# oifcfg getif
eth0 192.168.150.0 global public
eth1 172.168.146.0 global cluster_interconnect
[root@node1 ~]#oifcfg delif -global eth0
[root@node1 ~]#oifcfg setif -global eth0/192.168.114.0:public
[root@node1 ~]# oifcfg getif
eth1 172.168.146.0 global cluster_interconnect
eth0 192.168.114.0 global public
9. 使用srvctl修改VIP
[root@node2 ~]# srvctl stop database -d tan-o immediate
PRCC-1016 : tan was already stopped
[root@node2 ~]# srvctl config vip -n node1
VIP exists:/node1-vip/192.168.114.13/192.168.150.0/255.255.255.0/eth0, hosting node node1
[root@node2 ~]# srvctl config vip -n node2
VIP exists:/node2-vip/192.168.114.14/192.168.150.0/255.255.255.0/eth0, hosting node node2
[root@node2 ~]# srvctl stop listener -nnode1
[root@node2 ~]# srvctl stop listener -nnode2
[root@node2 ~]# srvctl stop vip -n node1
[root@node2 ~]# srvctl stop vip -n node2
[root@node2 ~]# srvctlmodify nodeapps -n node1 -A 192.168.114.13/255.255.255.0/eth0
[root@node2 ~]# srvctlmodify nodeapps -n node2 -A 192.168.114.14/255.255.255.0/eth0
[root@node2 ~]# srvctl config vip -n node1
VIP exists:/node1-vip/192.168.114.13/192.168.114.0/255.255.255.0/eth0, hosting node node1
[root@node2 ~]# srvctl config vip -n node2
VIP exists:/node2-vip/192.168.114.14/192.168.114.0/255.255.255.0/eth0, hosting node node2
10. 使用srvctl修改SCANIP修改SCANIP
[root@node1 ~]# srvctl config scan
SCAN name: scanip, Network:1/192.168.114.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP:/scanip/192.168.150.15
SCAN VIP name: scan2, IP:/scanip/192.168.150.16
SCAN VIP name: scan3, IP:/scanip/192.168.150.17
[root@node1 ~]# srvctl stop scan_listener
[root@node1 ~]# srvctl stop scan
[root@node1 ~]# srvctlmodify scan -n scanip
注:這兒的scanip是/etc/hosts裡的名字
192.168.114.15 scanip
192.168.114.16 scanip
192.168.114.17 scanip
檢查確認:
[root@node1 ~]# srvctl config scan
SCAN name: scanip, Network:1/192.168.114.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP:/scanip/192.168.114.15
SCAN VIP name: scan2, IP:/scanip/192.168.114.16
SCAN VIP name: scan3, IP:/scanip/192.168.114.17
啟動scan
[root@node1 ~]# srvctl start scan
[root@node1 ~]# srvctl start scan_listener
11. 使用oifcfg修改私有PRIV-IP[root@node1 ~]# oifcfg getif
eth1 172.168.146.0 global cluster_interconnect
eth0 192.168.114.0 global public
是一個網段,這兒就不用改了,如果需要改,參考修改public-ip
修改2個節點/etc/hosts
172.168.146.11 node1-priv
172.168.146.12 node2-priv
修改2個節點eth1物理地點
- [root@node1 ~]# cd/etc/sysconfig/network-scripts/
- [root@node1 network-scripts]# vi ifcfg-eth1
- DEVICE="eth1"
- BOOTPROTO="static"
- HWADDR="00:0C:29:7D:D1:33"
- NM_CONTROLLED="yes"
- ONBOOT="yes"
- TYPE="Ethernet"
- IPADDR=172.168.146.11
- NETMASK=255.255.255.0
- GATEWAY=172.168.150.1
- ~
- [root@node2 network-scripts]# vi ifcfg-eth1
- DEVICE="eth1"
- BOOTPROTO="static"
- HWADDR="00:50:56:3E:DF:A5"
- NM_CONTROLLED="yes"
- ONBOOT="yes"
- TYPE="Ethernet"
- IPADDR=172.168.146.12
- NETMASK=255.255.255.0
- GATEWAY=172.168.150.1
[root@node1 ~]# srvctl start vip -n node1
[root@node1 ~]# srvctl start vip -n node2
[root@node1 ~]# srvctl start listener -nnode1
[root@node1 ~]# srvctl start listener -nnode2
[root@node2 ~]# srvctl start database -dtan
[root@node1 ~]# srvctl status database -dtan
Instance tan1 is running on node node1
Instance tan2 is running on node node2
13. 修改引數local_listener
alter system setlocal_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.114.13)(PORT=1524))))'sid='tan1';
alter system setlocal_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.114.14)(PORT=1524))))'sid='tan2';
14. 測試SQL> conn system/oracle@tanx
已連線。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/11297314/viewspace-2153817/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【RAC】Oracle rac 如何修改公網及vipOracle
- Oracle RAC修改public, VIP, SCAN IPOracle
- rac vip failback issueAI
- RAC的VIP切換測試
- 11g rac新增節點步驟(11g)
- 11G RAC+DG搭建
- rac 新增第二public ip 和 vip
- 11g rac監聽配置解析
- Oracle 11g RAC Silent Install For NFSOracleNFS
- RAC修改IP地址
- 【RAC】Oracle RAC如何修改心跳網路Oracle
- Oracle 11g RAC 監聽日常管理Oracle
- rhel7 安裝11g rac
- Oracle 11g RAC手動新增serviceOracle
- 11g rac 等待事件resmgr:cpu quantum事件
- rac新增節點步驟(11g)
- Oracle 11g RAC重新新增節點Oracle
- 11G RAC檢查各元件狀態元件
- Tuning CPU 100% in Oracle 11g rac-20220215Oracle
- 如何跟蹤11g vip及SCN IP的輸出
- Oracle 11g RAC SCAN ip的原理及配置Oracle
- Oracle 11g RAC到單例項OGG同步Oracle單例
- oracle 11g rac配置em dbconsole ORA-12514Oracle
- Oracle 12. 2 RAC public IP與vip 互換方法Oracle
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- Oracle 11G 修改scan_ipOracle
- Oracle 11g RAC自動打GI PSU補丁Oracle
- Oracle 11G RAC叢集安裝(2)——安裝gridOracle
- Oracle 11G RAC叢集安裝(3)——安裝OracleOracle
- rac新增節點容易遇到的問題(11g)
- oracle 11g RAC 安裝前準備指令碼Oracle指令碼
- 11g rac新增節點容易遇到的問題
- oracle 11G RAC的建立(VM虛擬環境)Oracle
- 【rac故障】root.sh報錯Unable to get VIP info for new node
- 【RAC】Oracle rac修改IP地址及埠號命令參考Oracle
- [20201106]11g修改表無需修改許可權.txt
- RAC 修改引數DB_FILES
- RAC環境修改spfile的位置