合 Oracle将Standard标准集群修改为Flex集群
Tags: Oracle
- 1. Run the following command to determine the current mode of the cluster:
- 2. Run the following command to ensure that the Grid Naming Service (GNS) is configured with a fixed VIP:
- 3. Use the Oracle Automatic Storage Management Configuration Assistant (ASMCA) to enable Oracle Flex ASM in the cluster before you change the cluster mode.
- 4. Run the following command as root to change the mode of the cluster to be an Oracle Flex Cluster:
- 5. Stop Oracle Clusterware by running the following command as root on each node in the cluster:
- 6. Start Oracle Clusterware by running the following command as root on each node in the cluster:
Oracle12C支持两种集群模式:Standard和Flex。
11G即是Standard的;Flex是12C的新特性。
当将Standard修改为Flex时,出现如下问题:
1 2 | # crsctl set cluster mode flex CRS-4937: Unable to set the cluster mode. |
查看 ,发现需要配置GNS,Standard模式下不需要GNS,但是Flex模式是需要的。
下面是官方文档(加入翻译)。
1. Run the following command to determine the current mode of the cluster:
确认当前集群模式:
1 | $ crsctl get cluster mode status |
2. Run the following command to ensure that the Grid Naming Service (GNS) is configured with a fixed VIP:
确认GNS配置。
1 | $ srvctl config gns |
This procedure cannot succeed unless GNS is configured with a fixed VIP. If there is no GNS, then, as root, create one, as follows:
GNS需要配置flexed-VIP的,如果没有配置,需要使用root用户创建一个。
1 | # srvctl add gns -vip vip_name | ip_address |
注意:ip_address要与集群公网在同一个网段。
Run the following command as root to start GNS:
启动GNS。
1 | # srvctl start gns |
3. Use the Oracle Automatic Storage Management Configuration Assistant (ASMCA) to enable Oracle Flex ASM in the cluster before you change the cluster mode.
使用asmca将ASM存储转换为Flex ASM。
4. Run the following command as root to change the mode of the cluster to be an Oracle Flex Cluster:
以root身份,配置集群模式为flex的。
1 | # crsctl set cluster mode flex |
5. Stop Oracle Clusterware by running the following command as root on each node in the cluster:
以root身份在一个节点执行停止crs的命令。
1 | # crsctl stop crs |
6. Start Oracle Clusterware by running the following command as root on each node in the cluster:
以root身份在一个节点执行启动crs的命令,即重启集群。
1 | # crsctl start crs -wait |
Note: Use the -wait option to display progress and status messages.
可以把Standard ASM 转化为 Flex ASM ,但这个转化是不可逆的。这样做的目的可能是为了推广这个特性。
先转换ASM 到 flex ,然后再转换集群到 flex 。
1 、查看集群当前模式
crsctl get cluster mode status
crsctl get cluster mode config
2 、查看集群节点成员角色
crsctl get node role status -all
3 、把 ASM 转换成 flex ASM
# grid 用户
asmcmd showclustermode
asmca # 推荐图形转换,也可以用命令: asmca -silent -convertToFlexASM -asmNetworks eth1/172.16.0.0 -asmListenerPort 1522
/u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh #root 用户只在 host03 上执行,该脚本会重启集群
asmcmd showclustermode
4 、查看是否使用 GNS 解析。 Standard 模式下不需要 GNS ,但是 Flex 模式是需要的配置 GNS 的,否则在执行“ crsctl set cluster mode flex ”时会报错:“ CRS-4937: Unable to set the cluster mode. ”。