重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3326|回复: 0
打印 上一主题 下一主题

[原创] 11g rac 修改 ip 系列之九:更换私网网卡

[复制链接]
跳转到指定楼层
楼主
发表于 2018-8-23 10:09:20 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 2018-8-28 16:46 编辑

背景 :
        rac环境中,私网主要用于构成rac的节点之间的相互通讯,不与业务网路发生交互,一般是构成rac节点之间单独搭建一个小局域网,
但在实际的生产中,很多用户认为单独购买交换机组网,经济上不合算 ,直接在业务网的交换机上划分 wlan,这个也可以,由于是在交换机上划分
wlan,有时由于考虑不周,用户又想修改 私网的 子网,这个时候,怎么办呢 ?

环境:
        11g r2 rac
        两节点 rac
        os:rhel5.7

目标:
      私网 子网,由 192.168.133.0修改为 10.0.3.0
      具体的,
      就是 192.168.133.101,修改为10.0.3.101
              192.168.133.102, 修改为10.0.3.102

小提示 :
      私网如果不修改子网,只是修改 ip,是不用在集群上做操作的,但修改了子网,就必须使用 oifcfg修改到对应的子网。
      同时,11g r2 rac和 之前的版本不一样,需要在 集群服务开启的情况下,修改,修改完后,再去处理物理网络信息。

操作步骤:      
     1.确认当前集群服务正常
        [oracle@host01 ~]$ crsctl check crs
        CRS-4638: Oracle High Availability Services is online
        CRS-4537: Cluster Ready Services is online
        CRS-4529: Cluster Synchronization Services is online
        CRS-4533: Event Manager is online

    2.集群注册中,增加新的网络信息
        2.1 先获取目前的私网信息

        [oracle@host01 ]$ oifcfg getif -global -type cluster_interconnect
        eth1  192.168.133.0  global  cluster_interconnect

        2.2 增加新网卡信息

       [oracle@host01 ]$ oifcfg setif -global eth1/10.0.3.0:cluster_interconnect
  
       2.3 确认新子网信息已经增加
      [oracle@host01 peer]$ oifcfg getif -global -type cluster_interconnect        
      eth1  192.168.133.0  global  cluster_interconnect
      eth1  10.0.3.0  global  cluster_interconnect

    3.停止集群服务
       在所有节点停集群
     [root@host01 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs
     [root@host02 ~]# /u01/app/11.2.0/grid/bin/crsctl stop crs

    4.修改网络信息
       4.1 修改网卡信息
        修改一节点的 eth1 的物理网卡为 10.0.3.101
        修改 二节点的eth1 的物理网卡为 10.0.3.102

        修改完成后,如下 :
        [root@host01 ~]# ip a show eth1
        3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
        。。。
         inet 10.0.3.101/24 brd 10.0.3.255 scope global eth1
        。。。


        [root@host02 ~]# ip a show eth1
        3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast qlen 1000
        。。。
        inet 10.0.3.102/24 brd 10.0.3.255 scope global eth1

        。。。

      4.2 修改域名解析
           我们这里使用 /etc/hosts文件
          修改hosts文件为    新的 ip
           vim /etc/hosts
           。。。
           192.168.133.101 host01-priv.example.com host01-priv
           192.168.133.102 host02-priv.example.com host02-priv
           。。。
           
           修改为 :
           。。。
          10.0.3.101 host01-priv.example.com host01-priv
          10.0.3.102 host02-priv.example.com host02-priv
          。。。
   5. 启动crs
    在两个节点启动 crs
    [root@host01 ~]# /u01/app/11.2.0/grid/bin/crsctl start crs
    [root@host02 ~]# /u01/app/11.2.0/grid/bin/crsctl start crs

    --确认一下已经启动成功:
    [root@host01 ~]# /u01/app/11.2.0/grid/bin/crsctl check crs        
    CRS-4638: Oracle High Availability Services is online
    CRS-4537: Cluster Ready Services is online
    CRS-4529: Cluster Synchronization Services is online
    CRS-4533: Event Manager is online

   6. 使用 oifcfg 去掉 以前的网络信息
   6.1 查看当前信息
    [root@host01 ~]# /u01/app/11.2.0/grid/bin/oifcfg getif -type cluster_interconnect
    eth1  192.168.133.0  global  cluster_interconnect
    eth1  10.0.3.0  global  cluster_interconnect
   
   6.2 删除以前子网信息
    [root@host01 ~]# /u01/app/11.2.0/grid/bin/oifcfg delif -global eth1/192.168.133.0

   6.3 确认,只剩新的网络信息

   [root@host01 ~]# /u01/app/11.2.0/grid/bin/oifcfg getif -type cluster_interconnect
   eth1  10.0.3.0  global  cluster_interconnect

   7.验证一下集群

    [oracle@host01 ~]$ cluvfy comp crs -n host01,host02 -verbose
  Verifying CRS integrity
  Checking CRS integrity...
  Clusterware version consistency passed
  The Oracle Clusterware is healthy on node "host02"
  The Oracle Clusterware is healthy on node "host01"
  CRS integrity check passed
  Verification of CRS integrity was successful.  

  到此,私网调整子网的操作完成。


分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-20 13:42 , Processed in 0.110132 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表