Reconfiguring and uninstalling 11gR2 Grid Infrastructure Oracle 11g R2 Grid Infrastructure provides more flexibility than the previous version. If you run root. sh before installing Grid Infrastructure, errors often occur and you need to fix the errors to continue. In this version, we can re-configure the Grid Infrastructure by executing the script rootcrs. pl without first uninstalling the Grid Infrastructure, and then re-installing it after fixing the fault. The following describes how to use rootcrs. pl and how to use deinstall to thoroughly uninstall Grid Infrastructure. 1. Introduction to rootcrs. pl commands
[Python] # command location: $ GRID_HOME/crs/install # command Description: # This command is mainly used to maintain and manage crs, including patch, upgrade, downgrade, deconfig and so on # perldoc rootcrs. pl executes this command to get a complete introduction [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 prior ig 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 already med To see the full manpage for this program, execute: perldoc rootcrs. pl # execute root. when sh fails, we can use the-deconfig parameter to clear the crs configuration information, fix the fault based on the log or use the patch, and then re-execute the root command. sh # the usage of patch, upgrade, and downgrade of this command is not described in detail.
2. reconfigure Grid Infrastructure and ASM
[Python] # re-configuring Grid Infrastructure does not remove the copied binary file, but only returns to the status before crs configuration. The following is step a. Log On As a root user, and execute the following command (all nodes except the last node) # perl $ GRID_HOME/crs/install/rootcrs. pl-verbose-deconfig-force B. Use the root user to execute the following command on the last node. This command clears the ocr configuration and voting disk # perl $ GRID_HOME/crs/install/rootcrs. pl-verbose-deconfig-force-lastnode c. If an ASM disk is used, continue with the following operations to make the ASM react as a candidate disk (clear all ASM disk groups) # 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
3. Completely Delete Grid Infrastructure
[Python] #11g R2 Grid Infrastructure also provides the function of completely uninstalling. The deinstall command replaces the use of OUI to clear clusterware and ASM and replies to the environment before installing grid. # This command stops the cluster and removes binary files and all related configuration information. # Command location: $ GRID_HOME/deinstall # The following is an example of this command operation. During the operation, you must provide some interactive information, and in the new session, clear some files under/tmp as root [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/de Install [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 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 Gr Id 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 con Fig 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/ Pp/grid ASM Diskgroups: + DATA Diskgroups will be dropped De-processing ing 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: '/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-locking ing Naming Methods configuration file on all nodes... naming Methods configuration file de-configured successfully. de-Authentication ing Local Net Service Names configuration file on all nodes... local Net Service Names configuration file de-configured successfully. de-Authentication ing Directory Usage configuration file on all nodes... directory Usage configuration file de-configured successfully. de-processing ing 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 restart. 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 #############