Recently, i was installing 11g grid infrastructure on Oracle Enterprise Linux 5 and due to some reason i have to remove that installation from server and start a fresh installation. This installation was for migrating a existing database to ASM. Following are the process which are active on server after completing the grid infrastructure installation first time. These process are related to ASM only.
[root@NODE1 ~]# ps -ef|grep grid grid 3890 1 0 06:27 ? 00:00:02 /u01/app/grid/product/11.2.0/grid/bin/ohasd.bin reboot grid 4444 1 0 06:28 ? 00:00:05 /u01/app/grid/product/11.2.0/grid/bin/oraagent.bin grid 4457 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/tnslsnr LISTENER -inherit grid 4469 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/evmd.bin grid 4476 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/cssdagent grid 4501 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/ocssd.bin grid 4523 4469 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/evmlogger.bin -o /u01/app/grid/product/11.2.0/grid/evm/log/evmlogger.info -l /u01/app/grid/product/11.2.0/grid/evm/log/evmlogger.log grid 4586 1 0 06:29 ? 00:00:00 asm_pmon_+ASM grid 4588 1 0 06:29 ? 00:00:00 asm_psp0_+ASM grid 4590 1 0 06:29 ? 00:00:09 asm_vktm_+ASM grid 4594 1 0 06:29 ? 00:00:00 asm_gen0_+ASM grid 4596 1 0 06:29 ? 00:00:00 asm_diag_+ASM grid 4598 1 0 06:29 ? 00:00:01 asm_dia0_+ASM grid 4600 1 0 06:29 ? 00:00:00 asm_mman_+ASM grid 4602 1 0 06:29 ? 00:00:00 asm_dbw0_+ASM grid 4604 1 0 06:29 ? 00:00:00 asm_lgwr_+ASM grid 4606 1 0 06:29 ? 00:00:00 asm_ckpt_+ASM grid 4608 1 0 06:29 ? 00:00:00 asm_smon_+ASM grid 4610 1 0 06:29 ? 00:00:00 asm_rbal_+ASM grid 4612 1 0 06:29 ? 00:00:00 asm_gmon_+ASM grid 4614 1 0 06:29 ? 00:00:00 asm_mmon_+ASM grid 4616 1 0 06:29 ? 00:00:00 asm_mmnl_+ASM grid 4618 1 0 06:29 ? 00:00:00 oracle+ASM (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=beq))) root 4851 4810 0 07:05 pts/2 00:00:00 grep grid
Database server is already down on this server. Now, i want to remove above grid infrastructure installation. First, of all shutdown the ASM instance which was created during the earlier installation. Remember that DB is still not migrated to ASM.
SQL> conn sys as sysasm Enter password: Connected. SQL> shutdown immediate; ORA-15100: invalid or missing diskgroup name ASM instance shutdown SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Automatic Storage Management option
After shutting down the ASM instance, only the below process exists on server.
[grid@NODE1 grid]$ ps -ef|grep grid grid 3890 1 0 06:27 ? 00:00:03 /u01/app/grid/product/11.2.0/grid/bin/ohasd.bin reboot grid 4444 1 0 06:28 ? 00:00:05 /u01/app/grid/product/11.2.0/grid/bin/oraagent.bin grid 4457 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/tnslsnr LISTENER -inherit grid 4469 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/evmd.bin grid 4476 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/cssdagent grid 4501 1 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/ocssd.bin grid 4523 4469 0 06:28 ? 00:00:00 /u01/app/grid/product/11.2.0/grid/bin/evmlogger.bin -o /u01/app/grid/product/11.2.0/grid/evm/log/evmlogger.info -l /u01/app/grid/product/11.2.0/grid/evm/log/evmlogger.log root 4854 4810 0 07:05 pts/2 00:00:00 su - grid grid 4855 4854 0 07:05 pts/2 00:00:00 -bash grid 4894 4855 0 07:06 pts/2 00:00:00 ps -ef grid 4895 4855 0 07:06 pts/2 00:00:00 grep grid
To remove these process gracefully, follow the steps as below.
[grid@NODE1 deinstall]$ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /u01/app/oraInventory/logs/ ############ ORACLE DEINSTALL & DECONFIG TOOL START ############ ######################### CHECK OPERATION START ######################### ## [START] Install check configuration ## Checking for existence of the Oracle home location /u01/app/grid/product/11.2.0/grid Oracle Home type selected for deinstall is: Oracle Grid Infrastructure for a Standalone Server 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 /u01/app/grid/product/11.2.0/grid Checking for sufficient temp space availability on node(s) : 'NODE1' ## [END] Install check configuration ## Traces log file: /u01/app/oraInventory/logs//crsdc.log Network Configuration check config START Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_check2013-04-23_07-11-27-AM.log Specify all Oracle Restart enabled listeners that are to be de-configured [LISTENER]: Network Configuration check config END Asm Check Configuration START ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_check2013-04-23_07-11-54-AM.log Specify the ASM Diagnostic Destination [ ]: Specify the diskstring [/dev/oracleasm/disks/*]: Specify the diskgroups that are managed by this ASM instance []: ######################### CHECK OPERATION END ######################### ####################### CHECK OPERATION SUMMARY ####################### Oracle Grid Infrastructure Home is: /u01/app/grid/product/11.2.0/grid The cluster node(s) on which the Oracle home deinstallation will be performed are:null Oracle Home selected for deinstall is: /u01/app/grid/product/11.2.0/grid Inventory Location where the Oracle home registered is: /u01/app/oraInventory Following Oracle Restart enabled listener(s) will be de-configured: LISTENER 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: '/u01/app/oraInventory/logs/deinstall_deconfig2013-04-23_07-11-25-AM.out' Any error messages from this session will be written to: '/u01/app/oraInventory/logs/deinstall_deconfig2013-04-23_07-11-25-AM.err' ######################## CLEAN OPERATION START ######################## ASM de-configuration trace file location: /u01/app/oraInventory/logs/asmcadc_clean2013-04-23_07-12-21-AM.log ASM Clean Configuration START ASM Clean Configuration END Network Configuration clean config START Network de-configuration trace file location: /u01/app/oraInventory/logs/netdc_clean2013-04-23_07-12-25-AM.log De-configuring Oracle Restart enabled listener(s): LISTENER De-configuring listener: LISTENER Stopping listener: LISTENER Listener stopped successfully. Unregistering listener: LISTENER Listener unregistered successfully. Deleting listener: LISTENER Listener deleted successfully. Listener de-configured successfully. De-configuring Listener configuration file... Listener configuration file 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 ----------------------------------------> Run the following command as the root user or the administrator on node "node1". /tmp/deinstall2013-04-23_07-10-54AM/perl/bin/perl -I/tmp/deinstall2013-04-23_07-10-54AM/perl/lib -I/tmp/deinstall2013-04-23_07-10-54AM/crs/install /tmp/deinstall2013-04-23_07-10-54AM/crs/install/roothas.pl -force -deconfig -paramfile "/tmp/deinstall2013-04-23_07-10-54AM/response/deinstall_Ora11g_gridinfrahome1.rsp" Press Enter after you finish running the above commands <----------------------------------------
Once the above command is run from “root” user in another terminal, press enter. Following are logs from running above command.
[root@NODE1 ~]# /tmp/deinstall2013-04-23_07-10-54AM/perl/bin/perl -I/tmp/deinstall2013-04-23_07-10-54AM/perl/lib -I/tmp/deinstall2013-04-23_07-10-54AM/crs/install /tmp/deinstall2013-04-23_07-10-54AM/crs/install/roothas.pl -force -deconfig -paramfile "/tmp/deinstall2013-04-23_07-10-54AM/response/deinstall_Ora11g_gridinfrahome1.rsp" Using configuration parameter file: /tmp/deinstall2013-04-23_07-10-54AM/response/deinstall_Ora11g_gridinfrahome1.rsp PRKO-2573 : ONS daemon is already stopped. CRS-2673: Attempting to stop 'ora.cssd' on 'node1' CRS-2677: Stop of 'ora.cssd' on 'node1' succeeded CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node1' CRS-2673: Attempting to stop 'ora.evmd' on 'node1' CRS-2677: Stop of 'ora.evmd' on 'node1' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node1' has completed CRS-4133: Oracle High Availability Services has been stopped. Successfully deconfigured Oracle Restart stack [root@NODE1 ~]#
The above command will stop the remaining services. Now, press enter in first terminal and following logs are continuation from the first one.
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/grid/product/11.2.0/grid' from the central inventory on the local node : Done Delete directory '/u01/app/grid/product/11.2.0/grid' on the local node : Done The Oracle Base directory '/u01/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 ## Clean install operation removing temporary directory '/tmp/deinstall2013-04-23_07-10-54AM' on node 'NODE1' ## [END] Oracle install clean ## ######################### CLEAN OPERATION END ######################### ####################### CLEAN OPERATION SUMMARY ####################### ASM instance was de-configured successfully from the Oracle home Following Oracle Restart enabled listener(s) were de-configured successfully: LISTENER Oracle Restart was already stopped and de-configured on node "node1" Oracle Restart is stopped and de-configured successfully. Successfully detached Oracle home '/u01/app/grid/product/11.2.0/grid' from the central inventory on the local node. Successfully deleted directory '/u01/app/grid/product/11.2.0/grid' on the local node. Oracle Universal Installer cleanup was successful. Oracle deinstall tool successfully cleaned up temporary directories. ####################################################################### ############# ORACLE DEINSTALL & DECONFIG TOOL END #############
Above process is for deinstalling the grid infrastructure gracefully. In case this is not working for you and want to remove all the things forcefully by just deleting the directories from OS, then in that case, it’s a bit pain to remove all the files having information of old installation. I found a good link to manually clean up the installation. Please found link here.
Happy deinstallation 😉