Cleanup a failed 12.2 GRID installation

Cleanup GRID resources and directories

Log in as the root user on a node where you encountered an error.
Change directory to Grid_home/crs/install. For example:
Run rootcrs.sh with the -deconfig and -force flags. For example:

[root@dsctw21 ~]# export GRID_HOME=/u01/app/122/grid
[root@dsctw22 ~]# $GRID_HOME/crs/install/rootcrs.sh -verbose -deconfig -force

Repeat on other nodes as required.
If you are deconfiguring Oracle Clusterware on all nodes in the cluster, then on the last node, enter the following command:

[root@dsctw21 ~]# export GRID_HOME=/u01/app/122/grid
[root@dsctw21 ~]# $GRID_HOME/crs/install/rootcrs.sh -verbose -deconfig -force -lastnode

The -lastnode flag completes deconfiguration of the cluster, including the OCR and voting files.

Current Settings
ORACLE_BASE=/u01/app/grid
ORACLE_HOME=/u01/app/122/grid

Remove oraInventory Files
[root@dsctw21 oraInventory]# rm -rf  /u01/app/oraInventory/*

Remove Files from ORACLE_BASE, ORACLE_HOME
[root@dsctw21 ~]# rm -rf /u01/app/grid/*
[root@dsctw21 ~]# rm -rf /u01/app/122/grid/*

Remove above files/directories on the 2.nd node too !

[root@dsctw21 grid]# chown  grid:oinstall /u01/app/122/grid
[root@dsctw21 grid]# chown  grid:oinstall /u01/app/grid
[root@dsctw21 grid]# chown  grid:oinstall /u01/app/oraInventory/

[root@dsctw22 oraInventory]# chown  grid:oinstall /u01/app/122/grid
[root@dsctw22 oraInventory]# chown  grid:oinstall /u01/app/grid
[root@dsctw22 oraInventory]# chown  grid:oinstall /u01/app/oraInventory/

Verify directories
[root@dsctw21 ~]# ls  -lasi /u01/app/122/grid
total 0
33595586 0 drwxr-xr-x. 2 grid oinstall  6 May  4 15:49 .
50331840 0 drwxr-xr-x. 3 root oinstall 17 May  4 15:49 ..
[root@dsctw22 ~]#  ls  -lasi /u01/app/122/grid
total 0
33595586 0 drwxr-xr-x. 2 grid oinstall  6 May  4 15:49 .
50331840 0 drwxr-xr-x. 3 root oinstall 17 May  4 15:49 ..
.....

Cleanup our ASM Disks

On Node 1 run 
[root@dsctw21 ~]# ./cleanupASM_Disks.sh
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 
..
brw-rw----. 1 root disk     8,   0 May  5 07:36 /dev/sda
brw-rw----. 1 root disk     8,   1 May  5 07:36 /dev/sda1
brw-rw----. 1 root disk     8,   2 May  5 07:36 /dev/sda2
brw-rw----. 1 grid asmadmin 8,  16 May  5 08:21 /dev/sdb
brw-rw----. 1 grid asmadmin 8,  32 May  5 08:21 /dev/sdc
brw-rw----. 1 grid asmadmin 8,  48 May  5 08:21 /dev/sdd
brw-rw----. 1 grid asmadmin 8,  64 May  5 08:21 /dev/sde
brw-rw----. 1 grid asmadmin 8,  80 May  5 08:21 /dev/sdf
brw-rw----. 1 grid asmadmin 8,  96 May  5 08:21 /dev/sdg
brw-rw----. 1 grid asmadmin 8, 112 May  5 08:21 /dev/sdh
brw-rw----. 1 root disk     8, 128 May  5 07:36 /dev/sdi
brw-rw----. 1 root disk     8, 129 May  5 07:36 /dev/sdi1

On Node 2 just run 
[root@dsctw22 ~]# ./modifyASM_Disks.sh
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sdb: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags: 
....
brw-rw----. 1 root disk     8,   0 May  5 07:22 /dev/sda
brw-rw----. 1 root disk     8,   1 May  5 07:22 /dev/sda1
brw-rw----. 1 root disk     8,   2 May  5 07:22 /dev/sda2
brw-rw----. 1 grid asmadmin 8,  16 May  5 08:25 /dev/sdb
brw-rw----. 1 grid asmadmin 8,  32 May  5 08:25 /dev/sdc
brw-rw----. 1 grid asmadmin 8,  48 May  5 08:25 /dev/sdd
brw-rw----. 1 grid asmadmin 8,  64 May  5 08:25 /dev/sde
brw-rw----. 1 grid asmadmin 8,  80 May  5 08:25 /dev/sdf
brw-rw----. 1 grid asmadmin 8,  96 May  5 08:25 /dev/sdg
brw-rw----. 1 grid asmadmin 8, 112 May  5 07:25 /dev/sdh
brw-rw----. 1 root disk     8, 128 May  5 07:22 /dev/sdi
brw-rw----. 1 root disk     8, 129 May  5 07:22 /dev/sdi1

Note protections on both nodes should be identical !

Scripts used in this article

[root@dsctw21 ~]# cat  cleanupASM_Disks.sh
parted /dev/sdb mklabel msdos
parted /dev/sdc mklabel msdos
parted /dev/sdd mklabel msdos
parted /dev/sde mklabel msdos
parted /dev/sdf mklabel msdos
parted /dev/sdg mklabel msdos
parted /dev/sdh mklabel msdos

parted /dev/sdb print
parted /dev/sdc print
parted /dev/sdd print
parted /dev/sde print
parted /dev/sdf print
parted /dev/sdg print
parted /dev/sdh print
./modifyASM_Disks.sh

[root@dsctw21 ~]# cat  modifyASM_Disks.sh
parted /dev/sdb print
parted /dev/sdc print
parted /dev/sdd print
parted /dev/sde print
parted /dev/sdf print
parted /dev/sdg print
parted /dev/sdh print

chmod 660 /dev/sdb
chmod 660 /dev/sdc
chmod 660 /dev/sdd
chmod 660 /dev/sde
chmod 660 /dev/sdf
chmod 660 /dev/sdg
chmod 660 /dev/sdh

chown grid:asmadmin /dev/sdb
chown grid:asmadmin /dev/sdc
chown grid:asmadmin /dev/sdd
chown grid:asmadmin /dev/sde
chown grid:asmadmin /dev/sdf
chown grid:asmadmin /dev/sdg
chown grid:asmadmin /dev/sdh

ls -l /dev/sd*

Leave a Reply

Your email address will not be published. Required fields are marked *