将Standard标准集群修改为Flex集群

将Standard标准集群修改为Flex集群


Oracle12C支持两种集群模式:Standard和Flex。
11G即是Standard的;Flex是12C的新特性。

当将Standard修改为Flex时,出现如下问题:

# 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:

确认当前集群模式:

$ 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配置。

$ 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用户创建一个。

# srvctl add gns -vip vip_name | ip_address

注意:ip_address要与集群公网在同一个网段。


Run the following command as root to start GNS:
启动GNS。

# 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的。

# crsctl set cluster mode flex
5. Stop Oracle Clusterware by running the following command as root on each node in the cluster:

以root身份在一个节点执行停止crs的命令。

# crsctl stop crs
6. Start Oracle Clusterware by running the following command as root on each node in the cluster:

以root身份在一个节点执行启动crs的命令,即重启集群。

# 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. ”。

srvctl status gns

srvctl config gns

转换成GNS 解析的命令:

-- srvctl add gns -vip 192.0.2.155 -domain cluster01.example.com

GNS 需要配置 flexed-VIP 的,如果没有配置,需要使用 root 用户创建一个

-- srvctl add gns -vip vip_name | ip_address

注意:ip_address 要与集群公网在同一个网段。

[root@raclhr-12cR1-N1 ~]# crsctl set cluster mode flex

CRS-4937: Unable to set the cluster mode.

[root@raclhr-12cR1-N1 ~]# oerr crs 4937

4937, 1, "Unable to set the cluster mode."

// *Cause: An attempt was made to set the cluster mode to 'flex' but Grid Naming Service(GNS) was not configured.

// *Action: Configure GNS and try again to set the cluster mode to 'flex'.

[root@raclhr-12cR1-N1 ~]# srvctl add gns -vip 192.168.59.165

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]# srvctl config gns

GNS is enabled.

GNS VIP addresses: 192.168.59.165

Domain served by GNS: N_FWD

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]#

[root@raclhr-12cR1-N1 ~]# srvctl status gns

GNS is not running.

GNS is enabled.

[root@raclhr-12cR1-N1 ~]# 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.

[root@raclhr-12cR1-N1 ~]#

 

5 、转换标准集群为 flex 集群

# 等待上一个步骤做完,所有状态是正常的

crsctl stat res -t

#root 用户

crsctl set cluster mode flex

 

crsctl stop cluster -all

crsctl start cluster -all

crsctl get cluster mode status

crsctl stat res -t

 

转换完成后,需要保证所有的集群资源状态都为ONLINE 状态。

 





About Me

........................................................................................................................

● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除

● 本文在itpub、博客园、CSDN和个人微 信公众号( xiaomaimiaolhr)上有同步更新

● 本文itpub地址: http://blog.itpub.net/26736162

● 本文博客园地址: http://www.cnblogs.com/lhrbest

● 本文CSDN地址: https://blog.csdn.net/lihuarongaini

● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/

● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/

● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826

........................................................................................................................

● QQ群号: 230161599 、618766405

● 微 信群:可加我微 信,我拉大家进群,非诚勿扰

● 联系我请加QQ好友 646634621 ,注明添加缘由

● 于 2020-02-01 06:00 ~ 2020-02-31 24:00 在西安完成

● 最新修改时间:2020-02-01 06:00 ~ 2020-02-31 24:00

● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解

● 版权所有,欢迎分享本文,转载请保留出处

........................................................................................................................

小麦苗的微店https://weidian.com/s/793741433?wfr=c&ifr=shopdetail

小麦苗出版的数据库类丛书http://blog.itpub.net/26736162/viewspace-2142121/

小麦苗OCP、OCM、高可用网络班http://blog.itpub.net/26736162/viewspace-2148098/

小麦苗腾讯课堂主页https://lhr.ke.qq.com/

........................................................................................................................

使用 微 信客户端扫描下面的二维码来关注小麦苗的微 信公众号( xiaomaimiaolhr)及QQ群(DBA宝典)、添加小麦苗微 信, 学习最实用的数据库技术。

........................................................................................................................

欢迎与我联系

 

 



请使用浏览器的分享功能分享到微信等