注意:当把中心节点转化为叶子节点后,这个节点上的ASM,DB等相关服务不会运行,这个是正常现象。在最开始安装时,如果不确定使用HUB/LEAF模式,建议先安装为HUB,相对来说之后调整容易些。
将中心节点转换为叶子节点
获取当前节点角色crsctl get node role config
[root@ohs3 ~]# ps -ef|grep pmon oracle 7045 1 0 14:00 ? 00:00:00 ora_pmon_pgold3 root 7357 8573 0 14:00 pts/0 00:00:00 grep pmon orgrid 25268 1 0 13:20 ? 00:00:00 asm_pmon_+ASM3 [root@ohs3 ~]# [root@ohs3 ~]# crsctl get node role config Node 'ohs3' configured role is 'hub' [root@ohs3 ~]#
改变节点角色
crsctl set node role {hub | leaf}
[root@ohs3 ~]# crsctl set node role leaf CRS-4408: Node 'ohs3' configured role successfully changed; restart Oracle High Availability Services for new role to take effect. [root@ohs3 ~]# [root@ohs3 ~]#
注意:在将叶子节点转化为中心节点时,如果此节点上不存在VIP,需要手动添加,然后继续下面的步骤
关闭集群服务
crsctl stop crs
[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_SCAN2.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.DATA_PGOLD.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.pgold.db' on 'ohs3' CRS-2673: Attempting to stop 'ora.FRA_PGOLD.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.SYSTEMDG.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ohs3' 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.SYSTEMDG.dg' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'ohs3' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'ohs3' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ohs3.vip' on 'ohs3' 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.ASMNET1LSNR_ASM.lsnr' on 'ohs3' succeeded CRS-2677: Stop of 'ora.ohs3.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.ohs3.vip' on 'ohs2' CRS-2677: Stop of 'ora.pgold.db' on 'ohs3' succeeded CRS-2677: Stop of 'ora.scan2.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.scan2.vip' on 'ohs1' CRS-2676: Start of 'ora.ohs3.vip' on 'ohs2' succeeded CRS-2676: Start of 'ora.scan2.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'ohs1' CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'ohs1' 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.gpnpd' on 'ohs3' CRS-2673: Attempting to stop 'ora.mdnsd' on 'ohs3' CRS-2677: Stop of 'ora.storage' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.crf' on 'ohs3' 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.gpnpd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.mdnsd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.crf' 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.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 ~]# ps -ef|egrep 'd.bin|pmon' root 8310 8573 0 14:02 pts/0 00:00:00 egrep d.bin|pmon [root@ohs3 ~]#
$ORACLE_HOME/bin/asmcmd afd_configure(可选步骤)
注意:如果之前没有配置,在将叶子节点转化为中心节点时,需要用root执行$ORACLE_HOME/bin/asmcmd afd_configure配置ASMFD
启动集群服务
crsctl start crs -wait
[root@ohs3 ~]# crsctl start crs -wait CRS-4123: Starting Oracle High Availability Services-managed resources CRS-2672: Attempting to start 'ora.mdnsd' on 'ohs3' CRS-2672: Attempting to start 'ora.evmd' on 'ohs3' CRS-2676: Start of 'ora.mdnsd' on 'ohs3' succeeded CRS-2676: Start of 'ora.evmd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'ohs3' CRS-2676: Start of 'ora.gpnpd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'ohs3' CRS-2676: Start of 'ora.gipcd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ohs3' CRS-2676: Start of 'ora.cssdmonitor' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'ohs3' CRS-2672: Attempting to start 'ora.diskmon' on 'ohs3' CRS-2676: Start of 'ora.diskmon' on 'ohs3' succeeded CRS-2676: Start of 'ora.cssd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ohs3' CRS-2672: Attempting to start 'ora.ctssd' on 'ohs3' CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ohs3' succeeded CRS-2676: Start of 'ora.ctssd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.storage' on 'ohs3' CRS-2676: Start of 'ora.storage' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.crf' on 'ohs3' CRS-2676: Start of 'ora.crf' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'ohs3' CRS-2676: Start of 'ora.crsd' on 'ohs3' succeeded CRS-6017: Processing resource auto-start for servers: ohs3 CRS-6016: Resource auto-start has completed for server ohs3 CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources CRS-4123: Oracle High Availability Services has been started. [root@ohs3 ~]# [root@ohs3 ~]#
可以看到变成叶节点后,ASM,DB服务没有起
[root@ohs3 ~]# ps -ef|grep pmon root 9673 8573 0 14:06 pts/0 00:00:00 grep pmon [root@ohs3 ~]#[root@ohs3 ~]# olsnodes -n -s -t
ohs1 1 Active Unpinned
ohs2 2 Active Unpinned
ohs3 3 Inactive Unpinned
ohs3 100 Active Unpinned
[root@ohs3 ~]#
手动更新inventory
A.如果你讲中心节点转化为叶子节点,在其他中心节点执行
/pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 "CLUSTER_NODES={ohs1,ohs2}" -silent -local CRS=TRUE
[orgrid@ohs1 ~]$ /pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 "CLUSTER_NODES={ohs1,ohs2}" -silent -local CRS=TRUE Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3605 MB Passed The inventory pointer is located at /etc/oraInst.loc 'UpdateNodeList' was successful. [orgrid@ohs1 ~]$ [orgrid@ohs2 ~]$ /pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 "CLUSTER_NODES={ohs1,ohs2}" -silent -local CRS=TRUE Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 4093 MB Passed The inventory pointer is located at /etc/oraInst.loc 'UpdateNodeList' was successful. [orgrid@ohs2 ~]$[orgrid@ohs1 ~]$ cat /pgold/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <VERSION_INFO> <SAVED_WITH>12.1.0.2.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> <HOME NAME="OraGI12Home1" LOC="/pgold/orgrid/oracle/product/121" TYPE="O" IDX="1" CRS="true"> <NODE_LIST> <NODE NAME="ohs1"/> <NODE NAME="ohs2"/> </NODE_LIST> </HOME> <HOME NAME="OraDB12Home1" LOC="/pgold/ordb/oracle/product/121" TYPE="O" IDX="2"> <NODE_LIST> <NODE NAME="ohs1"/> <NODE NAME="ohs2"/> <NODE NAME="ohs3"/> </NODE_LIST> </HOME> </HOME_LIST> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> </INVENTORY> [orgrid@ohs1 ~]$在新的叶子节点上执行
/pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 "CLUSTER_NODES={ohs3}" -silent -local CRS=TRUE
[orgrid@ohs3 ~]$ /pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 "CLUSTER_NODES={ohs3}" -silent -local CRS=TRUE Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 4086 MB Passed The inventory pointer is located at /etc/oraInst.loc 'UpdateNodeList' was successful. [orgrid@ohs3 ~]$[orgrid@ohs3 ContentsXML]$ cat /pgold/oraInventory/ContentsXML/inventory.xml
<?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <VERSION_INFO> <SAVED_WITH>12.1.0.2.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> <HOME NAME="OraGI12Home1" LOC="/pgold/orgrid/oracle/product/121" TYPE="O" IDX="1" CRS="true"> <NODE_LIST> <NODE NAME="ohs3"/> </NODE_LIST> </HOME> <HOME NAME="OraDB12Home1" LOC="/pgold/ordb/oracle/product/121" TYPE="O" IDX="2"> <NODE_LIST> <NODE NAME="ohs1"/> <NODE NAME="ohs2"/> <NODE NAME="ohs3"/> </NODE_LIST> </HOME> </HOME_LIST> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> </INVENTORY> [orgrid@ohs3 ContentsXML]$
将叶子节点转换为中心节点
[root@ohs3 ~]# crsctl get node role config Node 'ohs3' configured role is 'leaf' [root@ohs3 ~]# crsctl set node role hub CRS-4408: Node 'ohs3' configured role successfully changed; restart Oracle High Availability Services for new role to take effect. [root@ohs3 ~]# [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-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.crf' on 'ohs3' CRS-2673: Attempting to stop 'ora.ctssd' on 'ohs3' CRS-2673: Attempting to stop 'ora.evmd' on 'ohs3' CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ohs3' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ohs3' succeeded CRS-2677: Stop of 'ora.gpnpd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.crf' on 'ohs3' succeeded CRS-2677: Stop of 'ora.ctssd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.evmd' 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.gipcd' on 'ohs3' CRS-2677: Stop of 'ora.gipcd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.mdnsd' 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@ohs3 ~]# [root@ohs3 ~]# crsctl start crs -wait CRS-4123: Starting Oracle High Availability Services-managed resources CRS-2672: Attempting to start 'ora.mdnsd' on 'ohs3' CRS-2672: Attempting to start 'ora.evmd' on 'ohs3' CRS-2676: Start of 'ora.mdnsd' on 'ohs3' succeeded CRS-2676: Start of 'ora.evmd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.gpnpd' on 'ohs3' CRS-2676: Start of 'ora.gpnpd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.gipcd' on 'ohs3' CRS-2676: Start of 'ora.gipcd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ohs3' CRS-2676: Start of 'ora.cssdmonitor' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'ohs3' CRS-2672: Attempting to start 'ora.diskmon' on 'ohs3' CRS-2676: Start of 'ora.diskmon' on 'ohs3' succeeded CRS-2676: Start of 'ora.cssd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ohs3' CRS-2672: Attempting to start 'ora.ctssd' on 'ohs3' CRS-2676: Start of 'ora.ctssd' on 'ohs3' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.asm' on 'ohs3' CRS-2676: Start of 'ora.asm' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.storage' on 'ohs3' CRS-2676: Start of 'ora.storage' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.crf' on 'ohs3' CRS-2676: Start of 'ora.crf' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'ohs3' CRS-2676: Start of 'ora.crsd' on 'ohs3' succeeded CRS-6017: Processing resource auto-start for servers: ohs3 CRS-2672: Attempting to start 'ora.net1.network' on 'ohs3' CRS-2672: Attempting to start 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs3' CRS-2676: Start of 'ora.net1.network' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.ons' on 'ohs3' CRS-2673: Attempting to stop 'ora.ohs3.vip' on 'ohs2' CRS-2677: Stop of 'ora.ohs3.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.ohs3.vip' on 'ohs3' CRS-2676: Start of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs3' succeeded CRS-2676: Start of 'ora.ons' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'ohs1' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'ohs1' CRS-2677: Stop of 'ora.scan2.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.scan2.vip' on 'ohs3' CRS-2676: Start of 'ora.ohs3.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'ohs3' CRS-2676: Start of 'ora.LISTENER.lsnr' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.asm' on 'ohs3' CRS-2676: Start of 'ora.scan2.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' succeeded CRS-2676: Start of 'ora.asm' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.DATA_PGOLD.dg' on 'ohs3' CRS-2672: Attempting to start 'ora.FRA_PGOLD.dg' on 'ohs3' CRS-2676: Start of 'ora.DATA_PGOLD.dg' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.pgold.db' on 'ohs3' CRS-2676: Start of 'ora.FRA_PGOLD.dg' on 'ohs3' succeeded CRS-2676: Start of 'ora.pgold.db' on 'ohs3' succeeded CRS-6016: Resource auto-start has completed for server ohs3 CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources CRS-4123: Oracle High Availability Services has been started. [root@ohs3 ~]# [root@ohs3 ~]# [root@ohs3 ~]# su - orgrid [orgrid@ohs3 ~]$ /pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=Oracle_home "CLUSTER_NODES={ohs1,ohs2,ohs3}" -silent -local CRS=TRUE Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 4084 MB Passed The inventory pointer is located at /etc/oraInst.loc 'UpdateNodeList' failed. [orgrid@ohs3 ~]$ ps -ef|grep pmon orgrid 16475 1 0 14:29 ? 00:00:00 asm_pmon_+ASM3 oracle 16623 1 0 14:29 ? 00:00:00 ora_pmon_pgold3 orgrid 17549 17316 0 14:31 pts/0 00:00:00 grep pmon [orgrid@ohs3 ~]$
B.如果你讲叶子节点转化为中心节点,在所有的中心节点上执行
/pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 "CLUSTER_NODES={ohs1,ohs2,ohs3}" -silent -local CRS=TRUE
[orgrid@ohs1 ~]$ /pgold/orgrid/oracle/product/121/oui/bin/runInstaller -updateNodeList ORACLE_HOME=/pgold/orgrid/oracle/product/121 "CLUSTER_NODES={ohs1,ohs2,ohs3}" -silent -local CRS=TRUE Starting Oracle Universal Installer... Checking swap space: must be greater than 500 MB. Actual 3740 MB Passed The inventory pointer is located at /etc/oraInst.loc 'UpdateNodeList' was successful. [orgrid@ohs1 ~]$ [orgrid@ohs1 ~]$ [orgrid@ohs1 ~]$ [orgrid@ohs1 ~]$ cat /pgold/oraInventory/ContentsXML/inventory.xml <?xml version="1.0" standalone="yes" ?> <!-- Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. --> <!-- Do not modify the contents of this file by hand. --> <INVENTORY> <VERSION_INFO> <SAVED_WITH>12.1.0.2.0</SAVED_WITH> <MINIMUM_VER>2.1.0.6.0</MINIMUM_VER> </VERSION_INFO> <HOME_LIST> <HOME NAME="OraGI12Home1" LOC="/pgold/orgrid/oracle/product/121" TYPE="O" IDX="1" CRS="true"> <NODE_LIST> <NODE NAME="ohs1"/> <NODE NAME="ohs2"/> <NODE NAME="ohs3"/> </NODE_LIST> </HOME> <HOME NAME="OraDB12Home1" LOC="/pgold/ordb/oracle/product/121" TYPE="O" IDX="2"> <NODE_LIST> <NODE NAME="ohs1"/> <NODE NAME="ohs2"/> <NODE NAME="ohs3"/> </NODE_LIST> </HOME> </HOME_LIST> <COMPOSITEHOME_LIST> </COMPOSITEHOME_LIST> </INVENTORY> [orgrid@ohs1 ~]$
Reference
http://docs.oracle.com/database/121/CWADD/bigcluster.htm#CWADD92647