linux下删除oracle集群,oracle 11g rac for linux delete node (11G RAC 节点删除步骤正常+异常情况)...

ROOT 执行:

/u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force

d0d0b873ddff4b5ebc727e9e67231a8a.png

6615e70db6ade534d01f00cda2758d41.png

如果要删除多个节点,需要每个节点执行以上命令。

如果全部删除节点,在最后一个节点执行以下命令:

/u01/app/11.2.0/grid/crs/install/rootcrs.pl -deconfig -force -lastnode

-lastnode只能用于全部删除。

3.2.1.2删除节点(正常和异常都需要执行)

注意:以删除下语句ROOT执行删除节点

crsctl delete node -n node_to_be_deleted

执行:

/u01/app/11.2.0/grid/bin/crsctl delete node -n racdg2

9ef7d204c8f1f321a0dc9c7ae0babd14.png

3.2.1.3更新集群列表(正常实验操作)

Grid安装用户更新集群列表:

Grid_home/oui/bin下:

$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES={node_to_be_deleted}" CRS=TRUE -silent -local

以下语句:

/u01/app/11.2.0/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES={racdg2}" CRS=TRUE -silent -local

2f3159a0d6baefe46deec5e19a848bf3.png

继续后续操作:

注意:

官方文档说的是:

再继续之前,查看 inventory.xml 文件确保该文件没有被更新(官方文档说的有点含糊,个人测试的是节点1的不更新,被删除的那个节点文件更新了),如果节点1被更新了,后续卸载会卸载整个集群安装目录。

more /u01/app/oraInventory/ContentsXML/inventory.xml

节点1:

8d9e9b15f25655c17d87d8cb84aaf41f.png

节点2:

e20987198470318b458e74d4f62540a4.png

卸载GI安装目录

共享目录:

在被删除节点下执行:

$ Grid_home/perl/bin/perl Grid_home/crs/install/rootcrs.pl -deconfig

$ ./runInstaller -detachHome ORACLE_HOME=Grid_home -silent -local

手动删除以下文件:

rm -fr /etc/oraInst.loc

rm -fr /etc/oratab

rm -fr /etc/oracle/

rm -fr /opt/ORCLfmap/

rm -fr /u01/app/oraInventory/

非共享目录(大多数安装都是非共享目录):

$ Grid_home/deinstall/deinstall -local

在任何运行正常,不删除的节点上运行以下命令更新CRS 信息:

Grid_home/oui/bin下:

$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES={remaining_nodes_list}" CRS=TRUE -silent

操作记录如下:

[grid@racdg2 ~]$ /u01/app/11.2.0/grid/deinstall/deinstall -local

Checking for required files and bootstrapping ...

Please wait ...

Location of logs /tmp/deinstall2018-03-02_05-41-36AM/logs/

############ ORACLE DEINSTALL & DECONFIG TOOL START ############

######################### CHECK OPERATION START #########################

## [START] Install check configuration ##

Checking for existence of the Oracle home location /u01/app/11.2.0/grid

Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Cluster

Oracle Base selected for deinstall is: /u01/app/grid

Checking for existence of central inventory location /u01/app/oraInventory

Checking for existence of the Oracle Grid Infrastructure home

The following nodes are part of this cluster: racdg2

Checking for sufficient temp space availability on node(s) : 'racdg2'

## [END] Install check configuration ##

Traces log file: /tmp/deinstall2018-03-02_05-41-36AM/logs//crsdc.log

Enter an address or the name of the virtual IP used on node "racdg2"[racdg2-vip]

>  以下都是回车

The following information can be collected by running "/sbin/ifconfig -a" on node "racdg2"

Enter the IP netmask of Virtual IP "172.16.10.223" on node "racdg2"[255.255.255.0]

>

Enter the network interface name on which the virtual IP address "172.16.10.223" is active

>

Enter an address or the name of the virtual IP[]

>

Network Configuration check config START

Network de-configuration trace file location: /tmp/deinstall2018-03-02_05-41-36AM/logs/netdc_check2018-03-02_05-43-22-AM.log

Specify all RAC listeners (do not include SCAN listener) that are to be de-configured [LISTENER,LISTENER_SCAN1]:

Network Configuration check config END

Asm Check Configuration START

ASM de-configuration trace file location: /tmp/deinstall2018-03-02_05-41-36AM/logs/asmcadc_check2018-03-02_05-43-34-AM.log

######################### CHECK OPERATION END #########################

####################### CHECK OPERATION SUMMARY #######################

Oracle Grid Infrastructure Home is:

The cluster node(s) on which the Oracle home deinstallation will be performed are:racdg2

Since -local option has been specified, the Oracle home will be deinstalled only on the local node, 'racdg2', and the global configuration will be removed.

Oracle Home selected for deinstall is: /u01/app/11.2.0/grid

Inventory Location where the Oracle home registered is: /u01/app/oraInventory

Following RAC listener(s) will be de-configured: LISTENER,LISTENER_SCAN1

Option -local will not modify any ASM configuration.

Do you want to continue (y - yes, n - no)? [n]:y 继续 ,不修改ASM 配置

A log of this session will be written to: '/tmp/deinstall2018-03-02_05-41-36AM/logs/deinstall_deconfig2018-03-02_05-41-43-AM.out'

Any error messages from this session will be written to: '/tmp/deinstall2018-03-02_05-41-36AM/logs/deinstall_deconfig2018-03-02_05-41-43-AM.err'

######################## CLEAN OPERATION START ########################

ASM de-configuration trace file location: /tmp/deinstall2018-03-02_05-41-36AM/logs/asmcadc_clean2018-03-02_05-44-28-AM.log

ASM Clean Configuration END

Network Configuration clean config START

Network de-configuration trace file location: /tmp/deinstall2018-03-02_05-41-36AM/logs/netdc_clean2018-03-02_05-44-28-AM.log

De-configuring RAC listener(s): LISTENER,LISTENER_SCAN1

De-configuring listener: LISTENER

Stopping listener on node "racdg2": LISTENER

Warning: Failed to stop listener. Listener may not be running.

Listener de-configured successfully.

De-configuring listener: LISTENER_SCAN1

Stopping listener on node "racdg2": LISTENER_SCAN1

Warning: Failed to stop listener. Listener may not be running.

Listener de-configured successfully.

De-configuring Naming Methods configuration file...

Naming Methods configuration file de-configured successfully.

De-configuring backup files...

Backup files de-configured successfully.

The network configuration has been cleaned up successfully.

Network Configuration clean config END

---------------------------------------->

The deconfig command below can be executed in parallel on all the remote nodes. Execute the command on  the local node after the execution completes on all the remote nodes.

Run the following command as the root user or the administrator on node "racdg2".

/tmp/deinstall2018-03-02_05-41-36AM/perl/bin/perl -I/tmp/deinstall2018-03-02_05-41-36AM/perl/lib -I/tmp/deinstall2018-03-02_05-41-36AM/crs/install /tmp/deinstall2018-03-02_05-41-36AM/crs/install/rootcrs.pl -force  -deconfig -paramfile "/tmp/deinstall2018-03-02_05-41-36AM/response/deinstall_Ora11g_gridinfrahome1.rsp"

Press Enter after you finish running the above commands

Remove the directory: /tmp/deinstall2018-03-02_05-41-36AM on node:

Setting the force flag to false

Setting the force flag to cleanup the Oracle Base

Oracle Universal Installer clean START

Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node : Done

Delete directory '/u01/app/11.2.0/grid' on the local node : Done

Delete directory '/u01/app/oraInventory' on the local node : Done

Delete directory '/u01/app/grid' on the local node : Done

Oracle Universal Installer cleanup was successful.

Oracle Universal Installer clean END

## [START] Oracle install clean ##

Clean install operation removing temporary directory '/tmp/deinstall2018-03-02_05-41-36AM' on node 'racdg2'

## [END] Oracle install clean ##

######################### CLEAN OPERATION END #########################

####################### CLEAN OPERATION SUMMARY #######################

Following RAC listener(s) were de-configured successfully: LISTENER,LISTENER_SCAN1

Oracle Clusterware is stopped and successfully de-configured on node "racdg2"

Oracle Clusterware is stopped and de-configured successfully.

Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the local node.

Successfully deleted directory '/u01/app/11.2.0/grid' on the local node.

Successfully deleted directory '/u01/app/oraInventory' on the local node.

Successfully deleted directory '/u01/app/grid' on the local node.

Oracle Universal Installer cleanup was successful.

Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'racdg2' at the end of the session.

Run 'rm -rf /opt/ORCLfmap' as root on node(s) 'racdg2' at the end of the session.

Run 'rm -rf /etc/oratab' as root on node(s) 'racdg2' at the end of the session.

Oracle deinstall tool successfully cleaned up temporary directories.

#######################################################################

############# ORACLE DEINSTALL & DECONFIG TOOL END #############

执行脚本语句:

540ee49c97e43b4bd23a93ed239a1539.png

完成后的图:

a2ff1614776049be75946f559c0aef0d.png

例如所有保留的节点上grid执行以下命令:

$ ./runInstaller -updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES=

{rac1,rac3……}" CRS=TRUE -silent

/u01/app/11.2.0/grid/oui/bin/runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=

{racdg1}" CRS=TRUE -silent

9eb4f2cc7c7127335a2e7fd4c4af97a6.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值