手机版
你好,游客 登录 注册
背景:
阅读新闻

一次将Oracle 11gR2 RAC网卡调整的思路记录

[日期:2012-12-27] 来源:Linux社区  作者:hnliuxz [字体:大 中 小]

三. 启动crs, 设置Oracle中ip地址相关的设置.

3.1 在两个节点启动crs, 并关闭随crs启动的应用程序
两个节点

[root@raw1 ~]# /etc/init.d/init.crs start
[root@raw2 ~]# /etc/init.d/init.crs start
由于oracle所有应用设置为自动启动, 所以在crs启动时会试图启动所有的服务,
但是在对oracle相关的ip地址进行设置时需要crs处于运行状态. 但是数据库,
asm和node application处于停止状态, 在一个节点执行以下命令:
  [root@raw1 bin]# ./srvctl stop database -d raw
[root@raw1 bin]# ./srvctl stop asm -n raw1
[root@raw1 bin]# ./srvctl stop asm -n raw2
[root@raw1 bin]# ./srvctl stop nodeapps -n raw1
[root@raw1 bin]# ./srvctl stop nodeapps -n raw2
[root@raw1 bin]# ./crs_stat -t
Name          Type          Target    State    Host
------------------------------------------------------------
ora.raw.db    application    OFFLINE  OFFLINE
ora.raw.dmm.cs application    OFFLINE  OFFLINE
ora....aw2.srv application    OFFLINE  OFFLINE
ora....w1.inst application    OFFLINE  OFFLINE
ora....w2.inst application    OFFLINE  OFFLINE
ora....SM1.asm application    OFFLINE  OFFLINE
ora....W1.lsnr application    OFFLINE  OFFLINE
ora.raw1.gsd  application    OFFLINE  OFFLINE
ora.raw1.ons  application    OFFLINE  OFFLINE
ora.raw1.vip  application    OFFLINE  OFFLINE
ora....SM2.asm application    OFFLINE  OFFLINE
ora....W2.lsnr application    OFFLINE  OFFLINE
ora.raw2.gsd  application    OFFLINE  OFFLINE
ora.raw2.ons  application    OFFLINE  OFFLINE
ora.raw2.vip  application    OFFLINE  OFFLINE

3.2 使用oifcfg修改网卡设置, oifconfig可以用来设置和查看网卡使用的方式.
-- 查看当前配置:
[root@raw1 bin]# ./oifcfg getif -global
eth0  10.85.10.0  global  public
eth1  192.168.1.0  global  cluster_interconnect
-- 删除当前配置
[root@raw1 bin]# ./oifcfg delif -global eth0
[root@raw1 bin]# ./oifcfg delif -global eth1
[root@raw1 bin]# ./oifcfg getif
-- 重新添加
[root@raw1 bin]# ./oifcfg setif -global eth0/10.85.10.0:public    --此处更换为对应的bond
[root@raw1 bin]# ./oifcfg setif -global eth1/192.168.1.0:cluster_interconnect  --此处更换为对应的bond
[root@raw1 bin]# ./oifcfg getif
eth0  10.85.10.0  global  public
eth1  192.168.1.0  global  cluster_interconnect
注意: 这里IP 地址最一个为0.  代表的是一个网段。 修改的时候要切记。 否在在启动OCR 时 会报错误
[root@racnode2 bin]# ./oifcfg iflist

3.3 修改VIP
[root@raw1 bin]# ./srvctl modify nodeapps -n raw1 -A 10.85.10.222/255.255.255.0/eth0
[root@raw1 bin]# ./srvctl modify nodeapps -n raw2 -A 10.85.10.223/255.255.255.0/eth0

3.4 设置listener.ora和tnsnames.ora, 检查这些文件中是否有指定原来ip的地方, 修改为更改后的ip地址。

3.5 启动node applications, asm, 数据库
[root@raw1 bin]# ./srvctl start nodeapps -n raw1
[root@raw1 bin]# ./srvctl start nodeapps -n raw2
[root@raw1 bin]# ./srvctl start asm -n raw1
[root@raw1 bin]# ./srvctl start asm -n raw2
[root@raw1 bin]# ./srvctl start instance -d raw -i raw1
[root@raw1 bin]# ./srvctl start instance -d raw -i raw2

3.6 确认IP, 修改完成。
[root@raw1 bin]# ifconfig

linux
相关资讯       Oracle 11gR2 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款