Bo's Oracle Station

查看: 1948|回复: 0

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

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2022-4-12 09:49:55 | 显示全部楼层 |阅读模式
1. 转Flex  ASM的准备工作:
准备好一套基于GNS 的RAC集群(见该博客),首先确认ASM处于Flex模式吗?
  1. [grid@station11 ~]. oraenv
  2. ORACLE_SID = [+ASM] ? +ASM
  3. The Oracle base remains unchanged with value /u01/app/oracle
  4. [grid@station11 ~]$ asmcmd
  5. ASMCMD> showclustermode
  6. ASM cluster : Flex mode disabled
  7. ASMCMD> exit
复制代码
答案是ASM处于非Flex模式。之后运行asmca,在“ASM Instances”选项卡处,点击“Convert to Oracle Flex ASM”按钮。在弹出的窗口处填写“ASM Listener Port”为1522,并钩选下面这行:
  1. Interface Name                                Subnet   Interface                                       In Use
  2. *                                              172.31.118.0                           Yes-cluster_interconnect
复制代码
点“OK”按钮后,出现下面弹出式对话框:
1.png

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

上面的意思是要求你在当前节点,以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的帮助:
  1. [grid@station11 ~]$ sudo oifcfg

  2. Name:
  3.         oifcfg - Oracle Interface Configuration Tool.

  4. Usage:  oifcfg iflist [-p [-n]]
  5. 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.

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

  12.         <nodename> - name of the host, as known to a communications network
  13.         <if_name>  - name by which the interface is configured in the system
  14.         <subnet>   - subnet address of the interface
  15.         <if_type>  - one or more comma-separated interface types { cluster_interconnect | public | asm}
复制代码
2. 2. 获取当前网络的信息:
  1. [grid@station11 ~]$ sudo oifcfg getif
  2. eth0  192.168.0.0  global  public
  3. eth1  172.31.118.0  global  cluster_interconnect
  4. *  172.31.118.0  global  cluster_interconnect,asm
  5. PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system.
复制代码
PRIF-29的报警信息要处理
  1. [grid@station11 ~]$ sudo oifcfg delif  -global */172.31.118.0
复制代码
2.3. 把第二张内网网卡配置并使用用上:
  1. [grid@station11 ~]$ sudo oifcfg setif -global eth2/172.31.118.0:cluster_interconnect,asm
复制代码
2.4. 把eth1修改成带ASM互联的(这样心跳线和ASM互联都具有高可用性):
  1. [grid@station11 ~]$ sudo oifcfg setif -global eth1/172.31.118.0:cluster_interconnect,asm
  2. [grid@station11 ~]$ sudo oifcfg getif
  3. eth0  192.168.0.0  global  public
  4. eth1  172.31.118.0  global  cluster_interconnect,asm
  5. eth2  172.31.118.0  global  cluster_interconnect,asm
复制代码

3. 合并操作,同时转Flex  ASM和转Flex Cluster:
3.1 查看集群的模式:
  1. [grid@station11 ~]$ crsctl get cluster mode status
  2. Cluster is running in "standard" mode
复制代码
3.2 验证GNS然后转集群模式:
  1. [grid@station11 ~]$ sudo  srvctl config gns
  2. GNS is enabled.
  3. GNS VIP addresses: 192.168.0.162
  4. Domain served by GNS: example.com
复制代码
运行下面这个重要的转集群模式的命令:
  1. [grid@station11 ~]$ sudo  crsctl set cluster mode  flex
  2. CRS-4933: Cluster mode set to "flex"; restart Oracle High Availability Services on all nodes for cluster to run in "flex" mode.
复制代码
3.3 这时再运行
  1. /u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
复制代码
等待上述脚本执行完成,期间会重启整个集群,重启完成后整个集群就成功转成Flex ASM和Flex Cluster:
  1. [grid@station11 ~]. oraenv
  2. ORACLE_SID = [+ASM] ? +ASM
  3. The Oracle base remains unchanged with value /u01/app/oracle
  4. [grid@station11 ~]$ crsctl get cluster mode status
  5. Cluster is running in "flex" mode
  6. [grid@station11 ~]$ asmcmd
  7. ASMCMD> showclustermode
  8. ASM cluster : Flex mode enabled
复制代码
3.4 此时回头去点击最前面的窗口上的“Close”按钮:

3.png
回复

使用道具 举报

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

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-4 01:15 , Processed in 0.041189 second(s), 28 queries .

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