将12c RAC由标准集群改为flex集群

OS:Oracle Linux 6.6 64bit

在12c下,RAC集群分为标准集群和flex集群,可如下方式查看

点击(此处)折叠或打开

  1. $ crsctl get cluster mode status
  2. Cluster is running in "standard" mode
可在安装时指定集群模式。如果在安装时使用标准集群,可按如下方式改为flex集群。

1. GNS准备
GNS也需要配置DNS,可以用DHCP动态分配IP,也可以在DNS中静态分配。这里用DNS静态分配。
如果一开始未配置GNS,会有如下显示

点击(此处)折叠或打开

  1. $ srvctl status gns
  2. PRKF-1117 : GNS server is not configured in this cluster.
1)DHCP配置
    见:为RAC 11g配置DNS,NTP,DHCP服务

2)DNS配置
   DNS中保留SCAN IP的解析,添加GNS VIP条目

点击(此处)折叠或打开

  1. vi demo.com.db
  2. ……

  3. gns.demo.com IN A 192.168.6.24

  4. vi 192.168.6.db
  5. ……
  6. 24 PTR gns.demo.com.
所有集群内节点更改域名解析配置,将子域名加入

点击(此处)折叠或打开

  1. $ cat /etc/resolv.conf
  2. search demo.com grid.demo.com
  3. nameserver 192.168.6.23

2. 添加GNS资源
以root用户执行GNS添加

点击(此处)折叠或打开

  1. # /u01/app/12.1.0/grid/bin/srvctl add gns -vip 192.168.6.24 -domain grid.demo.com
启动GNS,仍然是用root用户执行

点击(此处)折叠或打开

  1. # /u01/app/12.1.0/grid/bin/srvctl start gns
GNS服务只会在一个节点运行

点击(此处)折叠或打开

  1. $ srvctl status gns
  2. GNS is running on node node1.
  3. GNS is enabled on node node1.

  4. $ srvctl status gns -node node2
    GNS is not running on node node2.
    GNS is enabled on node node2.
  1. $ crsctl status res -t
  2. ……
  3. ora.gns
  4.       1 ONLINE ONLINE node1 STABLE
3. 将标准ASM转换为Flex ASM
http://blog.itpub.net/22621861/viewspace-2112288/

4.将标准集群转换为Flex集群

以root用户运行

点击(此处)折叠或打开

  1. # /u01/app/12.1.0/grid/bin/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.
按提示重启RAC

点击(此处)折叠或打开

  1. #关闭RAC
  2. /u01/app/12.1.0/grid/bin/crsctl stop crs
  3. #启动RAC
  4. /u01/app/12.1.0/grid/bin/crsctl start crs -wait
查看集群模式,已变为Flex集群

点击(此处)折叠或打开

  1. $ crsctl get cluster mode status
  2. Cluster is running in "flex" mode
查看节点角色

点击(此处)折叠或打开

  1. $ crsctl get node role status -all
  2. Node 'node1' active role is 'hub'
  3. Node 'node2' active role is 'hub'
完成!

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