botang 发表于 2022-4-12 09:49:55

Oracle RAC集群从非Flex向Flex转变的配置注意事项

1. 转FlexASM的准备工作:
准备好一套基于GNS 的RAC集群(见该博客),首先确认ASM处于Flex模式吗?
. oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
$ asmcmd
ASMCMD> showclustermode
ASM cluster : Flex mode disabled
ASMCMD> exit
答案是ASM处于非Flex模式。之后运行asmca,在“ASM Instances”选项卡处,点击“Convert to Oracle Flex ASM”按钮。在弹出的窗口处填写“ASM Listener Port”为1522,并钩选下面这行:
Interface Name                              Subnet   Interface                                       In Use
*                                              172.31.118.0                           Yes-cluster_interconnect点“OK”按钮后,出现下面弹出式对话框:

再点上面的“Yes”按钮,出现下面弹出式对话框:

上面的意思是要求你在当前节点,以root身份去执行/u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh,但是由于第二张内网网卡(用于Flex ASM,原次安装时由于选择非Flex ASM,所以不用)172.31.118.200+x(x取值范围1到39)设置网卡的oifcfg还没有配置,所以先不要去执行/u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh!


2. 配置ASM内网网卡:
2.1. 获取oifcfg的帮助:
$ sudo oifcfg

Name:
      oifcfg - Oracle Interface Configuration Tool.

Usage:oifcfg iflist [-p [-n]]
Shows the available interfaces that you can configure with 'setif' by querying the operating system to find which network interfaces are present on this node.

      where -p displays a heuristic assumption of the interface type (PRIVATE, PUBLIC, or UNKNOWN).
      -n displays the netmask.
      oifcfg setif {-node <nodename> | -global} {<if_name>/<subnet>:<if_type>[,<if_type>...]}[,...]
      oifcfg getif [-node <nodename> | -global] [ -if <if_name>[/<subnet>] [-type <if_type>] ]
      oifcfg delif {{-node <nodename> | -global} [<if_name>[/<subnet>]] [-force] | -force}
      oifcfg [-help]

      <nodename> - name of the host, as known to a communications network
      <if_name>- name by which the interface is configured in the system
      <subnet>   - subnet address of the interface
      <if_type>- one or more comma-separated interface types { cluster_interconnect | public | asm}
2. 2. 获取当前网络的信息:
$ sudo oifcfg getif
eth0192.168.0.0globalpublic
eth1172.31.118.0globalcluster_interconnect
*172.31.118.0globalcluster_interconnect,asm
PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system.
PRIF-29的报警信息要处理:
$ sudo oifcfg delif-global */172.31.118.02.3. 把第二张内网网卡配置并使用用上:
$ sudo oifcfg setif -global eth2/172.31.118.0:cluster_interconnect,asm2.4. 把eth1修改成带ASM互联的(这样心跳线和ASM互联都具有高可用性):
$ sudo oifcfg setif -global eth1/172.31.118.0:cluster_interconnect,asm
$ sudo oifcfg getif
eth0192.168.0.0globalpublic
eth1172.31.118.0globalcluster_interconnect,asm
eth2172.31.118.0globalcluster_interconnect,asm

3. 合并操作,同时转FlexASM和转Flex Cluster:
3.1 查看集群的模式:
$ crsctl get cluster mode status
Cluster is running in "standard" mode
3.2 验证GNS然后转集群模式:
$ sudosrvctl config gns
GNS is enabled.
GNS VIP addresses: 192.168.0.162
Domain served by GNS: example.com
运行下面这个重要的转集群模式的命令:
$ sudocrsctl set cluster modeflex
CRS-4933: Cluster mode set to "flex"; restart Oracle High Availability Services on all nodes for cluster to run in "flex" mode.
3.3 这时再运行:
/u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
等待上述脚本执行完成,期间会重启整个集群,重启完成后整个集群就成功转成Flex ASM和Flex Cluster:
. oraenv
ORACLE_SID = [+ASM] ? +ASM
The Oracle base remains unchanged with value /u01/app/oracle
$ crsctl get cluster mode status
Cluster is running in "flex" mode
$ asmcmd
ASMCMD> showclustermode
ASM cluster : Flex mode enabled
3.4 此时回头去点击最前面的窗口上的“Close”按钮:
https://botangdb.com/forum.php?mod=image&aid=1839&size=300x300&key=315e5be89aa71837&nocache=yes&type=fixnone
页: [1]
查看完整版本: Oracle RAC集群从非Flex向Flex转变的配置注意事项