OS:Oracle Linux 6.6 64bit
在12c下,RAC集群分为标准集群和flex集群,可如下方式查看
-
$ crsctl get cluster mode status
-
Cluster is running in "standard" mode
可在安装时指定集群模式。如果在安装时使用标准集群,可按如下方式改为flex集群。
1. GNS准备
GNS也需要配置DNS,可以用DHCP动态分配IP,也可以在DNS中静态分配。这里用DNS静态分配。
如果一开始未配置GNS,会有如下显示
-
$ srvctl status gns
-
PRKF-1117 : GNS server is not configured in this cluster.
1)DHCP配置
见:
为RAC 11g配置DNS,NTP,DHCP服务
2)DNS配置
DNS中保留SCAN IP的解析,添加GNS VIP条目
-
vi demo.com.db
-
……
-
-
gns.demo.com IN A 192.168.6.24
-
-
vi 192.168.6.db
-
……
-
24 PTR gns.demo.com.
所有集群内节点更改域名解析配置,将子域名加入
-
$ cat /etc/resolv.conf
-
search demo.com grid.demo.com
-
nameserver 192.168.6.23
2. 添加GNS资源
以root用户执行GNS添加
-
# /u01/app/12.1.0/grid/bin/srvctl add gns -vip 192.168.6.24 -domain grid.demo.com
启动GNS,仍然是用root用户执行
-
# /u01/app/12.1.0/grid/bin/srvctl start gns
GNS服务只会在一个节点运行
-
$ srvctl status gns
-
GNS is running on node node1.
-
GNS is enabled on node node1.
-
-
$ srvctl status gns -node node2
GNS is not running on node node2.
GNS is enabled on node node2.
-
$ crsctl status res -t
-
……
-
ora.gns
-
1 ONLINE ONLINE node1 STABLE
3. 将标准ASM转换为Flex ASM
http://blog.itpub.net/22621861/viewspace-2112288/
4.将标准集群转换为Flex集群
以root用户运行
-
# /u01/app/12.1.0/grid/bin/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.
按提示重启RAC
-
#关闭RAC
-
/u01/app/12.1.0/grid/bin/crsctl stop crs
-
#启动RAC
-
/u01/app/12.1.0/grid/bin/crsctl start crs -wait
查看集群模式,已变为Flex集群
-
$ crsctl get cluster mode status
-
Cluster is running in "flex" mode
查看节点角色
-
$ crsctl get node role status -all
-
Node 'node1' active role is 'hub'
-
Node 'node2' active role is 'hub'
完成!
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22621861/viewspace-2112228/
,如需转载,请注明出处,否则将追究法律责任。