oracle 10g rac modify public ip,private ip,vip實驗步驟
1 實驗目的
根據業務的需求,有時需要調整IP,以下為做實驗調整前後對應的IP表
調整前對應ip表
主機名 型別 IP 地址 網路卡埠
p595a2 public ip 1.4.128.88 en0
p595a2-vip vip 1.4.128.89 en0
p595a2-priv private ip 192.168.4.100 en3
p595b2 public ip 1.4.128.90 en0
p595b2-vip vip 1.4.128.91 en0
p595b2-priv private ip 192.168.4.101 en3
調整後對應ip表
主機名 型別 IP 地址 網路卡埠
p595a2 public ip 200.200.200.1 en0
p595a2-vi vip 200.200.200.2 en0
p595a2-priv private ip 192.168.5.100 en3
p595b2 public ip 200.200.200.3 en0
p595b2-vip vip 200.200.200.4 en0
p595b2-priv private ip 192.168.5.101 en3
2 實驗一修改public ip與private ip
2.1兩邊節點 停止資料庫,監聽,asm,gsd,vip,ons服務
oracle使用者
srvctl stop database -d fk -o immediate
srvctl stop asm -n p595a2
srvctl stop asm -n p595b2
srvctl stop nodeapps -n p595a2
srvctl stop nodeapps -n p595b2
root使用者
./crsctl stop crs
2.2 修改兩邊節點的/etc/hosts檔案
修改前先做個備份
cp /etc/hosts /etc/hosts.bak
修改後如下所示:
200.200.200.1 p595a2
200.200.200.2 p595a2-vip
192.168.5.100 p595a2-priv
200.200.200.3 p595b2
200.200.200.4 p595b2-vip
192.168.5.101 p595b2-priv
2.3 修改p595a節點上的public ip與private ip
2.3.1 用smitty命令修改物理ip
smitty tcpip
修改public ip
選擇en0
修改ip為 200.200.200.1,閘道器為200.200.200.254
修改private ip
選擇en3
修改ip為 192.168.5.100
注意檢查修改hosts檔案,因為改ip後,hosts檔案會增加記錄。
2.3.2 用oifcfg命令修改ip更新ocr盤
root使用者啟動crs
./crsctl start crs
oracle使用者
先檢視
oifcfg getif
en0 1.4.128.0 global public
en3 192.168.4.0 global cluster_interconnect
修改
oifcfg delif -global en0
oifcfg setif -global en0/200.200.200.0:public
oifcfg delif -global en3
oifcfg setif -global en3/192.168.5.0:cluster_interconnect
確認
oifcfg getif
en0 200.200.200.0 global public
en3 192.168.5.0 global cluster_interconnect
2.4 修改p595b節點上的public ip與private ip
2.4.1 用smitty命令修改物理ip
smitty tcpip
修改public ip
選擇en0
修改ip為 200.200.200.3,閘道器為200.200.200.254
修改private ip
選擇en3
修改ip為 192.168.5.101
注意檢查修改hosts檔案,因為改ip後,hosts檔案會增加記錄。
2.4.2 啟動crs
root使用者啟動crs
cd /crs/app/oracle/product/crs_1/bin
./crsctl start crs
2.4.3 用oifcfg命令檢查ocr盤中ip資訊
oracle使用者
oifcfg getif
en0 200.200.200.0 global public
en3 192.168.5.0 global cluster_interconnect
注意這邊不需要修改,只是確認。
2.5 修改listener.ora與tnsnames.ora檔案
cd $ORACLE_HOME/network/admin
涉及到有public ip的地方都要修改
2.6 驗證兩邊節點服務狀態是否正常
crs_stat –t
[oracle@p595a2:/oracle/app/oracle]$crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.fk.db application ONLINE ONLINE p595a2
ora....k1.inst application ONLINE ONLINE p595a2
ora....k2.inst application ONLINE ONLINE p595b2
ora....SM1.asm application ONLINE ONLINE p595a2
ora....A2.lsnr application ONLINE ONLINE p595a2
ora.p595a2.gsd application ONLINE ONLINE p595a2
ora.p595a2.ons application ONLINE ONLINE p595a2
ora.p595a2.vip application ONLINE ONLINE p595a2
ora....SM2.asm application ONLINE ONLINE p595b2
ora....B2.lsnr application ONLINE ONLINE p595b2
ora.p595b2.gsd application ONLINE ONLINE p595b2
ora.p595b2.ons application ONLINE ONLINE p595b2
ora.p595b2.vip application ONLINE ONLINE p595b2
3 實驗二修改vip
3.1 停止資料庫,監聽,asm,gsd,vip,ons服務
oracle使用者下執行以下命令
srvctl stop database -d fk -o immediate
srvctl stop asm -n p595a2
srvctl stop asm -n p595b2
srvctl stop nodeapps -n p595a2
srvctl stop nodeapps -n p595b2
3.2 用srvctl config nodeapps 檢查vip設定
oracle使用者
srvctl config nodeapps -n p595a2 -a
VIP exists.: /p595a2-vip/1.4.128.89/255.255.255.0/en0
srvctl config nodeapps -n p595b2 -a
VIP exists.: /p595a2-vip/1.4.128.91/255.255.255.0/en0
3.3 用srvctl modify nodeapps 修改vip地址
oracle使用者
srvctl modify nodeapps -n p595a2 -A 200.200.200.2/255.255.255.0/en0
srvctl modify nodeapps -n p595b2 -A 200.200.200.4/255.255.255.0/en0
確認
srvctl config nodeapps -n p595a2 -a
VIP exists.: /p595a2-vip/200.200.200.2/255.255.255.0/en0
srvctl config nodeapps -n p595b2 -a
VIP exists.: /p595a2-vip/200.200.200.4/255.255.255.0/en0
3.4 修改listener.ora與tnsnames.ora檔案
cd $ORACLE_HOME/network/admin
涉及到有vip的地方都要修改
3.5 啟動資料庫,監聽,asm,gsd,vip,ons服務
oracle使用者
srvctl start nodeapps -n p595a2
srvctl start nodeapps -n p595b2
srvctl start asm -n p595a2
srvctl start asm -n p595b2
srvctl start database -d fsyyk
3.6 驗證兩邊節點服務狀態是否正常
crs_stat –t
[oracle@p595a2:/oracle/app/oracle]$crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.fk.db application ONLINE ONLINE p595a2
ora....k1.inst application ONLINE ONLINE p595a2
ora....k2.inst application ONLINE ONLINE p595b2
ora....SM1.asm application ONLINE ONLINE p595a2
ora....A2.lsnr application ONLINE ONLINE p595a2
ora.p595a2.gsd application ONLINE ONLINE p595a2
ora.p595a2.ons application ONLINE ONLINE p595a2
ora.p595a2.vip application ONLINE ONLINE p595a2
ora....SM2.asm application ONLINE ONLINE p595b2
ora....B2.lsnr application ONLINE ONLINE p595b2
ora.p595b2.gsd application ONLINE ONLINE p595b2
ora.p595b2.ons application ONLINE ONLINE p595b2
ora.p595b2.vip application ONLINE ONLINE p595b2
4 實驗總結
1. 在修改public ip時注意修改對應的閘道器,如果不修改,有可能導致vip服務起不來。
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/7199859/viewspace-622079/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle RAC修改public,private,vip scan IPOracle
- How to modify Public ip and vip In 11gr2 Rac
- RAC中的各種IP-PUBLIC-VIP-Private-SCAN IP
- Oracle RAC環境下vip/public/private IP的區別Oracle
- Oracle 11.2 RAC改 Private IP步驟Oracle
- Oracle RAC修改public, VIP, SCAN IPOracle
- Oracle RAC中的Public IP, VIP和Internal IP,SCANOracle
- rac 新增第二public ip 和 vip
- rac更改public and private的網路卡和ip
- Oracle 12. 2 RAC public IP與vip 互換方法Oracle
- 11g RAC 修改PUBLIC-IP、VIP、PRIV-IP、SCAN-IP
- rac 改public 及vip IP---備份01
- 詭異的事情,RAC,public ip通,vip不通
- Oracle RAC修改Scan IP,Public IP的方法Oracle
- Oracle 11.2 RAC改IP步驟Oracle
- RAC_TNS故障轉移負載均衡、SCAN IP、VIP、PUBLIC IP負載
- Oracle RAC修改IP和VIP地址Oracle
- 轉載一個step by step change public-ip and vip on RAC
- 【RAC】如何修改 private ip
- win rac public ip 修改
- oracle 10g rac hacmp 遷移到asm實驗步驟Oracle 10gACMASM
- Public Private VIP的區別
- RAC中修改IP, VIP
- RAC 11.2.0.3 修改 Public IP
- Oracle 12.2 RAC修改public ip address或public ip(subnet (netmask) or interface)Oracle
- RAC改VIP和SCAN IP
- oracle 10g rac em重建實施步驟Oracle 10g
- vip/public ip斷網,導致instance crash
- rac 手動漂移scan ip vip
- oracle 11g rac 修改VIP、scan VIP、priv IP操作文件Oracle
- 手動進行oracle rac vip 漂移的步驟 。Oracle
- RAC_網路_VIP漂移_SCAN IP
- ping rac private ip地址不通處理
- Metlink:How to Modify Public Network Information including VIP in CrsORM
- Configuring Solaris IP Multipathing (IPMP) for the Oracle 10g VIPOracle 10g
- How to Change IP and VIP in Oracle Clusterware(二)-實操篇Oracle
- 更改VIP、IP
- 10G RAC 的虛擬IP