修改10g RAC public or private or virtual IP [Oracle]

首先启动HACMP,smit clstart

#su - oracle

rac2-> oifcfg getif
en0  192.168.192.0  global  public
en1  10.10.10.0  global  cluster_interconnect

rac1-> oifcfg getif
en0  192.168.192.0  global  public
en1  10.10.10.0  global  cluster_interconnect
修改操作只需在一台主机上进行。

rac1-> oifcfg delif -global en1
rac1-> oifcfg getif
en0  192.168.192.0  global  public
rac1-> oifcfg setif -global en1/10.10.21.0:cluster_interconnect
rac1-> oifcfg getif
en0  192.168.192.0  global  public
en1  10.10.21.0  global  cluster_interconnect
在rac1上修改后,在rac2上查看ip地址,已经被修改过。

rac2-> oifcfg getif
en0  192.168.192.0  global  public
en1  10.10.21.0  global  cluster_interconnect
rac2->

 

1.确认OCR中的配置接口
[oracle@rac1 ~]$ oifcfg getif
eth0  192.168.163.0  global  public
eth1  10.10.10.0  global  cluster_interconnec

2.修改OCR中的public IP
[oracle@rac1 ~]$ oifcfg delif -global eth0
[oracle@rac1 ~]$ oifcfg setif -global eth0/192.168.11.0:public
[oracle@rac1 ~]$ oifcfg getif
eth0  192.168.11.0  global  public
eth1  10.10.10.0  global  cluster_interconnect

3.修改OCR中的private IP
[oracle@rac1 ~]$ oifcfg delif -global eth1
[oracle@rac1 ~]$ oifcfg setif -global eth1/10.10.21.0:cluster_interconnect
[oracle@rac1 ~]$ oifcfg getif
eth0  192.168.11.0  global  public
eth1  10.10.21.0  global  cluster_interconnect

4.修改各node的IP和/etc/hosts
rac1
192.168.11.11/255.255.255.0/192.168.11.10
10.10.21.11/255.255.255.0

rac2
192.168.11.12/255.255.255.0/192.168.11.10
10.10.21.12/255.255.255.0

192.168.11.11  rac1
192.168.11.12  rac2
10.10.21.11     rac1_priv
10.10.21.12     rac2_priv
192.168.11.31  rac1_vip
192.168.11.32  rac2_vip

5.修改listener.ora

6.启动CRS并检查
[root@rac1 ~]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.

[root@rac2 ~]# /etc/init.d/init.crs start
Startup will be queued to init within 90 seconds.

[oracle@rac1 ~]$ crsctl check boot

[oracle@rac1 ~]$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy


7.修改VIP IP
[oracle@rac1 ~]$ srvctl stop database -d racdb
注:从10.2.0.3开始 VIP与database or asm 没有依赖关系

[oracle@rac1 ~]$ srvctl stop nodeapps -n rac1
[oracle@rac1 ~]$ srvctl stop nodeapps -n rac2

[root@rac1 bin]# ./srvctl modify nodeapps -n rac1 -A 192.168.11.31/255.255.255.0/eth0
[root@rac1 bin]# ./srvctl modify nodeapps -n rac2 -A 192.168.11.32/255.255.255.0/eth0

8.启动相关资源
[oracle@rac1 ~]$ srvctl start nodeapps -n rac1
[oracle@rac1 ~]$ srvctl start nodeapps -n rac2
[oracle@rac1 ~]$ crs_start ora.racdb.db
Attempting to start `ora.racdb.db` on member `rac1`
Start of `ora.racdb.db` on member `rac1` succeeded.
[oracle@rac1 ~]$ crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora....C1.lsnr application    ONLINE    ONLINE    rac1       
ora.rac1.gsd   application    ONLINE    ONLINE    rac1       
ora.rac1.ons   application    ONLINE    ONLINE    rac1       
ora.rac1.vip   application    ONLINE    ONLINE    rac1       
ora....C2.lsnr application    ONLINE    ONLINE    rac2       
ora.rac2.gsd   application    ONLINE    ONLINE    rac2       
ora.rac2.ons   application    ONLINE    ONLINE    rac2       
ora.rac2.vip   application    ONLINE    ONLINE    rac2       
ora.racdb.db   application    ONLINE    ONLINE    rac1       
ora....b1.inst application    ONLINE    ONLINE    rac1       
ora....b2.inst application    ONLINE    ONLINE    rac2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

七七powerful

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值