12c RAC 引入了两个新概念
中心节点:和之前的版本一样,它们通过专用网络相互连接,可以直接访问共享存储。这些节点可以直接访问 Oracle 集群注册表 (OCR) 和表决磁盘 (Voting Disks),最多可以有64个中心节点(Hub Nodes)
叶子节点:这些节点彼此不互连,也不能像中心节点一样访问共享存储。每个叶节点与所连接的中心节点通信,并通过所连接的中心节点连接到集群,这些节点不能运行ASM/RDBMS,我们可以部署应用在这些叶节点上。应用可以通过叶节点访问数据库,而不必在叶节点上运行 ASM 实例。叶子节点意在提高应用的高可用性。
Hub Nodes and Leaf Nodes的不同
Hub Nodes:
Direct access to the shared storage
They can access the Oracle Cluster Registry (OCR) and Voting Disk (VD) directly We can run an ASM instance on them.
We can run database instance on them as wellLeaf Nodes:
It's part of the cluster as well, but cannot direct access to the shared storage
They connected to the cluster via the Hub Node that is linked to
It does run Grid Infrastructure, but cannot run as ASM/Database instances. We can deploy Fusion Middleware ,weblogic on them
通过以下的步骤我们可以将Standard Cluster转化为Flex Cluster
查看当前cluster模式
[root@ohs1 ~]# crsctl get cluster mode status
Cluster is running in "standard" mode
查看GNS配置
GNS is enabled.
GNS VIP addresses: 10.0.2.11
Domain served by GNS: us.ohsdba.cn
如果不是Flex ASM先做转化再继续后面的步骤
ASMCMD> showclustermode ASM cluster : Flex mode enabled ASMCMD> showclusterstate Normal ASMCMD>
设置Cluster模式为Flex
[root@ohs1 ~]# crsctl set cluster mode -h Usage: crsctl set cluster mode flex where flex Set cluster mode to "flex" [root@ohs1 ~]# 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@ohs1 ~]# crsctl stop crs CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ohs1' CRS-2673: Attempting to stop 'ora.crsd' on 'ohs1' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ohs1' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'ohs1' CRS-2673: Attempting to stop 'ora.SYSTEMDG.dg' on 'ohs1' CRS-2673: Attempting to stop 'ora.oc4j' on 'ohs1' CRS-2673: Attempting to stop 'ora.FRA_PGOLD.dg' on 'ohs1' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ohs1' CRS-2673: Attempting to stop 'ora.mgmtdb' on 'ohs1' CRS-2673: Attempting to stop 'ora.cvu' on 'ohs1' CRS-2677: Stop of 'ora.SYSTEMDG.dg' on 'ohs1' succeeded CRS-2677: Stop of 'ora.cvu' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.cvu' on 'ohs2' CRS-2677: Stop of 'ora.FRA_PGOLD.dg' on 'ohs1' succeeded CRS-2676: Start of 'ora.cvu' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.DATA_PGOLD.dg' on 'ohs1' CRS-2677: Stop of 'ora.DATA_PGOLD.dg' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'ohs1' CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'ohs1' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.ohs1.vip' on 'ohs1' CRS-2677: Stop of 'ora.scan3.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.scan3.vip' on 'ohs2' CRS-2677: Stop of 'ora.asm' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'ohs2' CRS-2677: Stop of 'ora.ohs1.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.ohs1.vip' on 'ohs3' CRS-2677: Stop of 'ora.mgmtdb' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'ohs1' CRS-2677: Stop of 'ora.MGMTLSNR' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'ohs3' CRS-2677: Stop of 'ora.oc4j' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.oc4j' on 'ohs3' CRS-2676: Start of 'ora.MGMTLSNR' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.mgmtdb' on 'ohs3' CRS-2676: Start of 'ora.oc4j' on 'ohs3' succeeded CRS-2676: Start of 'ora.scan3.vip' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'ohs2' CRS-2677: Stop of 'ora.scan3.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.scan3.vip' on 'ohs3' CRS-2676: Start of 'ora.ohs1.vip' on 'ohs3' succeeded CRS-2676: Start of 'ora.mgmtdb' on 'ohs3' succeeded CRS-2676: Start of 'ora.scan3.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'ohs3' CRS-2676: Start of 'ora.asm' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs1' CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs1' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'ohs1' CRS-2677: Stop of 'ora.ons' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'ohs1' CRS-2677: Stop of 'ora.net1.network' on 'ohs1' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ohs1' has completed CRS-2677: Stop of 'ora.crsd' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.crf' on 'ohs1' CRS-2673: Attempting to stop 'ora.storage' on 'ohs1' CRS-2673: Attempting to stop 'ora.gpnpd' on 'ohs1' CRS-2673: Attempting to stop 'ora.mdnsd' on 'ohs1' CRS-2677: Stop of 'ora.storage' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'ohs1' CRS-2673: Attempting to stop 'ora.evmd' on 'ohs1' CRS-2673: Attempting to stop 'ora.asm' on 'ohs1' CRS-2677: Stop of 'ora.crf' on 'ohs1' succeeded CRS-2677: Stop of 'ora.gpnpd' on 'ohs1' succeeded CRS-2677: Stop of 'ora.mdnsd' on 'ohs1' succeeded CRS-2677: Stop of 'ora.ctssd' on 'ohs1' succeeded CRS-2677: Stop of 'ora.evmd' on 'ohs1' succeeded CRS-2677: Stop of 'ora.asm' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ohs1' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'ohs1' CRS-2677: Stop of 'ora.cssd' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'ohs1' CRS-2677: Stop of 'ora.gipcd' on 'ohs1' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ohs1' has completed CRS-4133: Oracle High Availability Services has been stopped. [root@ohs1 ~]# [root@ohs2 ~]# crsctl stop crs CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ohs2' CRS-2673: Attempting to stop 'ora.crsd' on 'ohs2' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ohs2' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'ohs2' CRS-2673: Attempting to stop 'ora.cvu' on 'ohs2' CRS-2677: Stop of 'ora.cvu' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.cvu' on 'ohs3' CRS-2676: Start of 'ora.cvu' on 'ohs3' succeeded CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'ohs2' CRS-2677: Stop of 'ora.scan2.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.scan2.vip' on 'ohs3' CRS-2676: Start of 'ora.scan2.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ohs2' CRS-2673: Attempting to stop 'ora.asm' on 'ohs2' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.ohs2.vip' on 'ohs2' CRS-2677: Stop of 'ora.ohs2.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.ohs2.vip' on 'ohs3' CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' succeeded CRS-2676: Start of 'ora.ohs2.vip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.gns' on 'ohs2' CRS-2677: Stop of 'ora.asm' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs2' CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs2' succeeded CRS-2677: Stop of 'ora.gns' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.gns.vip' on 'ohs2' CRS-2677: Stop of 'ora.gns.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.gns.vip' on 'ohs3' CRS-2676: Start of 'ora.gns.vip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'ohs2' CRS-2677: Stop of 'ora.ons' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'ohs2' CRS-2677: Stop of 'ora.net1.network' on 'ohs2' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ohs2' has completed CRS-2677: Stop of 'ora.crsd' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.gpnpd' on 'ohs2' CRS-2673: Attempting to stop 'ora.crf' on 'ohs2' CRS-2673: Attempting to stop 'ora.ctssd' on 'ohs2' CRS-2673: Attempting to stop 'ora.evmd' on 'ohs2' CRS-2673: Attempting to stop 'ora.storage' on 'ohs2' CRS-2673: Attempting to stop 'ora.mdnsd' on 'ohs2' CRS-2677: Stop of 'ora.storage' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'ohs2' CRS-2677: Stop of 'ora.gpnpd' on 'ohs2' succeeded CRS-2677: Stop of 'ora.crf' on 'ohs2' succeeded CRS-2677: Stop of 'ora.ctssd' on 'ohs2' succeeded CRS-2677: Stop of 'ora.mdnsd' on 'ohs2' succeeded CRS-2677: Stop of 'ora.evmd' on 'ohs2' succeeded CRS-2677: Stop of 'ora.asm' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ohs2' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'ohs2' CRS-2677: Stop of 'ora.cssd' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'ohs2' CRS-2677: Stop of 'ora.gipcd' on 'ohs2' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ohs2' has completed CRS-4133: Oracle High Availability Services has been stopped. [root@ohs2 ~]# [root@ohs3 ~]# crsctl stop crs CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ohs3' CRS-2673: Attempting to stop 'ora.crsd' on 'ohs3' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ohs3' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.ohs3.vip' on 'ohs3' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.DATA_PGOLD.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.FRA_PGOLD.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.mgmtdb' on 'ohs3' CRS-2673: Attempting to stop 'ora.cvu' on 'ohs3' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.oc4j' on 'ohs3' CRS-2677: Stop of 'ora.cvu' on 'ohs3' succeeded CRS-2677: Stop of 'ora.DATA_PGOLD.dg' on 'ohs3' succeeded CRS-2677: Stop of 'ora.FRA_PGOLD.dg' on 'ohs3' succeeded CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'ohs3' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' succeeded CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'ohs3' CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.scan1.vip' on 'ohs3' CRS-2677: Stop of 'ora.ohs3.vip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ohs1.vip' on 'ohs3' CRS-2677: Stop of 'ora.scan2.vip' on 'ohs3' succeeded CRS-2677: Stop of 'ora.scan3.vip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.gns.vip' on 'ohs3' CRS-2677: Stop of 'ora.mgmtdb' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.SYSTEMDG.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'ohs3' CRS-2677: Stop of 'ora.SYSTEMDG.dg' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'ohs3' CRS-2677: Stop of 'ora.scan1.vip' on 'ohs3' succeeded CRS-2677: Stop of 'ora.MGMTLSNR' on 'ohs3' succeeded CRS-2677: Stop of 'ora.ohs1.vip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ohs2.vip' on 'ohs3' CRS-2677: Stop of 'ora.gns.vip' on 'ohs3' succeeded CRS-2677: Stop of 'ora.asm' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs3' CRS-2677: Stop of 'ora.ohs2.vip' on 'ohs3' succeeded CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs3' succeeded CRS-2677: Stop of 'ora.oc4j' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'ohs3' CRS-2677: Stop of 'ora.ons' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'ohs3' CRS-2677: Stop of 'ora.net1.network' on 'ohs3' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ohs3' has completed CRS-2677: Stop of 'ora.crsd' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.storage' on 'ohs3' CRS-2673: Attempting to stop 'ora.mdnsd' on 'ohs3' CRS-2673: Attempting to stop 'ora.gpnpd' on 'ohs3' CRS-2677: Stop of 'ora.storage' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'ohs3' CRS-2673: Attempting to stop 'ora.evmd' on 'ohs3' CRS-2673: Attempting to stop 'ora.asm' on 'ohs3' CRS-2677: Stop of 'ora.mdnsd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.gpnpd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.ctssd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.evmd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.asm' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ohs3' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'ohs3' CRS-2677: Stop of 'ora.cssd' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.crf' on 'ohs3' CRS-2677: Stop of 'ora.crf' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.gipcd' on 'ohs3' CRS-2677: Stop of 'ora.gipcd' on 'ohs3' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ohs3' has completed CRS-4133: Oracle High Availability Services has been stopped. [root@ohs3 ~]#
[root@ohs1 ~]# crsctl start crs -wait
CRS-4123: Starting Oracle High Availability Services-managed resources CRS-2672: Attempting to start 'ora.mdnsd' on 'ohs1' CRS-2672: Attempting to start 'ora.evmd' on 'ohs1' CRS-2676: Start of 'ora.mdnsd' on 'ohs1' succeeded CRS-2676: Start of 'ora.evmd' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'ohs1' CRS-2676: Start of 'ora.gpnpd' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'ohs1' CRS-2676: Start of 'ora.gipcd' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ohs1' CRS-2676: Start of 'ora.cssdmonitor' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'ohs1' CRS-2672: Attempting to start 'ora.diskmon' on 'ohs1' CRS-2676: Start of 'ora.diskmon' on 'ohs1' succeeded CRS-2676: Start of 'ora.cssd' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ohs1' CRS-2672: Attempting to start 'ora.ctssd' on 'ohs1' CRS-2676: Start of 'ora.ctssd' on 'ohs1' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'ohs1' CRS-2676: Start of 'ora.asm' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.storage' on 'ohs1' CRS-2676: Start of 'ora.storage' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.crf' on 'ohs1' CRS-2676: Start of 'ora.crf' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'ohs1' CRS-2676: Start of 'ora.crsd' on 'ohs1' succeeded CRS-6023: Starting Oracle Cluster Ready Services-managed resources CRS-2664: Resource 'ora.FRA_PGOLD.dg' is already running on 'ohs1' CRS-2664: Resource 'ora.DATA_PGOLD.dg' is already running on 'ohs1' CRS-2664: Resource 'ora.SYSTEMDG.dg' is already running on 'ohs1' CRS-6017: Processing resource auto-start for servers: ohs1 CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'ohs1' CRS-2672: Attempting to start 'ora.oc4j' on 'ohs1' CRS-2676: Start of 'ora.MGMTLSNR' on 'ohs1' succeeded CRS-2676: Start of 'ora.oc4j' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.mgmtdb' on 'ohs1' CRS-2676: Start of 'ora.mgmtdb' on 'ohs1' succeeded [root@ohs1 ~]#
查看集群模式
[root@ohs1 ~]# crsctl get cluster hubsize CRS-4950: Current hubsize parameter value is 32 [root@ohs1 ~]# [root@ohs1 ~]# crsctl get cluster mode config Cluster is configured as type "flex" [root@ohs1 ~]# crsctl get cluster mode status Cluster is running in "flex" mode [root@ohs1 ~]#
查看集群角色
[root@ohs1 ~]# crsctl get node role config -all[root@ohs1 ~]# crsctl get node role config -all Node 'ohs1' configured role is 'hub' Node 'ohs2' configured role is 'hub' Node 'ohs3' configured role is 'hub' [root@ohs1 ~]# [root@ohs1 ~]# crsctl get node role status -all Node 'ohs1' active role is 'hub' Node 'ohs2' active role is 'hub' Node 'ohs3' active role is 'hub' [root@ohs1 ~]#[root@ohs1 ~]# olsnodes -a -s -n -t -a
ohs1 1 Active Hub Unpinned
ohs2 2 Active Hub Unpinned
ohs3 3 Active Hub Unpinned
[root@ohs1 ~]#
[root@ohs1 ~]#
http://docs.oracle.com/database/121/CWADD/bigcluster.htm#CWADD92409
http://www.oracle.com/technetwork/cn/articles/database/flexasm-flexcluster-benefits-odb12c-2177371-zhs.html