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修改public,private,vip scan IPOracle
- Oracle RAC中的Public IP, VIP和Internal IP,SCANOracle
- Oracle RAC修改Scan IP,Public IP的方法Oracle
- 11g RAC 修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
- RAC中的各種IP-PUBLIC-VIP-Private-SCAN IP
- oracle 11g rac 修改VIP、scan VIP、priv IP操作文件Oracle
- RAC_TNS故障轉移負載均衡、SCAN IP、VIP、PUBLIC IP負載
- RAC改VIP和SCAN IP
- Oracle RAC修改IP和VIP地址Oracle
- rac 手動漂移scan ip vip
- win rac public ip 修改
- Oracle 11g修改RAC SCAN IPOracle
- rac 新增第二public ip 和 vip
- RAC中修改IP, VIP
- RAC_網路_VIP漂移_SCAN IP
- Oracle 12. 2 RAC public IP與vip 互換方法Oracle
- Oracle RAC環境下vip/public/private IP的區別Oracle
- Oracle 11gR2 RAC修改SCAN IPOracle
- RAC 11.2.0.3 修改 Public IP
- oracle 10g rac modify public ip,private ip,vip實驗步驟Oracle 10g
- Oracle 11gR2 RAC修改SCAN IP地址Oracle
- How to modify Public ip and vip In 11gr2 Rac
- rac 改public 及vip IP---備份01
- 詭異的事情,RAC,public ip通,vip不通
- Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)Oracle
- 轉載一個step by step change public-ip and vip on RAC
- 【RAC】Oracle rac 如何修改公網及vipOracle
- 修改scan ip
- ORACLE10g修改RAC VIPOracle
- RAC重建SCAN IP
- RAC 增加SCAN IP
- SCAN , virtual IP , and public IP must all be on the same subnet
- RAC修改叢集兩個節點public ip地址
- 【RAC】如何修改SCAN IP的IP地址、名稱、埠等資訊
- Oracle 11G 修改scan_ipOracle
- Oracle RAC 修改 IP 地址Oracle
- RAC如何修改VIP
- oracle 11gR2 如何修改public ipOracle