rac更改public and private的網路卡和ip

wisdomone1發表於2009-11-24
在RAC環境中,有時候由於需要會更改網路卡或IP地址,這邊簡單記錄一下操作步驟(參考metalink文件:283684.1)。
1、檢視當前PUBLIC網路卡和PRIVATE網路卡的配置:
test1:/home/oracle>$oifcfg getif
eth1 10.0.100.0 global cluster_interconnect
eth0 172.19.20.0 global public
2、更改PUBLIC網路卡或者IP:
比如我們需要將PUBLIC網路卡從eth0改為bond0,IP地址由172.19.20.0 改為172.13.20.0
。那麼首先必須用oifcfg delif 命令刪除原先的PUBLIC網路卡設定,然後再用oifcfg setif
命令更改網路卡及IP配置,這步只要在任意一個節點執行就可以了。(注意:在更改PUBLIC或者PRIVATE網路卡及IP之前都需要將RAC中的資源停
止,可以使用crs_stop -all來停止)
test1:/home/oracle>$oifcfg delif -global eth0
test1:/home/oracle>$oifcfg setif -global bond0/172.13.20.0:public
再檢視可以看到PUBLIC網路卡及IP都更改過來了:
test1:/home/oracle>$oifcfg getif
eth1 10.0.100.0 global cluster_interconnect
bond0 172.13.20.0 global public
3、更改PRIVATE網路卡或者IP:
這一步和更改PUBLIC網路卡大同小異,比如說我們需要將PRIVATE網路卡從eth1改為ib1:
test1:/home/oracle>$oifcfg delif -global eth1
test1:/home/oracle>$oifcfg setif -global ib1/10.1.0.0:cluster_interconnect
4、更改VIP配置:
更改PUBLIC網路卡後,那麼RAC各個節點的VIP必須重新配置,以便CRS知道VIP對應PUBLIC網路卡名稱的變更(注意:更改VIP的配置必須以root使用者來更改):
test1:/home/oracle>$srvctl modify nodeapps -n test1 -A 172.13.20.1/255.255.255.0/bond0
這樣執行完以後,整個更改便完成了。

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-620373/,如需轉載,請註明出處,否則將追究法律責任。

相關文章