Oracle RAC修改public, VIP, SCAN IP
1. grid停止資料庫, 停止叢集
srvctl stop database -d orcl -o immediate
srvctl stop listener
2. root停止CRS, 幾個節點都應執行
crsctl stop crsctl
3. 修改/etc/hosts檔案(原檔案應進行備份)
4. 修改public網路卡的IP
/etc/sysconfig/network-scripts/ifcfg-eth0
5. 啟動CRS
[root@dbhost01 ~]# crsctl start crs
[root@dbhost02 ~]# crsctl start crs
6. 修改public ip地址
--檢視當前設定
[root@dbhost01 ~]# oifcfg getif
eth1 10.0.0.0 global cluster_interconnect
eth0 192.168.2.0 global public
oifcfg delif -global eth0
oifcfg setif -global eth0/192.168.31.0:public
[root@dbhost01 ~]# oifcfg delif -global eth0
[root@dbhost01 ~]# oifcfg setif -global eth0/192.168.31.0:public
檢視修改後的設定:
[root@dbhost01 ~]# oifcfg getif
eth1 10.0.0.0 global cluster_interconnect
eth0 192.168.31.0 global public
7. 修改VIP
需要停止資料庫、監聽和VIP,如果按照之前操作,目前資料庫和監聽已經是停止狀態。
[root@dbhost01 ~]# srvctl stop vip -n dbhost01
PRCC-1017 : 192.168.2.22 was already stopped on dbhost01
PRCR-1005 : Resource ora.dbhost01.vip is already stopped
[root@dbhost01 ~]# srvctl stop vip -n dbhost02
[root@dbhost01 ~]# srvctl modify nodeapps -n dbhost01 -A 192.168.31.22/255.255.255.0/eth0
[root@dbhost01 ~]# srvctl modify nodeapps -n dbhost02 -A 192.168.31.23/255.255.255.0/eth0
再次驗證VIP修改完成:
[grid@dbhost01 ~]$ srvctl config vip -n dbhost02
VIP exists: /192.168.31.23/192.168.31.23/192.168.31.0/255.255.255.0/eth0, hosting node dbhost02
[grid@dbhost01 ~]$ srvctl config vip -n dbhost01
VIP exists: /192.168.31.22/192.168.31.22/192.168.31.0/255.255.255.0/eth0, hosting node dbhost01
啟動VIP:
[grid@dbhost01 ~]$ srvctl start vip -n dbhost01
PRKO-2420 : VIP is already started on node(s): dbhost01
[grid@dbhost01 ~]$ srvctl start vip -n dbhost02
[grid@dbhost01 ~]$
[grid@dbhost01 ~]$
[grid@dbhost01 ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:30:2D:6D
inet addr:192.168.31.20 Bcast:192.168.31.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe30:2d6d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1044912 errors:0 dropped:0 overruns:0 frame:0
TX packets:3783536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:241469598 (230.2 MiB) TX bytes:5248362651 (4.8 GiB)
eth0:1 Link encap:Ethernet HWaddr 08:00:27:30:2D:6D
inet addr:192.168.31.22 Bcast:192.168.31.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
啟動監聽, 資料庫
[grid@dbhost01 ~]$ srvctl start listener
[grid@dbhost01 ~]$ srvctl start database -d orcl
8. 修改SCAN IP
檢視scan IP設定:
[grid@dbhost02 ~]$ srvctl config scan
SCAN name: 192.168.2.24, Network: 1/192.168.31.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.2.24/192.168.2.24
停止scan listener
[grid@dbhost02 ~]$ srvctl stop scan_listener
[grid@dbhost02 ~]$ srvctl stop scan
[grid@dbhost02 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
[grid@dbhost02 ~]$ srvctl stop scan
PRCC-1016 : scan1 was already stopped
PRCR-1005 : Resource ora.scan1.vip is already stopped
[grid@dbhost02 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
使用root使用者修改scan IP:
[root@dbhost02 ~]# srvctl modify scan -n orcl-cluster-scan
[root@dbhost02 ~]# srvctl modify scan_listener -u
[root@dbhost02 ~]# srvctl start scan_listener
[root@dbhost02 ~]# srvctl config scan
SCAN name: orcl-cluster-scan, Network: 1/192.168.31.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /orcl-cluster-scan/192.168.31.24
確認叢集所有資源正常:
[root@dbhost02 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.BACKUP.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.DATA.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.FRA.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.LISTENER.lsnr
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.VOTE.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.asm
ONLINE ONLINE dbhost01 Started
ONLINE ONLINE dbhost02 Started
ora.gsd
OFFLINE OFFLINE dbhost01
OFFLINE OFFLINE dbhost02
ora.net1.network
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.ons
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.registry.acfs
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE dbhost02
ora.cvu
1 ONLINE ONLINE dbhost01
ora.dbhost01.vip
1 ONLINE ONLINE dbhost01
ora.dbhost02.vip
1 ONLINE ONLINE dbhost02
ora.oc4j
1 ONLINE ONLINE dbhost02
ora.orcl.db
1 ONLINE ONLINE dbhost01 Open
2 ONLINE ONLINE dbhost02 Open
ora.scan1.vip
1 ONLINE ONLINE dbhost02
srvctl stop database -d orcl -o immediate
srvctl stop listener
2. root停止CRS, 幾個節點都應執行
crsctl stop crsctl
3. 修改/etc/hosts檔案(原檔案應進行備份)
4. 修改public網路卡的IP
/etc/sysconfig/network-scripts/ifcfg-eth0
5. 啟動CRS
[root@dbhost01 ~]# crsctl start crs
[root@dbhost02 ~]# crsctl start crs
6. 修改public ip地址
--檢視當前設定
[root@dbhost01 ~]# oifcfg getif
eth1 10.0.0.0 global cluster_interconnect
eth0 192.168.2.0 global public
oifcfg delif -global eth0
oifcfg setif -global eth0/192.168.31.0:public
[root@dbhost01 ~]# oifcfg delif -global eth0
[root@dbhost01 ~]# oifcfg setif -global eth0/192.168.31.0:public
檢視修改後的設定:
[root@dbhost01 ~]# oifcfg getif
eth1 10.0.0.0 global cluster_interconnect
eth0 192.168.31.0 global public
7. 修改VIP
需要停止資料庫、監聽和VIP,如果按照之前操作,目前資料庫和監聽已經是停止狀態。
[root@dbhost01 ~]# srvctl stop vip -n dbhost01
PRCC-1017 : 192.168.2.22 was already stopped on dbhost01
PRCR-1005 : Resource ora.dbhost01.vip is already stopped
[root@dbhost01 ~]# srvctl stop vip -n dbhost02
[root@dbhost01 ~]# srvctl modify nodeapps -n dbhost01 -A 192.168.31.22/255.255.255.0/eth0
[root@dbhost01 ~]# srvctl modify nodeapps -n dbhost02 -A 192.168.31.23/255.255.255.0/eth0
再次驗證VIP修改完成:
[grid@dbhost01 ~]$ srvctl config vip -n dbhost02
VIP exists: /192.168.31.23/192.168.31.23/192.168.31.0/255.255.255.0/eth0, hosting node dbhost02
[grid@dbhost01 ~]$ srvctl config vip -n dbhost01
VIP exists: /192.168.31.22/192.168.31.22/192.168.31.0/255.255.255.0/eth0, hosting node dbhost01
啟動VIP:
[grid@dbhost01 ~]$ srvctl start vip -n dbhost01
PRKO-2420 : VIP is already started on node(s): dbhost01
[grid@dbhost01 ~]$ srvctl start vip -n dbhost02
[grid@dbhost01 ~]$
[grid@dbhost01 ~]$
[grid@dbhost01 ~]$ ifconfig
eth0 Link encap:Ethernet HWaddr 08:00:27:30:2D:6D
inet addr:192.168.31.20 Bcast:192.168.31.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe30:2d6d/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1044912 errors:0 dropped:0 overruns:0 frame:0
TX packets:3783536 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:241469598 (230.2 MiB) TX bytes:5248362651 (4.8 GiB)
eth0:1 Link encap:Ethernet HWaddr 08:00:27:30:2D:6D
inet addr:192.168.31.22 Bcast:192.168.31.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
啟動監聽, 資料庫
[grid@dbhost01 ~]$ srvctl start listener
[grid@dbhost01 ~]$ srvctl start database -d orcl
8. 修改SCAN IP
檢視scan IP設定:
[grid@dbhost02 ~]$ srvctl config scan
SCAN name: 192.168.2.24, Network: 1/192.168.31.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /192.168.2.24/192.168.2.24
停止scan listener
[grid@dbhost02 ~]$ srvctl stop scan_listener
[grid@dbhost02 ~]$ srvctl stop scan
[grid@dbhost02 ~]$ srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
[grid@dbhost02 ~]$ srvctl stop scan
PRCC-1016 : scan1 was already stopped
PRCR-1005 : Resource ora.scan1.vip is already stopped
[grid@dbhost02 ~]$ srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
使用root使用者修改scan IP:
[root@dbhost02 ~]# srvctl modify scan -n orcl-cluster-scan
[root@dbhost02 ~]# srvctl modify scan_listener -u
[root@dbhost02 ~]# srvctl start scan_listener
[root@dbhost02 ~]# srvctl config scan
SCAN name: orcl-cluster-scan, Network: 1/192.168.31.0/255.255.255.0/eth0
SCAN VIP name: scan1, IP: /orcl-cluster-scan/192.168.31.24
確認叢集所有資源正常:
[root@dbhost02 ~]# crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.BACKUP.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.DATA.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.FRA.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.LISTENER.lsnr
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.VOTE.dg
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.asm
ONLINE ONLINE dbhost01 Started
ONLINE ONLINE dbhost02 Started
ora.gsd
OFFLINE OFFLINE dbhost01
OFFLINE OFFLINE dbhost02
ora.net1.network
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.ons
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
ora.registry.acfs
ONLINE ONLINE dbhost01
ONLINE ONLINE dbhost02
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE dbhost02
ora.cvu
1 ONLINE ONLINE dbhost01
ora.dbhost01.vip
1 ONLINE ONLINE dbhost01
ora.dbhost02.vip
1 ONLINE ONLINE dbhost02
ora.oc4j
1 ONLINE ONLINE dbhost02
ora.orcl.db
1 ONLINE ONLINE dbhost01 Open
2 ONLINE ONLINE dbhost02 Open
ora.scan1.vip
1 ONLINE ONLINE dbhost02
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8520577/viewspace-2156512/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC修改Scan IP,Public IP的方法Oracle
- 11g RAC 修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
- Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)Oracle
- Oracle 12. 2 RAC public IP與vip 互換方法Oracle
- rac 新增第二public ip 和 vip
- 【RAC】Oracle rac 如何修改公網及vipOracle
- RAC 增加SCAN IP
- Oracle 11G 修改scan_ipOracle
- 【RAC】如何修改SCAN IP的IP地址、名稱、埠等資訊
- Oracle 11g RAC SCAN ip的原理及配置Oracle
- Oracle 11gr2修改RAC叢集的scan ip,並處理ORA-12514問題Oracle
- 【RAC】Oracle rac修改IP地址及埠號命令參考Oracle
- RAC修改IP地址
- oracle rac scan監聽更改埠號Oracle
- 【RAC】Oracle RAC如何修改心跳網路Oracle
- oracle rac的scan監聽狀態Not All Endpoints RegisteredOracle
- rac vip failback issueAI
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- 新增SCAN IP
- Oracle 12C ORA-12545 While Connecting to RAC through SCAN NameOracleWhile
- Oracle RAC修改引數檔案位置Oracle
- Oracle Rac 修改SGA_TARGET值無變化Oracle
- RAC的VIP切換測試
- Oracle RAC修改網路配置知識點彙總Oracle
- oracle RACOracle
- scan ip的手動切換
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- 【DB寶44】Oracle rac叢集中的IP型別簡介Oracle型別
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- Oracle RAC CacheFusion 系列十五:Oracle RAC CRServer Part TwoOracleServer
- parameter hj8828vip installed Oracle h518vip onOracleH5
- ORACLE RAC clusterwareOracle
- 修改 Laravel 的預設 public 路徑Laravel
- Oracle RAC Cache Fusion系列十八:Oracle RAC Statisticsand Wait EventsOracleAI
- 【ASK_ORACLE】Oracle 12.2 Bug導致網路卡出現故障後RAC庫未向TCP註冊本地VIP監聽OracleTCP
- RAC架構中public網路卡down後發生什麼和RAC如何自愈?架構
- Oracle rac使用nid和dbms_backup_restore包修改dbid和dbnameOracleREST
- Oracle RAC Cache Fusion 系列十四:Oracle RAC CR Server Part OneOracleServer