Saturday, April 30, 2016

Loading Data From CSV File Into MySQL Table

This is my first ever post in MySQL, Reason is that I just started working in MySQL very recently. My requirement of the day was very simple, I had to load a set of data rows from a csv file into a table.

I was very sure that, there should be something similar to sqlldr in MySQL, and this is what I found and completed my work.

1)    There is a default data_dir from which this “LOAD DATA” command picks the data (This is found in data_dir parameter in /etc/mysql/my.cnf)


2)     Copy your CSV file in the /var/lib/mysql/ directory
Note:- Each schema in your database will have a directory of its own.


ubuntu@omegha-erp:~$ mysql -uroot -p***
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 6784
Server version: 5.5.47-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use erp;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> LOAD DATA INFILE 'Stock1.csv'  INTO TABLE stockmaster;
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (`erp`.`stockmaster`, CONSTRAINT `stockmaster_ibfk_1` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`))

3)    Since my data load failed with foreign key constraint and I was yet to prepare the master table data for load, I decided to disable to constraints for proceeding with my data load, and this is how I disabled the constraints check.

mysql> SET foreign_key_checks = 0;
Query OK, 0 rows affected (0.01 sec)

4)    LOAD DATA again and this time it was successful. But all my CSV values in the csv file got loaded into the first column itself, I decided to delete the rows and LOAD DATA again correctly.

mysql> LOAD DATA INFILE 'Stock1.csv'  INTO TABLE stockmaster;
Query OK, 161 rows affected, 4669 warnings (0.10 sec)
Records: 161  Deleted: 0  Skipped: 0  Warnings: 4669

mysql> delete from stockmaster;
Query OK, 164 rows affected (0.08 sec)

mysql> LOAD DATA INFILE 'Stock1.csv'  INTO TABLE stockmaster COLUMNS TERMINATED BY ',' LINES TERMINATED BY '\n';
Query OK, 161 rows affected, 214 warnings (0.10 sec)
Records: 161  Deleted: 0  Skipped: 0  Warnings: 214

mysql>


Thursday, April 21, 2016

How To Create Local YUM Repository On RHEL 6

In this post, I will by showing how to create a yum local repository on RHEL 6


1) You must be having a RHEL cd with you for creating the YUM repository
-- Load the physical CD to your CD ROM, In case its a physical server, Mount the CD into a mount point (/mnt/cdrom)
-- In my case it is a VM so I have an ISO image (Virtual CD), which is loaded and mounted into a mount point (/mnt/cdrom)

[root@ajithpathiyil_MT1 rhel64]# cd /mnt/cdrom
[root@ajithpathiyil_MT1 cdrom]# ls -ltr
total 723
-rw-r--r-- 1 root root   1397 Jan 20  2011 RPM-GPG-KEY-oracle
-rw-r--r-- 1 root root   7897 Jan 20  2011 README-en.html
-rw-r--r-- 1 root root  18390 Jan 20  2011 GPL
-rw-r--r-- 1 root root   1397 Jan 20  2011 RPM-GPG-KEY
-rw-r--r-- 1 root root  22343 Jan 20  2011 RELEASE-NOTES-en
-rw-r--r-- 1 root root   3547 Jan 20  2011 README-en
-rw-r--r-- 1 root root   3334 Jan 20  2011 eula.py
-rw-r--r-- 1 root root   7041 Jan 20  2011 eula.en_US
-rw-r--r-- 1 root root   6830 Jan 20  2011 EULA-rw
-r--r-- 1 root root   5165 Jan 20  2011 blafdoc.css
-rw-r--r-- 1 root root    105 Jan 20  2011 supportinfo
-rw-r--r-- 1 root root  53377 Jan 20  2011 RELEASE-NOTES-en.html
drwxr-xr-x 4 root root 583680 Jan 20  2011 Server
drwxr-xr-x 3 root root   2048 Jan 20  2011 Cluster
drwxr-xr-x 3 root root   4096 Jan 20  2011 ClusterStorage
drwxr-xr-x 3 root root   8192 Jan 20  2011 VT
drwxr-xr-x 2 root root   2048 Jan 20  2011 isolinux
drwxr-xr-x 4 root root   2048 Jan 20  2011 images
-r--r--r-- 1 root root   4436 Jan 20  2011 TRANS.TBL

[root@ajithpathiyil_MT1 cdrom]# cd Server
[root@ajithpathiyil_MT1 Server]# ls -ltr
total 3359313
-rw-r--r-- 1 root root   168842 Apr  9  2009 munzip-5.52-3.0.1.el5.x86_64.rpm
-rw-r--r-- 1 root root    21468 Aug 26  2010 mirqbalance-0.55-16.el5.x86_64.rpm
-rw-r--r-- 1 root root    31791 Aug 28  2010 mmcelog-0.9pre-1.30.el5.x86_64.rpm
-rw-r--r-- 1 root root  2017333 Aug 28  2010 mnet-snmp-devel-5.3.2.2-9.0.1.el5_5.1.i386.rpm
-rw-r--r-- 1 root root  1336489 Aug 28  2010 mnet-snmp-libs-5.3.2.2-9.0.1.el5_5.1.i386.rpm
-rw-r--r-- 1 root root   735231 Aug 28  2010 mnet-snmp-5.3.2.2-9.0.1.el5_5.1.x86_64.rpm
..
..
..
..
..
..
..
-rw-r--r-- 1 root root   312714 Nov 17  2010 mjdom-javadoc-1.0-4jpp.1.x86_64.rpm
-rw-r--r-- 1 root root    14449 Nov 17  2010 mfinger-server-0.17-32.2.1.1.x86_64.rpm
-rw-r--r-- 1 root root    74271 Nov 17  2010 mxorg-x11-xfs-1.0.2-4.x86_64.rpm
-rw-r--r-- 1 root root     9901 Nov 17  2010 mxorg-x11-drv-dmc-1.1.0-2.x86_64.rpm
-r--r--r-- 1 root root   805397 Jan 20  2011 TRANS.TBL
[root@ajithpathiyil_MT1 cdrom]#

2) Make a local directory and copy the contents of (/mnt/cdrom/Server) to this newly created local directory

[root@ajithpathiyil_MT1 cdrom]# mkdir -p /opt/yum/rhel64
[root@ajithpathiyil_MT1 cdrom]# cd /opt/yum/rhel64


[root@ajithpathiyil_MT1 Server]# cp -a *.rpm /opt/yum/rhel64/
[root@ajithpathiyil_MT1 Server]# uname -a
Linux ajithpathiyil_MT1.lab.com 2.6.32-100.26.2.el5 #1 SMP Tue Jan 18 20:11:49 EST 2011 x86_64 x86_64 x86_64 GNU/Linux

3) Copy the comps-rhel5-server-core.xml file to your local directory as (/opt/yum/rhel64/repodata/comps.xml)

[root@ajithpathiyil_MT1 Server]# cd ..
[root@ajithpathiyil_MT1 Server]# cd repodata
[root@ajithpathiyil_MT1 repodata]# mkdir -p /opt/yum/rhel64/repodata
[root@ajithpathiyil_MT1 repodata]# ls -ltr *comps*xml
-rw-r--r-- 1 root root 1067627 Jan 20  2011 comps-rhel5-server-core.xml
[root@ajithpathiyil_MT1 repodata]# cp *comps*xml /opt/yum/rhel64/repodata/comps.xml

4) Install the createrepo-0.4.11-3.el5.noarch rpm if not installed already.

[root@ajithpathiyil_MT1 repodata]# cd /opt/yum/rhel64/
[root@ajithpathiyil_MT1 rhel64]# rpm -ivh create*
warning: createrepo-0.4.11-3.el5.noarch.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing..#################################################################################[100%]
       package createrepo-0.4.11-3.el5.noarch is already installed
[root@ajithpathiyil_MT1 rhel64]# createrepo -g repodata/comps.xml .
                                                                               
1/3247 - cdparanoia-alpha9.8-27.2.x86_64.rpm
                                                                               
2/3247 - libXfixes-4.0.1-2.1.i386.rpm
                                                                               
3/3247 - libdmx-1.0.2-3.1.i386.rpm
                                                                               
4/3247 - smartmontools-5.38-2.el5.x86_64.rpm
                                                                                
5/3247 - nss_ldap-253-37.el5.i386.rpm
..                                                                             
..
..
..
..
..
..
..
3242/3247 - libsoup-devel-2.2.98-2.el5_3.1.x86_64.rpm
                                                                               
3243/3247 - perl-5.8.8-32.0.1.el5_5.2.x86_64.rpm
                                                                               
3244/3247 - mesa-libGL-devel-6.5.1-7.8.el5.x86_64.rpm
                                                                               
3245/3247 - eel2-devel-2.16.1-1.el5.x86_64.rpm
                                                                               
3246/3247 - adaptx-javadoc-0.9.13-3jpp.1.x86_64.rpm
                                                                               
3247/3247 - ipa-pmincho-fonts-003.02-2.1.el5.noarch.rpm
Saving Primary metadata
Saving file lists metadata
Saving other metadata

5) Create a local repository file

[root@ajithpathiyil_MT1 rhel64]# cat /etc/yum.repos.d/rhel-local.repo
name=RHEL 6.4 local repository
baseurl=file:///opt/yum/rhel64/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
[root@ajithpathiyil_MT1 rhel64]#

[root@ajithpathiyil_MT1 rhel64]# yum clean all
Loaded plugins: rhnplugin, security
Cleaning up Everything
root@ajithpathiyil_MT1:/opt/yum/rhel64
[root@ajithpathiyil_MT1 rhel64]#

6) Load the local repository with all the RPMs, Beautifully loading the local repository.


[root@ajithpathiyil_MT1 rhel64]# yum repolist
Loaded plugins: rhnplugin, security
This system is not registered with ULN.
ULN support will be disabled.
rhel6.4-local                                                  | 1.1 kB     00:00    
rhel6.4-local/primary                                          | 1.4 MB     00:00    

rhel6.4-local: [                                                          ] 1/3247
rhel6.4-local: [#                                                         ] 33/3247
rhel6.4-local: [###                                                       ] 99/3247
rhel6.4-local: [#####                                                     ] 166/3247
rhel6.4-local: [########                                                  ] 266/3247
rhel6.4-local: [##########                                                ] 332/3247
rhel6.4-local: [############                                              ] 398/3247
rhel6.4-local: [##############                                            ] 464/3247
rhel6.4-local: [################                                          ] 531/3247
....................................................................................
....................................................................................
....................................................................................
rhel6.4-local: [######################################################    ] 3114/3247
rhel6.4-local: [########################################################  ] 3181/3247
rhel6.4-local: [##########################################################] 3246/3247
rhel6.4-local                                                               3247/3247
repo id                                   repo name                         status
rhel6.4-local                             RHEL 6.4 local repository         enabled: 3,247
repolist: 3,247
root@ajithpathiyil_MT1:/opt/yum/rhel64
[root@ajithpathiyil_MT1 rhel64]#

Monday, April 11, 2016

How To Cleanup Grid Infrastructure After Installtion Failure

This blogpost is about how to clean up the failed Grid Infrastructure installation,When Grid Infrastructure installation fails, especially while running the root.sh script, Failure maybe due to various reasons. My failure reason was that, I was installing GI and in my VM I had allocated very little memory, due to which the root.sh script hanged, patiently waited for 3 hours, nothing moved, had to abruptly shutdown the VM and go home.

C:\>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" list hdds
UUID:           3326c82d-4a75-4f5a-a306-5762ec45db86
Parent UUID:    base
State:          locked write
Type:           normal (base)
Location:       C:\RAC11g\ajithn1\ajithn1.vdi
Storage format: VDI
Capacity:       30720 MBytes
Encryption:     disabled

1)      When checked, it was a half baked situation, In node “ajithn1” ASM instance was up and running and all crs services were up

Using username "oracle".
Last login: Sun Apr 10 16:57:19 2016
[oracle@ajithn1 ~]$ ps -ef|grep pmon
oracle    3697     1  0 08:21 ?        00:00:00 asm_pmon_+ASM1
oracle    4423  4346  0 08:32 pts/1    00:00:00 grep pmon
[oracle@ajithn1 ~]$ su -
Password:
[root@ajithn1 ~]# 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@ajithn1 ~]#

2)      In node “ajithn2”, again ASM instance was up but cluster services were not.
Using username "oracle".
Last login: Sun Apr 10 16:58:58 2016
[oracle@ajithn2 ~]$ ps -ef|grep pmon
oracle    3733     1  0 08:32 ?        00:00:00 asm_pmon_+ASM2
oracle    3846  3607  0 08:32 pts/1    00:00:00 grep pmon
[oracle@ajithn2 ~]$ crsctl check crs
-bash: crsctl: command not found
[oracle@ajithn2 ~]$ su -
Password:
[root@ajithn2 ~]# crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
[root@ajithn2 ~]#


3)      Now, how to cleanup your GI installation? To do a cleanup execute the below perl command on all the nodes but not the last node (I have only 2 nodes, so second node will have a slightly different command)

[oracle@ajithn1 ~]$ perl /u01/grid/oracle/product/11.2.0/grid_1/crs/install/rootcrs.pl -verbose -deconfig -force
2016-04-11 08:35:03: Parsing the host name
2016-04-11 08:35:03: Checking for super user privileges
You must be logged in as root to run this script.
2016-04-11 08:35:03: ###### Begin Error Stack Trace ######
2016-04-11 08:35:03:     Package         File                 Line Calling
2016-04-11 08:35:03:     --------------- -------------------- ---- ----------
2016-04-11 08:35:03:  1: crsconfig_lib   s_crsconfig_lib.pm    121 crsconfig_lib::error
2016-04-11 08:35:03:  2: crsconfig_lib   crsconfig_lib.pm      856 crsconfig_lib::s_check_SuperUser
2016-04-11 08:35:03:  3: main            rootcrs.pl            311 crsconfig_lib::check_SuperUser
2016-04-11 08:35:03: ####### End Error Stack Trace #######

Log in as root and rerun this script.
2016-04-11 08:35:03: ###### Begin Error Stack Trace ######
2016-04-11 08:35:03:     Package         File                 Line Calling
2016-04-11 08:35:03:     --------------- -------------------- ---- ----------
2016-04-11 08:35:03:  1: crsconfig_lib   s_crsconfig_lib.pm    122 crsconfig_lib::error
2016-04-11 08:35:03:  2: crsconfig_lib   crsconfig_lib.pm      856 crsconfig_lib::s_check_SuperUser
2016-04-11 08:35:03:  3: main            rootcrs.pl            311 crsconfig_lib::check_SuperUser
2016-04-11 08:35:03: ####### End Error Stack Trace #######

2016-04-11 08:35:03: Not running as authorized user
Insufficient privileges to execute this script
2016-04-11 08:35:03: ###### Begin Error Stack Trace ######
2016-04-11 08:35:03:     Package         File                 Line Calling
2016-04-11 08:35:03:     --------------- -------------------- ---- ----------
2016-04-11 08:35:03:  1: main            rootcrs.pl            313 crsconfig_lib
2016-04-11 08:35:03: ####### End Error Stack Trace #######

[oracle@ajithn1 ~]$ su -
Password:
[root@ajithn1 ~]# perl /u01/grid/oracle/product/11.2.0/grid_1/crs/install/rootcr
2016-04-11 08:35:23: Parsing the host name
2016-04-11 08:35:23: Checking for super user privileges
2016-04-11 08:35:23: User has super user privileges
Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/crs/i
VIP exists.:ajithn1
VIP exists.: /ajithn1-vip/192.168.78.61/255.255.255.0/eth0
GSD exists.
ONS daemon exists. Local port 6100, remote port 6200
eONS daemon exists. Multicast port 17212, multicast IP address 234.96.173.129, l
ACFS-9200: Supported
CRS-2613: Could not find resource 'ora.registry.acfs'.
CRS-4000: Command Stop failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resourc
CRS-2673: Attempting to stop 'ora.crsd' on 'ajithn1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ajit
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'ajithn1'
CRS-2677: Stop of 'ora.DATA.dg' on 'ajithn1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ajithn1'
CRS-2677: Stop of 'ora.asm' on 'ajithn1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ajithn1' has completed
CRS-2677: Stop of 'ora.crsd' on 'ajithn1' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'ajithn1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'ajithn1'
CRS-2673: Attempting to stop 'ora.evmd' on 'ajithn1'
CRS-2673: Attempting to stop 'ora.asm' on 'ajithn1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'ajithn1'
CRS-2677: Stop of 'ora.cssdmonitor' on 'ajithn1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'ajithn1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'ajithn1' succeeded
CRS-2677: Stop of 'ora.asm' on 'ajithn1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'ajithn1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'ajithn1'
CRS-2677: Stop of 'ora.cssd' on 'ajithn1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'ajithn1'
CRS-2673: Attempting to stop 'ora.diskmon' on 'ajithn1'
CRS-2677: Stop of 'ora.gpnpd' on 'ajithn1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'ajithn1'
CRS-2677: Stop of 'ora.diskmon' on 'ajithn1' succeeded
CRS-2677: Stop of 'ora.gipcd' on 'ajithn1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ajithn1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle clusterware stack on this node
[root@ajithn1 ~]#


4)      Now, run the below perl command in the last node of your cluster, in my case it is node “ajithn2” , I have only 2 nodes.

[oracle@ajithn2 ~]$ perl /u01/grid/oracle/product/11.2.0/grid_1/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode
2016-04-11 08:37:29: Parsing the host name
2016-04-11 08:37:29: Checking for super user privileges
You must be logged in as root to run this script.
2016-04-11 08:37:29: ###### Begin Error Stack Trace ######
2016-04-11 08:37:29:     Package         File                 Line Calling
2016-04-11 08:37:29:     --------------- -------------------- ---- ----------
2016-04-11 08:37:29:  1: crsconfig_lib   s_crsconfig_lib.pm    121 crsconfig_lib::error
2016-04-11 08:37:29:  2: crsconfig_lib   crsconfig_lib.pm      856 crsconfig_lib::s_check_SuperUser
2016-04-11 08:37:29:  3: main            rootcrs.pl            311 crsconfig_lib::check_SuperUser
2016-04-11 08:37:29: ####### End Error Stack Trace #######

Log in as root and rerun this script.
2016-04-11 08:37:29: ###### Begin Error Stack Trace ######
2016-04-11 08:37:29:     Package         File                 Line Calling
2016-04-11 08:37:29:     --------------- -------------------- ---- ----------
2016-04-11 08:37:29:  1: crsconfig_lib   s_crsconfig_lib.pm    122 crsconfig_lib::error
2016-04-11 08:37:29:  2: crsconfig_lib   crsconfig_lib.pm      856 crsconfig_lib::s_check_SuperUser
2016-04-11 08:37:29:  3: main            rootcrs.pl            311 crsconfig_lib::check_SuperUser
2016-04-11 08:37:29: ####### End Error Stack Trace #######

2016-04-11 08:37:29: Not running as authorized user
Insufficient privileges to execute this script
2016-04-11 08:37:29: ###### Begin Error Stack Trace ######
2016-04-11 08:37:29:     Package         File                 Line Calling
2016-04-11 08:37:29:     --------------- -------------------- ---- ----------
2016-04-11 08:37:29:  1: main            rootcrs.pl            313 crsconfig_lib::error
2016-04-11 08:37:29: ####### End Error Stack Trace #######

[oracle@ajithn2 ~]$ su -
Password:
[root@ajithn2 ~]# perl /u01/grid/oracle/product/11.2.0/grid_1/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode
2016-04-11 08:37:44: Parsing the host name
2016-04-11 08:37:44: Checking for super user privileges
2016-04-11 08:37:44: User has super user privileges
Using configuration parameter file: /u01/grid/oracle/product/11.2.0/grid_1/crs/install/crsconfig_params
GSD exists.
ONS daemon exists. Local port 6100, remote port 6200
eONS daemon exists. Multicast port 17212, multicast IP address 234.96.173.129, listening port 2016
PRKO-2439 : VIP does not exist.

ACFS-9200: Supported
CRS-2613: Could not find resource 'ora.registry.acfs'.
CRS-4000: Command Stop failed, or completed with errors.
CRS-2613: Could not find resource 'ora.registry.acfs'.
CRS-4000: Command Delete failed, or completed with errors.
CRS-2673: Attempting to stop 'ora.crsd' on 'ajithn2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ajithn2'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'ajithn2'
CRS-2677: Stop of 'ora.DATA.dg' on 'ajithn2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'ajithn2'
CRS-2677: Stop of 'ora.asm' on 'ajithn2' succeeded
CRS-2673: Attempting to stop 'ora.eons' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.ons' on 'ajithn2'
CRS-2677: Stop of 'ora.ons' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.eons' on 'ajithn2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ajithn2' has completed
CRS-2677: Stop of 'ora.crsd' on 'ajithn2' succeeded
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.evmd' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.asm' on 'ajithn2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.evmd' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.asm' on 'ajithn2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'ajithn2'
CRS-2677: Stop of 'ora.cssd' on 'ajithn2' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'ajithn2'
CRS-2677: Stop of 'ora.diskmon' on 'ajithn2' succeeded
CRS-2613: Could not find resource 'ora.drivers.acfs'.
CRS-4000: Command Modify failed, or completed with errors.
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ajithn2'
CRS-2676: Start of 'ora.cssdmonitor' on 'ajithn2' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'ajithn2'
CRS-2672: Attempting to start 'ora.diskmon' on 'ajithn2'
CRS-2676: Start of 'ora.diskmon' on 'ajithn2' succeeded
CRS-2676: Start of 'ora.cssd' on 'ajithn2' succeeded
CRS-4611: Successful deletion of voting disk +DATA.
CRS-2672: Attempting to start 'ora.ctssd' on 'ajithn2'
CRS-2676: Start of 'ora.ctssd' on 'ajithn2' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'ajithn2'
CRS-2676: Start of 'ora.asm' on 'ajithn2' succeeded
ASM de-configuration trace file location: /u01/app/oracle/cfgtoollogs/asmca/asmcadc_clean4904428430281726239.log
ASM Clean Configuration START
ASM Clean Configuration END

ASM with SID +ASM1 deleted successfully. Check /u01/app/oracle/cfgtoollogs/asmca/asmcadc_clean4904428430281726239.log for details.

CRS-2613: Could not find resource 'ora.drivers.acfs'.
CRS-4000: Command Delete failed, or completed with errors.
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'ajithn2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.gpnpd' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.ctssd' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.asm' on 'ajithn2'
CRS-2677: Stop of 'ora.cssdmonitor' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.gpnpd' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.asm' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'ajithn2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'ajithn2'
CRS-2677: Stop of 'ora.cssd' on 'ajithn2' succeeded
CRS-2673: Attempting to stop 'ora.diskmon' on 'ajithn2'
CRS-2673: Attempting to stop 'ora.gipcd' on 'ajithn2'
CRS-2677: Stop of 'ora.gipcd' on 'ajithn2' succeeded
CRS-2677: Stop of 'ora.diskmon' on 'ajithn2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'ajithn2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node
[root@ajithn2 ~]#


5)      My ASM instance was also up, But when I try to reinstall the GI, I will not be able to use the already used ASM devices (sdb1, sdc1), So, let’s scribble something on the headers of the devices to erase the details of ASM DG and make it reusable. (Using dd command to erase the ASM diskgroup details from device headers)

[root@ajithn1 ~]# /etc/init.d/oracleasm listdisks
BACKUP
DATA
[root@ajithn1 ~]# dd if=/dev/zero of=/dev/sdb1 bs=1024 count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.267837 seconds, 382 kB/s
[root@ajithn1 ~]# dd if=/dev/zero of=/dev/sdc1 bs=1024 count=100
100+0 records in
100+0 records out
102400 bytes (102 kB) copied, 0.357379 seconds, 287 kB/s
[root@ajithn1 ~]#


6)      Removing the ASM Diskgroups

[root@ajithn1 ~]# /etc/init.d/oracleasm deletedisk DATA /dev/sdb1
Removing ASM disk "DATA":                                  [  OK  ]
[root@ajithn1 ~]# /etc/init.d/oracleasm deletedisk BACKUP /dev/sdc1
Removing ASM disk "BACKUP":                                [  OK  ]
[root@ajithn1 ~]# /etc/init.d/oracleasm listdisks
[root@ajithn1 ~]#

7)      Recreating the ASM diskgroups.

[root@ajithn1 ~]# /etc/init.d/oracleasm createdisk data /dev/sdb1
Marking disk "data" as an ASM disk:                        [  OK  ]
[root@ajithn1 ~]# /etc/init.d/oracleasm createdisk backup /dev/sdc1
Marking disk "backup" as an ASM disk:                      [  OK  ]
[root@ajithn1 ~]# /etc/init.d/oracleasm listdisks
BACKUP
DATA
[root@ajithn1 ~]#


Once the ASM Diskgroups are recreated, we can restart the GI installation and it should be successful, and I had a successful installation after I increased my VM memory.



HAPPY LEARNING!