在12c下,RAC集群分为标准集群和flex集群,可如下方式查看
点击(此处)折叠或打开
-
$ crsctl get cluster mode status
- Cluster is running in "standard" mode
1. GNS准备
GNS也需要配置DNS,可以用DHCP动态分配IP,也可以在DNS中静态分配。这里用DNS静态分配。
如果一开始未配置GNS,会有如下显示
点击(此处)折叠或打开
-
$ srvctl status gns
- PRKF-1117 : GNS server is not configured in this cluster.
见:为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
点击(此处)折叠或打开
- # /u01/app/12.1.0/grid/bin/srvctl start 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
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
-
/u01/app/12.1.0/grid/bin/crsctl stop crs
-
#启动RAC
- /u01/app/12.1.0/grid/bin/crsctl start crs -wait
点击(此处)折叠或打开
-
$ 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'