Oracle数据库修改双心跳IP

【摘要】

         某客户因搬迁机房,需要修改数据库集群的双心跳IP。当前环境为两块网卡,需要同时修改两块网卡为其他网段IP;心跳IP主要用于多个节点之间内存数据共享,互相检测各节点是否在线,一般要求与公共网络IP处于不同网段,带宽达到千兆。

【正文】

         文中出现的主机名和IP都来自测试环境。

         操作系统版本:red hat 7.4

         数据库版本:11.2.0.4

主机名

原心跳IP

新心跳IP

racnode2

192.168.2.154

192.168.2.165

192.168.1.154

192.168.1.165

racnode4

192.168.2.163

192.168.2.164

192.168.1.163

192.168.1.164

     准备过程:

  1. Root用户备份OCR

./ocrdump /tmp/ocr.bak

  1. Root用户备份gpnp profile.xml

节点一

cd /u01/app/11.2.0/grid/gpnp/racnode2/profiles/peer

cp profile.xml profile.xml.bak

节点二

cd /u01/app/11.2.0/grid/gpnp/racnode4/profiles/peer

cp profile.xml profile.xml.bak

  1. 备份数据库
  2. Grid用户备份asm spfile

Sqlplus / as sysasm

Create pfile=’/tmp/pfile.ora’ from spfile;

  1. 查看数据库实例及asm实例的cluster_interconnect,若有指定值,及时清空。

Show parameter cluster_interconnect

     修改过程

一、修改ens38网卡IP地址

  1. Root用户查看当前心跳IP配置

./oifcfg getif

 

  1. 删除ens38信息

                   ./oifcfg delif -global ens38/192.168.2.0

                    

  1. Down掉ens38网卡(双节点)

Ifconfig ens38 down

 

 

  1. 加入新的心跳网卡信息

./oifcfg setif -global ens38/192.168.1.0:cluster_interconnect

 

  1. 修改两节点ens38网卡配置文件

 

 

  1. Root用户停止集群软件

./crsctl stop cluster –all

 

  1. 启动两节点ens38网卡

ifconfig ens38 up

service network restart

 

 

  1. 修改hosts文件

vi /etc/hosts

 

 

  1. 启动集群软件

./crsctl start cluster -all

 

 

 

 

二、修改ens39网卡IP地址

  1. Root用户查看当前心跳IP配置

./oifcfg getif

 

  1. 删除ens39信息

                   ./oifcfg delif -global ens39/192.168.2.0

                    

  1. Down掉ens39网卡(双节点)

ifconfig ens39 down

 

 

  1. 加入新的心跳网卡信息

./oifcfg setif -global ens39/192.168.1.0:cluster_interconnect

 

  1. 修改两节点ens39网卡配置文件

 

 

  1. Root用户停止集群软件

./crsctl stop cluster –all

 

  1. 启动两节点ens39网卡

ifconfig ens39 up

service network restart

 

 

  1. 修改hosts文件

vi /etc/hosts

 

 

  1. 启动集群软件

./crsctl start cluster -all

 

 

 

 

【结论】

         修改前的准备工作一定要完整准确,避免小的失误导致大的故障。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值