oracle gi 禁用 haip

os: centos 7.6
db: oracle 19.3

安装 gi 时 会创建 169.254.x.x 的 haip,云环境下无法 ping 通另一个节点的169.254.x.x,所以要禁用 haip.

最简单的方法是在运行 root.sh 前,设置个变量

# export HAIP_UNSUPPORTED=YES

常规设置

# su - grid
$ oifcfg getif
eth0  10.0.7.0  global  public
eth1  192.168.0.0  global  cluster_interconnect,asm

$ oifcfg iflist -p -n
eth0  10.0.7.0  PRIVATE  255.255.255.0
eth1  192.168.0.0  PRIVATE  255.255.255.0
eth1  169.254.0.0  UNKNOWN  255.255.224.0

$ crsctl stat res ora.cluster_interconnect.haip -init
NAME=ora.cluster_interconnect.haip
TYPE=ora.haip.type
TARGET=ONLINE
STATE=ONLINE on nodea2


$ ifconfig

eth1: flags=4163  mtu 1500
        inet 192.168.0.100  netmask 255.255.255.0  broadcast 192.168.0.255
        ether 00:16:3e:10:01:d6  txqueuelen 1000  (Ethernet)
        RX packets 347555  bytes 129913887 (123.8 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 340345  bytes 120462047 (114.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eth1:1: flags=4163  mtu 1500
        inet 169.254.16.248  netmask 255.255.224.0  broadcast 169.254.31.255
        ether 00:16:3e:10:01:d6  txqueuelen 1000  (Ethernet)
		
# su - oracle
$ sqlplus / as sysdba;

SQL> set lines 200;
SQL> set pages 200;
SQL> select * from gv$cluster_interconnects;

   INST_ID NAME 	   IP_ADDRESS					  IS_ SOURCE				  CON_ID
---------- --------------- ---------------------------------------------- --- ------------------------------- ----------
	 2 eth1:1	   169.254.16.248				  NO					       0

出现 169.254.x.x 都是使用了 haip

It’s NOT supported to disable or stop HAIP while the cluster is up and running unless otherwise advised by Oracle Support/Development.

先查看备份一下

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl stat res ora.asm -init -p | grep DEPENDENCIES

START_DEPENDENCIES=hard(ora.cssd,ora.cluster_interconnect.haip,ora.ctssd)pullup(ora.cssd,ora.cluster_interconnect.haip,ora.ctssd)weak(ora.drivers.acfs)
STOP_DEPENDENCIES=hard(intermediate:ora.cssd,shutdown:ora.cluster_interconnect.haip)


# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl stat res ora.asm -p | grep DEPENDENCIES

START_DEPENDENCIES=hard(type:ora.asm_listener.type) weak(ora.ASMNET1LSNR_ASM.lsnr) pullup(type:ora.asm_listener.type)
START_DEPENDENCIES_RTE_INTERNAL=ora.ASMNET1LSNR_ASM.lsnr
START_DEPENDENCIES_TEMPLATE=hard(type:ora.asm_listener.type,{hardasmlsnr}) pullup(type:ora.asm_listener.type,{hardasmlsnr}) weak({weakasmlsnr})
STOP_DEPENDENCIES=hard(type:ora.asm_listener.type)
STOP_DEPENDENCIES_RTE_INTERNAL=
STOP_DEPENDENCIES_TEMPLATE=hard(type:ora.asm_listener.type,intermediate:{hardasmlsnr})

1 所有节点上关闭集群

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl stop crs -f

2 选取其中某个节点执行

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl start crs -excl -nocrs

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl stop res ora.asm -init

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl modify res ora.cluster_interconnect.haip -attr "ENABLED=0" -init

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl modify res ora.asm -attr "START_DEPENDENCIES='hard(ora.cssd,ora.ctssd)pullup(ora.cssd,ora.ctssd)weak(ora.ASMNET1LSNR_ASM.lsnr)',STOP_DEPENDENCIES='hard(intermediate:ora.cssd)'" -init

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl stop crs

3 剩余节点重复步骤2

4 启动集群

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl start crs

查看集群

# /u01/app/grid/product/19.0.0/grid_1/bin/crsctl stat res -t -init

设置 asm 实例的 cluster_interconnects,后面使用 dbca时同样也要设置.

SQL> alter system set cluster_interconnects = '10.0.6.23' scope=spfile sid='+ASM1' ;
alter system set cluster_interconnects = '10.0.6.21' scope=spfile sid='+ASM2' ;

参考:
<>
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4pgqkc68x_4&_afrLoop=449031827809403#aref_section218

<>
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4pgqkc68x_4&_afrLoop=447097281853401

<>
https://support.oracle.com/epmos/faces/SearchDocDisplay?_adf.ctrl-state=4pgqkc68x_4&_afrLoop=447097281853401

你可能感兴趣的:(#,oracle,dbf,asm,gi,rac)