暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

oracle 19c rac节点新增、删除、重新加入操作 实验

原创 四九年入国军 2024-09-26
601

一、rac某个节点文件丢失,重新加入

1、问题重现

   节点2由于误操作导致/u01下面的目录被删除,现需要清理节点2后重新加入集群

      

   --登录节点2在不停止集群的情况下模拟

   cd /u01/

   rm -rf *

    --重启节点2,释放资源

--为了保障业务运行,节点1始终不重启

2、清理、初始化异常节点

 

--登录节点2清理以下文件,否则后面会提示【INS-40915】

rm  -rf /etc/oratab

rm  -rf /etc/oracle*

rm  -rf /etc/oraInst*

--创建GRIDoracle目录

mkdir -p /u01/app/grid

mkdir -p /u01/app/19.0.0/grid

chown -R  grid:oinstall /u01

chmod -R 775 /u01

mkdir -p /u01/app/oracle

chown oracle:oinstall /u01/app/oracle

su – oracle

mkdir -p /u01/app/oracle/product/19.0.0/db_1

 

--正常节点1删除异常节点2的信息

su - grid

su root

srvctl stop vip -vip rac2-vip

srvctl remove vip -vip rac2-vip

srvctl remove instance -d orcl -i orcl2

crsctl delete node -n rac2

3、正常节点更新集群信息

--更新grid组件信息

--操作命令:

su – grid

cd $ORACLE_HOME/oui/bin/

./runInstaller -updateNodeList ORACLE_HOME=/u01/app/19.0.0/grid "CLUSTER_NODES={rac1}"

 

 

--更新oracle(rdbms)组件信息

--操作命令:

su – oracle

cd $ORACLE_HOME/oui/bin/

./runInstaller -updateNodeList ORACLE_HOME=/u01/app/oracle/product/19.0.0/db_1 "CLUSTER_NODES={rac1}"

 

4、正常节点在线推送安装远端节点

1、Grid组件在线推送安装

su - grid

cd $ORACLE_HOME/addnode

./addnode.sh -silent -ignoreSysPrereqs -ignorePrereqFailure "CLUSTER_NEW_NODES={rac2}" "CLUSTER_NEW_PRIVATE_NODE_NAMES={rac2-priv}" "CLUSTER_NEW_VIRTUAL_HOSTNAMES={rac2-vip}"

 

 

--输出信息提示

--告警可忽略 

 CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/addNodeActions2020-11-05_11-21-13AM.log

   ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/addNodeActions2020-11-05_11-21-13AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

 

Copy Files to Remote Nodes in progress.

..................................................   6% Done.

..................................................   11% Done.

....................

--按提示执行脚本

 

As a root user, execute the following script(s):

  1. /u01/app/oraInventory/orainstRoot.sh

  2. /u01/app/19.0.0/grid/root.sh

 

Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:

[rac2]

Execute /u01/app/19.0.0/grid/root.sh on the following nodes:

[rac2]

 

The scripts can be executed in parallel on all the nodes.

 

Successfully Setup Software with warning(s).

..................................................   100% Done.

2、Oracle组件在线推送安装

su - oracle

cd $ORACLE_HOME/addnode

./addnode.sh -silent -ignoreSysPrereqs -ignorePrereqFailure "CLUSTER_NEW_NODES={rac2}"

 

--告警忽略

[WARNING] [INS-13013] Target environment does not meet some mandatory requirements.

   CAUSE: Some of the mandatory prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/addNodeActions2020-11-05_11-44-31AM.log

   ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/addNodeActions2020-11-05_11-44-31AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.

 

 

Setup Oracle Base successful.

..................................................   96% Done.

--记得执行脚本

As a root user, execute the following script(s):

  1. /u01/app/oracle/product/19.0.0/db_1/root.sh

 

Execute /u01/app/oracle/product/19.0.0/db_1/root.sh on the following nodes:

[rac2]

 

 

Successfully Setup Software with warning(s).

..................................................   100% Done.

 

 

5、正常节点为新添加节点创建实例

--在节点1,也就是正常的那个节点操作:

--不是异常节点

su  - oracle

dbca -silent -addInstance -gdbName "orcl" -nodeName "rac2" -instanceName "orcl2" -sysDBAUserName "sys" -sysDBAPassword "oracle"

 

至此,异常数据库节点的删除、重新添加完成。

 

「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论