分享更有价值
被信任是一种快乐

oracle12cR2如何增加节点删除节点挽救集群

文章页正文上

这篇文章主要介绍了oracle12cR2如何增加节点删除节点挽救集群,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。数据库版本:[oracle@jsbp242305 ~]$ sqlplus -VSQL*Plus: Release 12.2.0.1.0 Production12.2数据库目前有一个bug,sql*plus改sys用户口令会hang住,因为12.2内部行为有了变化,更改密码去更新一张基表的时候有问题,之前做过hanganalyze,我记得好像更改密码的会话在等待raw cache lock。oracle官方建议sys用户口令要用orapwd命令去修改,或者打one-offpatch(16002385)。而one-offpatch又依赖于一个最新的RU(27105253),我在打RU的时候直接报错,节点1崩溃无法挽救,节点2存活,只好采用增删节点的方式挽回集群。12.2的数据库全是坑,打补丁的时候千万记得从节点2开始打!!个人经验,仅供参考。##################删除节点##############IP信息,要删除的是节点1: jsbp242305[grid@jsbp242306 ~]$ more /etc/hosts127.0.0.1 localhost localhost.localdomain
localhost4 localhost4.localdomain4::1 localhost localhost.localdomain
localhost6 localhost6.localdomain6#10.10.129.41 jsbp242306#Public IP10.11.176.75 jsbp24230510.11.176.76 jsbp242306#VIP10.11.176.77 jsbp242305-vip10.11.176.78 jsbp242306-vip#SCAN10.11.176.79 jqhwccdb-scan#Private IP2.1.176.75 jsbp242305-priv2.1.176.76 jsbp242306-priv查看是否是unpinned:[grid@jsbp242306 ~]$ olsnodes -s -tjsbp242305 Inactive Unpinnedjsbp242306 Active Unpinned都是unpinned,不用运行crsctl
unpin css命令。软件的home目录是local的,不是共享的,所以在要删除的节点执行下面命令:[grid@jsbp242305 ~]$
/oracle/app/12.2.0/grid/deinstall/deinstall -localChecking for required files and
bootstrapping …Please wait …Location of logs
/oracle/app/oraI免费主机域名nventory/logs/############ ORACLE DECONFIG TOOL START
##################################### DECONFIG CHECK
OPERATION START ########################### [START] Install check configuration ##Checking for existence of the Oracle home
location /oracle/app/12.2.0/gridOracle Home type selected for deinstall is:
Oracle Grid Infrastructure for a ClusterOracle Base selected for deinstall is:
/oracle/app/gridChecking for existence of central inventory
location /oracle/app/oraInventoryChecking for existence of the Oracle Grid
Infrastructure home /oracle/app/12.2.0/gridThe following nodes are part of this
cluster: jsbp242305Checking for sufficient temp space
availability on node(s) : ‘jsbp242305’## [END] Install check configuration ##Traces log file:
/oracle/app/oraInventory/logs//crsdc_2018-04-16_10-26-36-AM.logNetwork Configuration check config STARTNetwork de-configuration trace file
location: /oracle/app/oraInventory/logs/netdc_check2018-04-16_10-26-44-AM.logNetwork Configuration check config ENDAsm Check Configuration STARTASM de-configuration trace file location:
/oracle/app/oraInventory/logs/asmcadc_check2018-04-16_10-26-44-AM.logDatabase Check Configuration STARTDatabase de-configuration trace file
location: /oracle/app/oraInventory/logs/databasedc_check2018-04-16_10-26-44-AM.logOracle Grid Management database was not
found in this Grid Infrastructure homeDatabase Check Configuration END################ DECONFIG CHECK
OPERATION END #################################### DECONFIG CHECK
OPERATION SUMMARY #######################Oracle Grid Infrastructure Home is:
/oracle/app/12.2.0/gridThe following nodes are part of this
cluster: jsbp242305The cluster node(s) on which the Oracle
home deinstallation will be performed are:jsbp242305Oracle Home selected for deinstall is:
/oracle/app/12.2.0/gridInventory Location where the Oracle home
registered is: /oracle/app/oraInventoryOption -local will not modify any ASM
configuration.Oracle Grid Management database was not
found in this Grid Infrastructure homeDo you want to continue
(y – yes, n – no)? [n]: yA log of this session will be written to:
‘/oracle/app/oraInventory/logs/deinstall_deconfig2018-04-16_10-26-34-AM.out’Any error messages from this session will
be written to: ‘/oracle/app/oraInventory/logs/deinstall_deconfig2018-04-16_10-26-34-AM.err’############ DECONFIG CLEAN
OPERATION START ########################Database de-configuration trace file
location:
/oracle/app/oraInventory/logs/databasedc_clean2018-04-16_10-27-15-AM.logASM de-configuration trace file location:
/oracle/app/oraInventory/logs/asmcadc_clean2018-04-16_10-27-15-AM.logASM Clean Configuration ENDNetwork Configuration clean config STARTNetwork de-configuration trace file
location: /oracle/app/oraInventory/logs/netdc_clean2018-04-16_10-27-15-AM.logNetwork Configuration clean config ENDRun the following command
as the root user or the administrator on node “jsbp242305”./oracle/app/12.2.0/grid/crs/install/rootcrs.sh
-force -deconfig -paramfile
“/tmp/deinstall2018-04-16_10-26-05AM/response/deinstall_OraGI12Home1.rsp”Press Enter after you
finish running the above commands
按照提示去执行:[root@jsbp242305 ~]#
/oracle/app/12.2.0/grid/crs/install/rootcrs.sh -force -deconfig -paramfile
“/tmp/deinstall2018-04-16_10-26-05AM/response/deinstall_OraGI12Home1.rsp”Using configuration parameter file:
/tmp/deinstall2018-04-16_10-26-05AM/response/deinstall_OraGI12Home1.rspThe log of current session can be found at:/oracle/app/oraInventory/logs/crsdeconfig_jsbp242305_2018-04-16_10-27-36AM.logPRCR-1070 : Failed to check if resource
ora.net1.network is registeredCRS-0184 : Cannot communicate with the CRS
daemon.PRCR-1070 : Failed to check if resource
ora.helper is registeredCRS-0184 : Cannot communicate with the CRS
daemon.PRCR-1070 : Failed to check if resource
ora.ons is registeredCRS-0184 : Cannot communicate with the CRS
daemon.2018/04/16 10:27:48 CLSRSC-180: An error
occurred while executing the command ‘/oracle/app/12.2.0/grid/bin/srvctl config
nodeapps’CRS-2791: Starting shutdown of Oracle High
Availability Services-managed resources on ‘jsbp242305’CRS-2679: Attempting to clean ‘ora.gipcd’
on ‘jsbp242305’CRS-2681: Clean of ‘ora.gipcd’ on
‘jsbp242305’ succeededCRS-2793: Shutdown of Oracle High
Availability Services-managed resources on ‘jsbp242305’ has completedCRS-4133: Oracle High Availability Services
has been stopped.2018/04/16 10:28:11 CLSRSC-4006: Removing
Oracle Trace File Analyzer (TFA) Collector.2018/04/16 10:28:42 CLSRSC-4007:
Successfully removed Oracle Trace File Analyzer (TFA) Collector.2018/04/16 10:28:47 CLSRSC-336:
Successfully deconfigured Oracle Clusterware stack on this node返回之前的节点,按enter:################ DECONFIG CLEAN
OPERATION END ####################################### DECONFIG CLEAN
OPERATION SUMMARY #######################There is no Oracle Grid Management database
to de-configure in this Grid Infrastructure homeOracle Clusterware is stopped and
successfully de-configured on node “jsbp242305″Oracle Clusterware is stopped and
de-configured successfully.################################################################################ ORACLE DECONFIG TOOL END
#############Using properties file
/tmp/deinstall2018-04-16_10-26-05AM/response/deinstall_2018-04-16_10-26-34-AM.rspLocation of logs
/oracle/app/oraInventory/logs/############ ORACLE DEINSTALL TOOL START
########################## DEINSTALL CHECK
OPERATION SUMMARY #######################A log of this session will be written to:
‘/oracle/app/oraInventory/logs/deinstall_deconfig2018-04-16_10-26-34-AM.out’Any error messages from this session will
be written to:
‘/oracle/app/oraInventory/logs/deinstall_deconfig2018-04-16_10-26-34-AM.err’################ DEINSTALL CLEAN
OPERATION START ########################## [START] Preparing for Deinstall ##Setting LOCAL_NODE to jsbp242305Setting CLUSTER_NODES to jsbp242305Setting CRS_HOME to trueSetting oracle.installer.invPtrLoc to
/tmp/deinstall2018-04-16_10-26-05AM/oraInst.locSetting oracle.installer.local to true## [END] Preparing for Deinstall ##Setting the force flag to falseSetting the force flag to cleanup the
Oracle BaseOracle Universal Installer clean STARTDetach Oracle home
‘/oracle/app/12.2.0/grid’ from the central inventory on the local node : DoneDelete directory ‘/oracle/app/12.2.0/grid’
on the local node : DoneFailed to delete the directory
‘/oracle/app/grid/log/diag/asmcmd/user_root/jsbp242305/trace’. Either user has
no permission to delete or it is in use.The Oracle Base directory
‘/oracle/app/grid’ will not be removed on local node. The directory is not
empty.Oracle Universal Installer cleanup was
successful.Oracle Universal Installer clean END## [START] Oracle install clean #### [END] Oracle install clean ##################### DEINSTALL CLEAN
OPERATION END ######################################### DEINSTALL CLEAN
OPERATION SUMMARY #######################Successfully detached Oracle home
‘/oracle/app/12.2.0/grid’ from the central inventory on the local node.Successfully deleted directory
‘/oracle/app/12.2.0/grid’ on the local node.Oracle Universal Installer cleanup was
successful.Review the permissions and contents of
‘/oracle/app/grid’ on nodes(s) ‘jsbp242305’.If there are no Oracle home(s) associated
with ‘/oracle/app/grid’, manually delete ‘/oracle/app/grid’ and its contents.Oracle deinstall tool successfully cleaned
up temporary directories.################################################################################ ORACLE DEINSTALL TOOL END
#############结束。在不删除的节点2的Grid_home/bin下,root用户,执行:[root@jsbp242306 ~]#
/oracle/app/12.2.0/grid/bin/crsctl delete node -n jsbp242305CRS-4661: Node jsbp242305 successfully
deleted.验证是否被删除成功:[grid@jsbp242306 ~]$ cluvfy stage -post
nodedel -n jsbp242305Verifying Node Removal …Verifying CRS Integrity …PASSEDVerifying Clusterware Version Consistency
…PASSEDVerifying Node Removal …PASSEDPost-check for node removal was successful.CVU operation performed: stage -post
nodedelDate: Apr 16, 2018 10:36:21 AMCVU home: /oracle/app/12.2.0/grid/User: grid验证被删除节点vip资源是否存在:$ srvctl config vip -node jsbp242305vip资源状态ora.jsbp242305.vip1 ONLINE INTERMEDIATE jsbp242306 FAILED
OVER,STABLE如果vip资源存在,删掉它:$ srvctl stop vip -vip jsbp242305-vip$ srvctl remove vip -vip jsbp242305-vip删除vip资源需要root用户权限:[grid@jsbp242306 addnode]$ srvctl remove
vip -vip jsbp242305-vipPlease confirm that you intend to remove
the VIPs jsbp242305-vip (y/[n]) yPRKO-2381 : VIP jsbp242305-vip is not
removed successfully:PRCN-2018 : Current user grid is not a
privileged user[grid@jsbp242306 addnode]$ which srvctl/oracle/app/12.2.0/grid/bin/srvctl[grid@jsbp242306 addnode]$ logout[root@jsbp242306 ~]# /oracle/app/12.2.0/grid/bin/srvctl
remove vip -vip jsbp242305-vipPlease confirm that you intend to remove
the VIPs jsbp242305-vip (y/[n]) y再次检查vip资源状态:ora.jsbp242305.vip1 OFFLINE OFFLINE STABLE之前,我以为这个节点删除之后还要添加回来,就没有删除,后面添加节点时报错,还是要删除的。##########增加节点##################用addnode.sh增加节点2.在存在节点,验证要增加的节点和集群一致性:$ cluvfy stage -pre nodeadd -n jsbp242305
[-fixup] [-verbose]如果验证失败,可以加fixup选项来修复集群.[grid@jsbp242306 ~]$ cluvfy stage -pre
nodeadd -n jsbp242305Verifying Physical Memory …PASSEDVerifying Available Physical Memory
…PASSEDVerifying Swap Size …PASSEDVerifying Free Space: jsbp242306:/usr
…PASSEDVerifying Free Space: jsbp242306:/var
…PASSEDVerifying Free Space:
jsbp242306:/etc,jsbp242306:/sbin …PASSEDVerifying Free Space:
jsbp242306:/oracle/app/12.2.0/grid …PASSEDVerifying Free Space: jsbp242306:/tmp
…PASSEDVerifying Free Space: jsbp242305:/usr
…PASSEDVerifying Free Space: jsbp242305:/var
…PASSEDVerifying Free Space:
jsbp242305:/etc,jsbp242305:/sbin …PASSEDVerifying Free Space:
jsbp242305:/oracle/app/12.2.0/grid …PASSEDVerifying Free Space: jsbp242305:/tmp
…PASSEDVerifying User Existence: oracle …Verifying Users With Same UID: 1101
…PASSEDVerifying User Existence: oracle …PASSEDVerifying User Existence: grid …Verifying Users With Same UID: 1100
…PASSEDVerifying User Existence: grid …PASSEDVerifying User Existence: root …Verifying Users With Same UID: 0 …PASSEDVerifying User Existence: root …PASSEDVerifying Group Existence: asmadmin
…PASSEDVerifying Group Existence: asmoper
…PASSEDVerifying Group Existence: asmdba …PASSEDVerifying Group Existence: oinstall
…PASSEDVerifying Group Membership: oinstall
…PASSEDVerifying Group Membership: asmdba
…PASSEDVerifying Group Membership: asmadmin
…PASSEDVerifying Group Membership: asmoper
…PASSEDVerifying Run Level …PASSEDVerifying Architecture …PASSEDVerifying OS Kernel Version …PASSEDVerifying OS Kernel Parameter: semmsl
…PASSEDVerifying OS Kernel Parameter: semmns
…PASSEDVerifying OS Kernel Parameter: semopm
…PASSEDVerifying OS Kernel Parameter: semmni
…PASSEDVerifying OS Kernel Parameter: shmmax
…PASSEDVerifying OS Kernel P免费主机域名arameter: shmmni
…PASSEDVerifying OS Kernel Parameter: shmall
…PASSEDVerifying OS Kernel Parameter: file-max
…PASSEDVerifying OS Kernel Parameter:
ip_local_port_range …PASSEDVerifying OS Kernel Parameter: rmem_default
…PASSEDVerifying OS Kernel Parameter: rmem_max
…PASSEDVerifying OS Kernel Parameter: wmem_default
…PASSEDVerifying OS Kernel Parameter: wmem_max
…PASSEDVerifying OS Kernel Parameter: aio-max-nr
…PASSEDVerifying OS Kernel Parameter:
panic_on_oops …PASSEDVerifying Package: binutils-2.20.51.0.2
…PASSEDVerifying Package: compat-libcap1-1.10
…PASSEDVerifying Package:
compat-libstdc++-33-3.2.3 (x86_64) …PASSEDVerifying Package: libgcc-4.4.7 (x86_64)
…PASSEDVerifying Package: libstdc++-4.4.7 (x86_64)
…PASSEDVerifying Package: libstdc++-devel-4.4.7
(x86_64) …PASSEDVerifying Package: sysstat-9.0.4 …PASSEDVerifying Package: gcc-4.4.7 …PASSEDVerifying Package: gcc-c++-4.4.7 …PASSEDVerifying Package: ksh …PASSEDVerifying Package: make-3.81 …PASSEDVerifying Package: glibc-2.12 (x86_64)
…PASSEDVerifying Package: glibc-devel-2.12
(x86_64) …PASSEDVerifying Package: libaio-0.3.107 (x86_64)
…PASSEDVerifying Package: libaio-devel-0.3.107
(x86_64) …PASSEDVerifying Package: nfs-utils-1.2.3-15
…PASSEDVerifying Package: smartmontools-5.43-1
…PASSEDVerifying Package: net-tools-1.60-110
…PASSEDVerifying Users With Same UID: 0 …PASSEDVerifying Current Group ID …PASSEDVerifying Root user consistency …PASSEDVerifying Package: cvuqdisk-1.0.10-1
…FAILED (PRVG-11550)Verifying Node Addition …Verifying CRS Integrity …PASSEDVerifying Clusterware Version Consistency
…PASSEDVerifying ‘/oracle/app/12.2.0/grid’
…PASSEDVerifying Node Addition …PASSEDVerifying Node Connectivity …Verifying Hosts File …PASSEDVerifying Check that maximum (MTU) size
packet goes through subnet …PASSEDVerifying subnet mask consistency for
subnet “2.1.176.0” …PASSEDVerifying subnet mask consistency for
subnet “10.11.176.0” …PASSEDVerifying Node Connectivity …PASSEDVerifying Multicast check …PASSEDVerifying ASM Integrity …Verifying Node Connectivity …Verifying Hosts File …PASSEDVerifying Check that maximum (MTU) size
packet goes through subnet …PASSEDVerifying subnet mask consistency for
subnet “2.1.176.0” …PASSEDVerifying subnet mask consistency for
subnet “10.11.176.0” …PASSEDVerifying Node Connectivity …PASSEDVerifying ASM Integrity …PASSEDVerifying Device Checks for ASM …Verifying ASM device sharedness check …Verifying Package: cvuqdisk-1.0.10-1
…FAILED (PRVG-11550)Verifying ASM device sharedness check
…FAILED (PRVG-11550)Verifying Access Control List check
…PASSEDVerifying Device Checks for ASM …FAILED
(PRVG-11550)Verifying Database home availability
…PASSEDVerifying OCR Integrity …PASSEDVerifying Time zone consistency …PASSEDVerifying Network Time Protocol (NTP) …Verifying ‘/etc/ntp.conf’ …PASSEDVerifying ‘/var/run/ntpd.pid’ …PASSEDVerifying Daemon ‘ntpd’ …PASSEDVerifying NTP daemon or service using UDP
port 123 …PASSEDVerifying NTP daemon is synchronized with
at least one external time source …PASSEDVerifying Network Time Protocol (NTP)
…PASSEDVerifying User Not In Group
“root”: grid …PASSEDVerifying resolv.conf Integrity …Verifying (Linux) resolv.conf Integrity
…FAILED (PRVG-13159)Verifying resolv.conf Integrity …FAILED
(PRVG-13159)Verifying DNS/NIS name service …PASSEDVerifying User Equivalence …PASSEDVerifying /dev/shm mounted as temporary
file system …PASSEDVerifying /boot mount …PASSEDVerifying zeroconf check …PASSEDPre-check for node addition was unsuccessful
on all the nodes.Failures were encountered during execution
of CVU verification request “stage -pre nodeadd”.Verifying Package: cvuqdisk-1.0.10-1
…FAILEDjsbp242305: PRVG-11550 : Package
“cvuqdisk” is missing on node “jsbp242305″Verifying Device Checks for ASM …FAILEDVerifying ASM device sharedness check
…FAILEDVerifying Package: cvuqdisk-1.0.10-1
…FAILEDjsbp242305: PRVG-11550 : Package
“cvuqdisk” is missing on node “jsbp242305″Verifying resolv.conf Integrity …FAILEDjsbp242306: PRVG-13159 : On node
“jsbp242306” the file “/etc/resolv.conf” couldnot be parsed because the file is empty.jsbp242306: Check for integrity of file
“/etc/resolv.conf” failedjsbp242305: PRVG-13159 : On node
“jsbp242305” the file “/etc/resolv.conf” couldnot be parsed because the file is empty.jsbp242305: Check for integrity of file
“/etc/resolv.conf” failedVerifying (Linux) resolv.conf Integrity
…FAILEDjsbp242306: PRVG-13159 : On node
“jsbp242306” the file “/etc/resolv.conf”could not be parsed because the file is
empty.jsbp242305: PRVG-13159 : On node
“jsbp242305” the file “/etc/resolv.conf”could not be parsed because the file is
empty.CVU operation performed: stage -pre nodeaddDate: Apr 16, 2018 10:52:03 AMCVU home: /oracle/app/12.2.0/grid/User: grid可以看到,报错里只需关注cvuqdisk这个安装包缺失即可,手动安装一下:[root@jsbp242305 grid]# rpm -ivh
cvuqdisk-1.0.10-1.rpmPreparing…
########################################### [100%]1:cvuqdisk
########################################### [100%]/etc/resolv.conf这个不用理会。3.To extend the Oracle Grid Infrastructure
home to the node3, navigate to the Grid_home/addnode directory on node1 and run
the addnode.sh script as the user that installed Oracle Clusterware.在存活节点的Grid_home/addnode目录下,用grid用户执行:cd /oracle/app/12.2.0/grid/addnode./addnode.sh –交互模式./addnode.sh -silent
“CLUSTER_NEW_NODES={jsbp242305}”
“CLUSTER_NEW_VIRTUAL_HOSTNAMES={jsbp242305-vip}” –静默模式[grid@jsbp242306 addnode]$ cd
/oracle/app/12.2.0/grid/addnode[grid@jsbp242306 addnode]$ ./addnode.sh
-silent “CLUSTER_NEW_NODES={jsbp242305}”
“CLUSTER_NEW_VIRTUAL_HOSTNAMES={jsbp242305-vip}”[FATAL] [INS-43045] CLUSTER_NEW_NODE_ROLES
parameter was not specified.CAUSE: The CLUSTER_NEW_NODE_ROLES parameter
was not provided for performing addnode operation.ACTION: Ensure that CLUSTER_NEW_NODE_ROLES
parameter is passed. Refer to installation guide for more information on the
syntax of passing CLUSTER_NEW_VIRTUAL_HOSTNAMES parameter.报错,要指定CLUSTER_NEW_NODE_ROLES./addnode.sh -silent “CLUSTER_NEW_NODES={jsbp242305}”
“CLUSTER_NEW_VIRTUAL_HOSTNAMES={jsbp242305-vip}”
“CLUSTER_NEW_NODE_ROLES={HUB}”再次尝试:[grid@jsbp242306 addnode]$ ./addnode.sh
-silent “CLUSTER_NEW_NODES={jsbp242305}”
“CLUSTER_NEW_VIRTUAL_HOSTNAMES={jsbp242305-vip}” “CLUSTER_NEW_NODE_ROLES={HUB}”[FATAL] [INS-40912] Virtual host name:
jsbp242305-vip is assigned to another system on the network.CAUSE: One or more virtual host names
appeared to be assigned to another system on the network.ACTION: Ensure that the virtual host names
assigned to each of the nodes in the cluster are not currently in use, and the
IP addresses are registered to the domain name you want to use as the virtual
host name.报错:之前删除vip没有成功的缘故。删除vip之后再次尝试:还是报错,查看报错日志好像是因为之前忽略的resolve.conf,重命名掉两边的resolve.conf文件:[root@jsbp242306 ~]# mv /etc/resolv.conf
/etc/resolv.conf.bak[root@jsbp242305 ~]# mv /etc/resolv.conf
/etc/resolv.conf.bak再次执行:[grid@jsbp242306 ~]$ cd
/oracle/app/12.2.0/grid/addnode[grid@jsbp242306 addnode]$ ./addnode.sh
-silent “CLUSTER_NEW_NODES={jsbp242305}”
“CLUSTER_NEW_VIRTUAL_HOSTNAMES={jsbp242305-vip}”
“CLUSTER_NEW_NODE_ROLES={HUB}”[WARNING] [INS-40111] The specified Oracle
Base location is not empty on following nodes: [jsbp242305].ACTION: Specify an empty location for
Oracle Base.Prepare Configuration in progress.Prepare Configuration successful……………………………………………
7% Done.Copy Files to Remote Nodes in progress……………………………………………
12% Done……………………………………………
17% Done………………………….Copy Files to Remote Nodes successful.You can find the log of this install
session at:/oracle/app/oraInventory/logs/addNodeActions2018-04-16_02-23-44-PM.logInstantiate files in progress.Instantiate files successful……………………………………………
49% Done.Saving cluster inventory in progress……………………………………………
83% Done.Saving cluster inventory successful.The Cluster Node Addition of
/oracle/app/12.2.0/grid was successful.Please check
‘/oracle/app/12.2.0/grid/inventory/silentInstall2018-04-16_2-23-43-PM.log’ for
more details.Setup Oracle Base in progress.Setup Oracle Base successful……………………………………………
90% Done.Update Inventory in progress.Update Inventory successful……………………………………………
97% Done.As a root user, execute the following
script(s):1. /oracle/app/12.2.0/grid/root.shExecute /oracle/app/12.2.0/grid/root.sh on
the following nodes:[jsbp242305]The scripts can be executed in parallel on
all the nodes……………………………………………
100% Done.Successfully Setup Software.按照提示,用root在添加的节点上跑下面的脚本:/oracle/app/12.2.0/grid/root.sh修改$ORACLE_HOME/network/admin/samples权限:[grid@jsbp242305 admin]$ chmod 750 samples6.Run the Grid_home/root.sh script on the
node3 as root and run the subsequent script, as instructed.用root用户,按照提示,运行Grid_home/root.sh。提示:如果上面跑过root.sh,那么不用运行了。再次检查加入的节点是否有问题:$ cluvfy stage -post nodeadd -n jsbp242305
[-verbose]将resolve文件改回来:[root@jsbp242306 ~]# mv
/etc/resolv.conf.bak /etc/resolv.conf[root@jsbp242305 ~]# mv
/etc/resolv.conf.bak /etc/resolv.conf提示:如果是administrator-managed Oracle RAC
database,那么可能需要用dbca来增加数据库实例。

附录12.2官方文档:
删节点: 7.2.2 Deleting a Cluster Node on Linux and UNIX Systems
Delete a node from a cluster on Linux and UNIX systems.
Note:
You can remove the Oracle RAC database instance from the node before removing the node from the cluster but this step is not required. If you do not remove the instance, then the instance is still configured but never runs. Deleting a node from a cluster does not remove a node’s configuration information from the cluster. The residual configuration information does not interfere with the operation of the cluster.
See Also:Oracle Real Application Clusters Administration and Deployment Guide for more information about deleting an Oracle RAC database instance
If you delete the last node of a cluster that is serviced by GNS, then you must delete the entries for that cluster from GNS.
If you have nodes in the cluster that are unpinned, then Oracle Clusterware ignores those nodes after a time and there is no need for you to remove them.
If one creates node-specific configuration for a node (such as disabling a service on a specific node, or adding the node to the candidate list for a server pool) that node-specific configuration is not removed when the node is deleted from the cluster. Such node-specific configuration must be removed manually.
Voting files are automatically backed up in OCR after any changes you make to the cluster.
When you want to delete a Leaf Node from an Oracle Flex Cluster, you need only complete steps 1 through 4 of this procedure.
To delete a node from a cluster:
Ensure that Grid_home correctly specifies the full directory path for the Oracle Clusterware home on each node, where Grid_home is the location of the installed Oracle Clusterware software.
Run the following command as either root or the user that installed Oracle Clusterware to determine whether the node you want to delete is active and whether it is pinned: $ olsnodes -s -t
If the node is pinned, then run the crsctl unpin css command. Otherwise, proceed to the next step.
On the node that you are deleting, depending on whether you have a shared or local Oracle home, complete one of the following procedures as the user that installed Oracle Clusterware:
For a local home, deinstall the Oracle Clusterware home from the node that you want to delete, as follows, by running the following command, where Grid_home is the path defined for the Oracle Clusterware home: $ Grid_home/deinstall/deinstall -local
Caution:
If you do not specify the -local flag, then the command removes the Oracle Grid Infrastructure home from every node in the cluster.
If you cut and paste the preceding command, then paste it into a text editor before pasting it to the command line to remove any formatting this document might contain.
If you have a shared home, then run the following commands in the following order on the node you want to delete.
Run the following command to deconfigure Oracle Clusterware: $ Grid_home/crs/install/rootcrs.sh -deconfig -force
Run the following command from the Grid_home/oui/bin directory to detach the Grid home: $ ./runInstaller -detachHome ORACLE_HOME=Grid_home -silent -local
Manually delete any configuration files, as prompted by the installation utility.
From any node that you are not deleting, run the following command from the Grid_home/bin directory as root to delete the node from the cluster: # crsctl delete node -n node_to_be_deleted
Run the following CVU command to verify that the specified nodes have been successfully deleted from the cluster: $ cluvfy stage -post nodedel -n node_list [-verbose]
If you remove a cluster node on which Oracle Clusterware is down, then determine whether the VIP for the deleted node still exists, as follows: $ srvctl config vip -node deleted_node_name
If the VIP still exists, then delete it, as follows: $ srvctl stop vip -node deleted_node_name
$ srvctl remove vip -vip deleted_vip_name
增加节点:
There are three methods you can use to add a node to your cluster.
Using Rapid Home Provisioning to Add a Node
If you have a Rapid Home Provisioning Server, then you can use Rapid Home Provisioning to add a node to a cluster with one command, as shown in the following example:
The preceding example adds a node named clientnode2 with VIP clientnode2-vip to the Rapid Home Provisioning Client named rhpclient, using root credentials (login for the node you are adding).
Using Oracle Grid Infrastructure Installer to Add a Node
If you do you not want to use Rapid Home Provisioning to add a node to the cluster, then you can use the Oracle Grid Infrastructure installer to accomplish the task.
To add a node to the cluster using the Oracle Grid Infrastructure installer
Run ./gridsetup.sh to start the installer.
On the Select Configuration Option page, select Add more nodes to the cluster.
On the Cluster Node Information page, click Add… to provide information for nodes you want to add.
When the verification process finishes on the Perform Prerequisite Checks page, check the summary and then click Install.
Using addnode.sh to Add Nodes
This procedure assumes that:
There is an existing cluster with two nodes named node1 and node2
You are adding a node named node3 using a virtual node name, node3-vip, that resolves to an IP address, if you are not using DHCP and Grid Naming Service (GNS)
You have successfully installed Oracle Clusterware on node1 and node2 in a local (non-shared) home, where Grid_home represents the successfully installed home
To add a node:
Ensure that you have successfully installed Oracle Clusterware on at least one node in your cluster environment. To perform the following procedure, Grid_home must identify your successfully installed Oracle Clusterware home.
See Also: Oracle Grid Infrastructure Installation and Upgrade Guide for Oracle Clusterware installation instructions
Verify the integrity of the cluster and node3:
You can specify the -fixup option to attempt to fix the cluster or node if the verification fails.
To extend the Oracle Grid Infrastructure home to the node3, navigate to the Grid_home/addnode directory on node1 and run the addnode.sh script as the user that installed Oracle Clusterware.
To run addnode.sh in interactive mode, run addnode.sh from Grid_home/addnode.
You can also run addnode.sh in silent mode for both Oracle Clusterware standard clusters and Oracle Flex Clusters.
For an Oracle Clusterware standard cluster:
If you are adding node3 to an Oracle Flex Cluster, then you can specify the node role on the command line, as follows:
Notes:
If you are adding node3 to an extended cluster, then you can specify the node role on the command line, as follows:
Hub Nodes always have VIPs but Leaf Nodes may not. If you use the preceding syntax to add multiple nodes to the cluster, then you can use syntax similar to the following, where node3 is a Hub Node and node4 is a Leaf Node:
When you are adding Leaf nodes, only, you do not need to use the CLUSTER_NEW_VIRTUAL_HOSTNAMES parameter. For example:
If prompted, then run the orainstRoot.sh script as root to populate the /etc/oraInst.loc file with the location of the central inventory. For example:
If you have an Oracle RAC or Oracle RAC One Node database configured on the cluster and you have a local Oracle home, then do the following to extend the Oracle database home to node3:
If you have a shared Oracle home that is shared using Oracle Automatic Storage Management Cluster File System (Oracle ACFS), then do the following to extend the Oracle database home to node3:
If you have a shared Oracle home on a shared file system that is not Oracle ACFS, then you must first create a mount point for the Oracle RAC database home on the target node, mount and attach the Oracle RAC database home, and update the Oracle Inventory, as follows:
Note: After running addnode.sh, ensure the Grid_home/network/admin/samples directory has permissions set to 750.
Run the srvctl config database -db db_name command on an existing node in the cluster to obtain the mount point information.
Run the following command as root on node3 to create the mount point:
Mount the file system that hosts the Oracle RAC database home.
Run the following command as the user that installed Oracle RAC from the Oracle_home/oui/bin directory on the node you are adding to add the Oracle RAC database home:
Navigate to the Oracle_home/addnode directory on node1 and run the addnode.sh script as the user that installed Oracle RAC using the following syntax:
Note:
Use the -noCopy option because the Oracle home on the destination node is already fully populated with software.
Run the Grid_home/root.sh script on node3 as root, where Grid_home is the Oracle Grid Infrastructure home.
Run the following command as the user that installed Oracle RAC from the Oracle_home/oui/bin directory on the node you are adding to add the Oracle RAC database home:
Navigate to the Oracle_home/addnode directory on node1 and run the addnode.sh script as the user that installed Oracle RAC using the following syntax:
Note:
Use the -noCopy option because the Oracle home on the destination node is already fully populated with software.
Navigate to the Oracle_home/addnode directory on node1 and run the addnode.sh script as the user that installed Oracle RAC using the following syntax:
Run the Oracle_home/root.sh script on node3 as root, where Oracle_home is the Oracle RAC home.
Run the Grid_home/root.sh script on the node3 as root and run the subsequent script, as instructed.
Note:
If you ran the root.sh script in the step 5, then you do not need to run it again.
If you have a policy-managed database, then you must ensure that the Oracle home is cloned to the new node before you run the root.sh script.
If you have any administrator-managed database instances configured on the nodes which are going to be added to the cluster, then you must extend the Oracle home to the new node before you run the root.sh script.
Alternatively, remove the administrator-managed database instances using the srvctl remove instance command.
Start the Oracle ACFS resource on the new node by running the following command as root from the Grid_home/bin directory:
Note:
Ensure the Oracle ACFS resources, including Oracle ACFS registry resource and Oracle ACFS file system resource where the Oracle home is located, are online on the newly added node.
Run the following CVU command as the user that installed Oracle Clusterware to check cluster integrity. This command verifies that any number of specified nodes has been successfully added to the cluster at the network, shared storage, and clusterware levels:
Check whether either a policy-managed or administrator-managed Oracle RAC database is configured to run on node3 (the newly added node). If you configured an administrator-managed Oracle RAC database, you may need to use DBCA to add an instance to the database to run on this newly added node. 感谢你能够认真阅读完这篇文章,希望小编分享的“oracle12cR2如何增加节点删除节点挽救集群”这篇文章对大家有帮助,同时也希望大家多多支持云技术,关注云技术行业资讯频道,更多相关知识等着你来学习!

相关推荐: 如何使用MySQL周期任务来定时清理在线用户列表

小编给大家分享一下如何使用MySQL周期任务来定时清理在线用户列表,相信大部分人都还不怎么了解,因此分享这篇文章给大家参考一下,希望大家阅读完这篇文章后大有收获,下面让我们一起去了解一下吧!情景设定   客户端为android手机,登录后希望保存其在线状态(s…

文章页内容下
赞(0) 打赏
版权声明:本站采用知识共享、学习交流,不允许用于商业用途;文章由发布者自行承担一切责任,与本站无关。
文章页正文下
文章页评论上

云服务器、web空间可免费试用

宝塔面板主机、支持php,mysql等,SSL部署;安全高速企业专供99.999%稳定,另有高防主机、不限制内容等类型,具体可咨询QQ:360163164,Tel同微信:18905205712

主机选购导航云服务器试用

登录

找回密码

注册