重新配置与卸载11gR2 Grid Infrastructure

概述
Oracle 11g R2 Grid Infrastructure 的安装与配置较之前的版本提供了更多的灵活性。在Grid Infrastructure安装完毕前执行root.sh经常容易出现错误,并且需要修复该错误才能得以继续。
在这个版本中我们可以直接通过执行脚本rootcrs.pl来重新配置Grid Infrastructure而无需先卸载Grid Infrastructure,然后修复故障后进行再次安装。下面描述了rootcrs.pl的用法以及使用deinstall彻底卸载Grid Infrastructure。
rootcrs.pl命令介绍
#命令位置:$GRID_HOME/crs/install
#命令说明:
#  该命令主要是用于对crs进行维护与管理,包括patch,upgrade,downgrade,deconfig等等
#  perldoc rootcrs.pl执行这个命令获得完整的介绍
[root@linux1 install]# ./rootcrs.pl -h
Unknown option: h
Usage:
      rootcrs.pl [-verbose] [-upgrade | -patch] [-hahome <directory>]
                 [-paramfile <parameter-file>]
                 [-deconfig | -downgrade] [-force] [-lastnode]
                 [-downgrade] [-oldcrshome <old crshome path>] [-version <old crs version>]
                 [-unlock [-crshome <path to crs home>]]
      Options:
       -verbose    Run this script in verbose mode
       -upgrade    Oracle HA is being upgraded from previous version
       -patch      Oracle HA is being upgraded to a patch version
       -hahome     Complete path of Oracle Clusterware home
       -paramfile  Complete path of file specifying HA parameter values
       -lastnode   Force the node this is executing on to be considered the
                   last node of the install and perform actions associated
                   with configurig the last node
       -downgrade  Downgrade the clusterware
       -version    For use with downgrade; special handling is required if
                   downgrading to 9i. This is the old crs version in the format
                   A.B.C.D.E (e.g 11.1.0.6.0).
       -deconfig   Remove Oracle Clusterware to allow it to be uninstalled or reinstalled.
       -force      Force the executon of steps in delete that cannot be verified
                   to be safe
       -unlock     Unlock CRS home
       -crshome    Complete path of crs home. Use with unlock option.
       -oldcrshome For use with downgrade. Complete path of the old crs home.
      If neither -upgrade nor -patch is supplied, a new install is performed
      To see the full manpage for this program, execute:
        perldoc rootcrs.pl
#对于执行root.sh失败时,我们可以通过该命令以-deconfig 参数来清除crs的配置信息,然后根据log修复故障或使用patch之后再重新执行root.sh
#对于该命令的patch,upgrade,downgrade用法再此不作详细介绍
重新配置Grid Infrastructure及ASM
#重新配置Grid Infrastructure并不会移除已经复制的二进制文件,仅仅是回复到配置crs之前的状态,下面是其步骤
a、使用root用户登录,并执行下面的命令(所有节点,但最后一个节点除外)
  # perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force
b、同样使用root用户在最后一个节点执行下面的命令。该命令将清空ocr 配置和voting disk
  # perl $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode
c、如果使用了ASM磁盘,继续下面的操作以使得ASM重新作为候选磁盘(清空所有的ASM磁盘组)
  # dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100
  # /etc/init.d/oracleasm deletedisk DATA /dev/sdb1
  # /etc/init.d/oracleasm createdisk DATA /dev/sdb1
彻底删除Grid Infrastructure
#11g R2 Grid Infrastructure也提供了彻底卸载的功能,deinstall该命令取代了使用OUI方式来清除clusterware以及ASM,回复到安装grid之前的环境。
#该命令将停止集群,移除二进制文件及其相关的所有配置信息。
#命令位置:$GRID_HOME/deinstall
#下面是该命令操作的具体事例,操作期间,需要提供一些交互信息,以及在新的session以root身份清除一些/tmp下的文件
[root@linux1 bin]# ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
[root@linux1 bin]# cd ../deinstall/
[root@linux1 deinstall]# pwd
/u01/app/11.2.0/grid/deinstall
[root@linux1 deinstall]# ./deinstall
You must not be logged in as root to run ./deinstall.
Log in as Oracle user and rerun ./deinstall.
[root@linux1 deinstall]# su grid
[grid@linux1 deinstall]$ ./deinstall
Checking for required files and bootstrapping ...
Please wait ...
Location of logs /tmp/deinstall2013-07-16_05-54-03-PM/logs/
############ ORACLE DEINSTALL & DECONFIG TOOL START ############

######################## CHECK OPERATION START ########################
Install check configuration START
Checking for existence of the Oracle home location /u01/app/11.2.0/grid
Oracle Home type selected for de-install is: CRS
Oracle Base selected for de-install is: /u01/app/grid
Checking for existence of central inventory location /u01/app/oraInventory
Checking for existence of the Oracle Grid Infrastructure home /u01/app/11.2.0/grid
The following nodes are part of this cluster: linux1,linux2
Install check configuration END
Traces log file: /tmp/deinstall2013-07-16_05-54-03-PM/logs//crsdc.log
Network Configuration check config START
Network de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/netdc_check207506844451155733.log
Network Configuration check config END
Asm Check Configuration START
ASM de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/asmcadc_check2698133635629979531.log
ASM configuration was not detected in this Oracle home. Was ASM configured in this Oracle home (y|n) [n]: y
Automatic Storage Management (ASM) instance is detected in this Oracle home /u01/app/11.2.0/grid.
ASM Diagnostic Destination : /u01/app/grid
ASM Diskgroups : +DATA
Diskgroups will be dropped
De-configuring ASM will drop all the diskgroups and it's contents at cleanup time. This will affect all of the databases and ACFS
  that use this ASM instance(s).
 If you want to retain the existing diskgroups or if any of the information detected is incorrect, you can modify by entering 'y'.
 Do you  want to modify above information (y|n) [n]:
######################### CHECK OPERATION END #########################

####################### CHECK OPERATION SUMMARY #######################
Oracle Grid Infrastructure Home is: /u01/app/11.2.0/grid
The cluster node(s) on which the Oracle home exists are: (Please input nodes seperated by ",", eg: node1,node2,...)linux1,linux2
Oracle Home selected for de-install is: /u01/app/11.2.0/grid
Inventory Location where the Oracle home registered is: /u01/app/oraInventory
ASM instance will be de-configured from this Oracle home
Do you want to continue (y - yes, n - no)? [n]: y
A log of this session will be written to: '/tmp/deinstall2013-07-16_05-54-03-PM/logs/deinstall_deconfig2013-07-16_05-54-37-PM.out'
Any error messages from this session will be written to: '/tmp/deinstall2013-07-16_05-54-03-PM/logs/deinstall_deconfig2013-07-16_05-54-37-PM.err'
######################## CLEAN OPERATION START ########################

ASM de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/asmcadc_clean3319637107726750003.log
ASM Clean Configuration START
ASM Clean Configuration END
Network Configuration clean config START
Network de-configuration trace file location: /tmp/deinstall2013-07-16_05-54-03-PM/logs/netdc_clean9055263637610505743.log
De-configuring Naming Methods configuration file on all nodes...
Naming Methods configuration file de-configured successfully.
De-configuring Local Net Service Names configuration file on all nodes...
Local Net Service Names configuration file de-configured successfully.
De-configuring Directory Usage configuration file on all nodes...
Directory Usage configuration file de-configured successfully.
De-configuring backup files on all nodes...
Backup files de-configured successfully.
The network configuration has been cleaned up successfully.
Network Configuration clean config END
---------------------------------------->

Run the following command as the root user or the administrator on node "linux2".
/tmp/deinstall2013-07-16_05-54-03-PM/perl/bin/perl -I/tmp/deinstall2013-07-16_05-54-03-PM/perl/lib
-I/tmp/deinstall2013-07-16_05-54-03-PM/crs/install /tmp/deinstall2013-07-16_05-54-03-PM/crs/install/rootcrs.pl -force
-delete -paramfile /tmp/deinstall2013-07-16_05-54-03-PM/response/deinstall_Ora11g_gridinfrahome1.rsp
Run the following command as the root user or the administrator on node "linux1".
/tmp/deinstall2013-07-16_05-54-03-PM/perl/bin/perl -I/tmp/deinstall2013-07-16_05-54-03-PM/perl/lib
-I/tmp/deinstall2013-07-16_05-54-03-PM/crs/install /tmp/deinstall2013-07-16_05-54-03-PM/crs/install/rootcrs.pl -force
-delete -paramfile /tmp/deinstall2013-07-16_05-54-03-PM/response/deinstall_Ora11g_gridinfrahome1.rsp -lastnode
Press Enter after you finish running the above commands
<----------------------------------------
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
Detach Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'linux2' : Done
Delete directory '/u01/app/11.2.0/grid' on the remote nodes 'linux2' : Done
Delete directory '/u01/app/oraInventory' on the remote nodes 'linux2' : Done
Delete directory '/u01/app/grid' on the remote nodes 'linux2' : Done
Oracle Universal Installer cleanup was successful.
Oracle Universal Installer clean END
Oracle install clean START
Clean install operation removing temporary directory '/tmp/install' on node 'linux1'
Clean install operation removing temporary directory '/tmp/install' on node 'linux2'
Oracle install clean END
######################### CLEAN OPERATION END #########################

####################### CLEAN OPERATION SUMMARY #######################
ASM instance was de-configured successfully from the Oracle home
Oracle Clusterware is stopped and successfully de-configured on node "linux2"
Oracle Clusterware is stopped and successfully de-configured on node "linux1"
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.
Successfully detached Oracle home '/u01/app/11.2.0/grid' from the central inventory on the remote nodes 'linux2'.
Successfully deleted directory '/u01/app/11.2.0/grid' on the remote nodes 'linux2'.
Successfully deleted directory '/u01/app/oraInventory' on the remote nodes 'linux2'.
Successfully deleted directory '/u01/app/grid' on the remote nodes 'linux2'.
Oracle Universal Installer cleanup was successful.
Run 'rm -rf /etc/oraInst.loc' as root on node(s) 'linux1,linux2' at the end of the session.
Oracle install successfully cleaned up the temporary directories.
#######################################################################

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

参考至:http://www.2cto.com/database/201307/228731.html

如有错误,欢迎指正

邮箱:czmcj@163.com

作者:czmmiao  文章出处:http://czmmiao.iteye.com/blog/2126916

时间: 2024-11-02 17:51:39

重新配置与卸载11gR2 Grid Infrastructure的相关文章

重新配置与卸载 11gR2 Grid Infrastructure

      Oracle 11g R2 Grid Infrastructure 的安装与配置较之前的版本提供了更多的灵活性.在Grid Infrastructure安装完毕前执行root.sh经常容易出现错误,并且需要修复该错误才能得以继续.在这个版本中我们可以直接通过执行脚本rootcrs.pl来重新配置Grid Infrastructure而无需先卸载Grid Infrastructure,然后修复故障后进行再次安装.下面描述了rootcrs.pl的用法以及使用deinstall彻底卸载Gr

诊断 Grid Infrastructure 启动问题 (文档 ID 1623340.1)

诊断 Grid Infrastructure 启动问题 (文档 ID 1623340.1) 文档内容 用途   适用范围   详细信息   启动顺序:   集群状态   问题 1: OHASD 无法启动   问题 2: OHASD Agents  未启动   问题 3: OCSSD.BIN 无法启动   问题 4: CRSD.BIN 无法启动   问题 5: GPNPD.BIN 无法启动   问题 6: 其它的一些守护进程无法启动   问题 7: CRSD Agents 无法启动   问题 8:

Grid Infrastructure 启动的五大问题 (文档 ID 1526147.1)

文档内容 用途   适用范围   详细信息   问题 1:CRS-4639:无法连接 Oracle 高可用性服务,ohasd.bin 未运行或 ohasd.bin 虽在运行但无 init.ohasd 或其他进程   问题 2:CRS-4530:联系集群同步服务守护进程时出现通信故障,ocssd.bin 未运行   问题 3:CRS-4535:无法与集群就绪服务通信,crsd.bin 未运行   问题 4:Agent 或者 mdnsd.bin, gpnpd.bin, gipcd.bin 未运行  

【RAC】How to Troubleshoot Grid Infrastructure Startup Issues [ID 1050908.1]

Applies to: Oracle Server – Enterprise Edition – Version: 11.2.0.1 and later   [Release: 11.2 and later ] Information in this document applies to any platform. Goal This goal of the note is to provide reference to troubleshoot 11gR2 Grid Infrastructu

11.2.0.1 Grid Infrastructure Installation Failed at Second Nodes While Running root.sh

  11.2.0.1 Grid Infrastructure Installation Failed at Second Nodes While Running root.sh Due To ASM Crash Caused by lmon Timeout [ID 1239123.1] --------------------------------------------------------------------------------     修改时间 06-JAN-2011    

【MOS】Top 5 Grid Infrastructure Startup Issues (文档 ID 1368382.1)

 Top 5 Grid Infrastructure Startup Issues (文档 ID 1368382.1) In this Document Purpose Scope Details   Issue #1: CRS-4639: Could not contact Oracle High Availability Services, ohasd.bin not running or ohasd.bin is running but no init.ohasd or other pro

Oracle grid infrastructure 卸载 grid卸载

grid执行 [grid@doudou-32bit ~]$ cd /u01/app/11.2.0/grid/deinstall/ [grid@doudou-32bit deinstall]$ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /u01/app/oraInventory/logs/ ############ ORACLE DEINSTALL &

【安装】AIX安装单实例11gR2 GRID+DB

[安装]AIX安装单实例11gR2 GRID+DB   1.1  BLOG文档结构图       1.2  前言部分   1.2.1  导读和注意事项 各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~: ① 基于aix安装11gR2的grid和db软件(重点) ② 静默安装     Tips:        ① 若文章代码格式有错乱,推荐使用QQ.搜狗或360浏览器,也可以下载pdf格式的文档来查看,pdf文档下载地址:http://yun

为11.2.0.2 Grid Infrastructure添加节点

转自:http://www.askmaclean.com/archives/add-node-to-11-2-0-2-grid-infrastructure.html 在之前的文章中我介绍了为10g RAC Cluster添加节点的具体步骤.在11gr2中Oracle CRS升级为Grid Infrastructure,通过GI我们可以更方便地控制CRS资源如:VIP.ASM等等,这也导致了在为11.2中的GI添加节点时,同10gr2相比有着较大的差异. 这里我们要简述在11.2中为GI ADD