在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改为eth2,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 eth2/172.13.20.0:public再查看可以看到PUBLIC网卡及IP都更改过来了:test1:/home/oracle>$oifcfg getif
eth1 10.0.100.0 global cluster_interconnect
eth2 172.13.20.0 global public
3、更改PRIVATE网卡或者IP:这一步和更改PUBLIC网卡大同小异,比如说我们需要将PRIVATE网卡从eth1改为eth3:test1:/home/oracle>$oifcfg delif -global eth1
test1:/home/oracle>$oifcfg setif -global eth3/10.1.0.0:cluster_interconnect
4、更改VIP配置:更改PUBLIC网卡后,那么RAC各个节点的VIP必须重新配置,以便CRS知道VIP对应PUBLIC网卡名称的变更:srvctl modify nodeapps -n test1 -A 172.13.20.1/255.255.255.0/eth2这样执行完以后,整个更改便完成了。