|
1. 转Flex ASM的准备工作:
准备好一套基于GNS 的RAC集群(见该博客),首先确认ASM处于Flex模式吗?
- [grid@station11 ~]. oraenv
- ORACLE_SID = [+ASM] ? +ASM
- The Oracle base remains unchanged with value /u01/app/oracle
- [grid@station11 ~]$ 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的帮助:
- [grid@station11 ~]$ 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. 获取当前网络的信息:
- [grid@station11 ~]$ sudo oifcfg getif
- eth0 192.168.0.0 global public
- eth1 172.31.118.0 global cluster_interconnect
- * 172.31.118.0 global cluster_interconnect,asm
- PRIF-29: Warning: wildcard in network parameters can cause mismatch among GPnP profile, OCR, and system.
复制代码 PRIF-29的报警信息要处理:
- [grid@station11 ~]$ sudo oifcfg delif -global */172.31.118.0
复制代码 2.3. 把第二张内网网卡配置并使用用上:
- [grid@station11 ~]$ sudo oifcfg setif -global eth2/172.31.118.0:cluster_interconnect,asm
复制代码 2.4. 把eth1修改成带ASM互联的(这样心跳线和ASM互联都具有高可用性):
- [grid@station11 ~]$ sudo oifcfg setif -global eth1/172.31.118.0:cluster_interconnect,asm
- [grid@station11 ~]$ sudo oifcfg getif
- eth0 192.168.0.0 global public
- eth1 172.31.118.0 global cluster_interconnect,asm
- eth2 172.31.118.0 global cluster_interconnect,asm
复制代码
3. 合并操作,同时转Flex ASM和转Flex Cluster:
3.1 查看集群的模式:
- [grid@station11 ~]$ crsctl get cluster mode status
- Cluster is running in "standard" mode
复制代码 3.2 验证GNS然后转集群模式:
- [grid@station11 ~]$ sudo srvctl config gns
- GNS is enabled.
- GNS VIP addresses: 192.168.0.162
- Domain served by GNS: example.com
复制代码 运行下面这个重要的转集群模式的命令:
- [grid@station11 ~]$ sudo crsctl set cluster mode flex
- 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:
- [grid@station11 ~]. oraenv
- ORACLE_SID = [+ASM] ? +ASM
- The Oracle base remains unchanged with value /u01/app/oracle
- [grid@station11 ~]$ crsctl get cluster mode status
- Cluster is running in "flex" mode
- [grid@station11 ~]$ asmcmd
- ASMCMD> showclustermode
- ASM cluster : Flex mode enabled
复制代码 3.4 此时回头去点击最前面的窗口上的“Close”按钮:
|
|