zoukankan      html  css  js  c++  java
  • ORACLE 11204 RAC 修改私有ip

    1、备份OCR和GPNP profile文件

    在修改RAC的IP地址之前,我们需要先备份一下OCR文件,因为IP地址信息是记录在OCR中的,同时还要注意一点,从Oracle 11.2.0.2之后,private network的配置除了记录在OCR中之外,还会记录在GPNP profile里。如果private network不可用或者配置不正确,就会导致CRSD进程不能启动。

    因此在操作之前,必须先手工备份GPNP profile和OCR:

    用grid用户执行:

    节点1,节点2都要执行

    shdb1:~ # su - grid 

    grid@shdb1:~> cd $ORACLE_HOME/gpnp/shdb1/profiles/peer/ 

    grid@shdb1:/opt/app/oracrs/grid/gpnp/shdb1/profiles/peer> cp -p profile.xml profile.xml.bak

    root用户,cd 到 $GRID_HOME/bin
    shdb1:~ # cd /opt/app/oracrs/grid/bin
    shdb1: # ./ocrconfig -manualbackup
    shdb1 2020/11/18 15:28:18 /opt/app/oracrs/grid/cdata/shdb-cluster/backup_20201118_152818.ocr
    shdb1:/opt/app/oracrs/grid/bin #

    查看OCR的手工备份

    节点1执行即可:

    shdb1:/opt/app/oracrs/grid/bin # ./ocrconfig -showbackup manual

    shdb1 2020/11/18 15:28:18 /opt/app/oracrs/grid/cdata/shdb-cluster/backup_20201118_152818.ocr

    如果操作出现问题,那么就可以通过OCR备份进行恢复了。

    shdb1:~ # oifcfg getif
    eth0 192.168.7.0 global cluster_interconnect
    eth1 10.10.10.0 global public

    在数据库中通过gv$cluster_interconnects视图可以显示haip的信息

    SQL> select * from gv$cluster_interconnects;

    INST_ID NAME IP_ADDRESS IS_ SOURCE
    ---------- --------------- ---------------- --- -------------------------------
    2 eth0:1 169.254.89.64 NO
    1 eth0:1 169.254.131.157 NO

    SQL>


    shdb1:~ # oifcfg getif
    eth0 192.168.7.0 global cluster_interconnect
    eth1 10.10.10.0 global public
    shdb1:~ #

    shdb1:~ # oifcfg setif -global eth2/192.168.8.0:cluster_interconnect

    shdb2:~ # oifcfg setif -global eth2/192.168.8.0:cluster_interconnect


    shdb1:~ # oifcfg getif
    eth0 192.168.7.0 global cluster_interconnect
    eth1 10.10.10.0 global public
    eth2 192.168.8.0 global cluster_interconnect

    然后分别重启三个节点的集群服务,HAIP会自动生效:
    关闭CRS服务(所有节点都要执行):
    参考命令:
    #crsctl stop crs
    crsctl start crs

    SQL> select * from gv$cluster_interconnects;

    INST_ID NAME IP_ADDRESS IS_ SOURCE
    ---------- --------------- ---------------- --- -------------------------------
    1 eth0:1 169.254.43.235 NO
    1 eth2:1 169.254.224.117 NO
    2 eth0:1 169.254.61.253 NO
    2 eth2:1 169.254.207.146 NO

    SQL>

    参考:https://www.cnblogs.com/hmwh/p/8855956.html

    HAIP: https://www.cnblogs.com/andy6/p/7519197.html

  • 相关阅读:
    centos,ubuntu下安装zabbix遇到的问题
    代理环境下使用 ADDAPTREPOSITORY 添加 PPA 软件源
    Linux文件系统挂载管理
    Log4j配置详解
    myeclipse快捷键
    Linux用户基础(用户和组)
    C语言I博客作业07
    C语言I博客作业02
    C语言I博客作业08
    C语言I博客作业04
  • 原文地址:https://www.cnblogs.com/connected/p/14001363.html
Copyright © 2011-2022 走看看