Instantiating disk: failed or Initializing the Oracle ASMLib driver: [FAILED]

Both of the errors above are related. However the sequence should be like:

1. First check drivers are available or not. Sometimes we think we installed all 3 required libraries but still we get errors. It happened in my case I downloaded the exact libraries for my kernel, but still I was getting errors.

2. If step 1 is rectified, then check why “Instantiating disk” is getting failed – For this you may get many solutions written by many DBA in their Blogs. 99.99% if step 1 is rectified, you wont get this error.

In many Blogs Many DBAs has mentioned to change the SELINUX value to either disabled or permissive, however in my case neither of the one worked.

So finally after spending much time, I solved the error and below are the steps and o/p I did to get rid of this error. It took me 2 hours to find the right cause, coz I was not checking the libraries, considering the fact I downloaded the right ;).

I thought disabling and enabling will sort out but no success.

[root@test ~]# /etc/init.d/oracleasm disable
Writing Oracle ASM library driver configuration: done
Dropping Oracle ASMLib disks: [ OK ]
Shutting down the Oracle ASMLib driver: [ OK ]
[root@test ~]#
[root@test ~]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [FAILED]
[root@test ~]#

Then finally I check the installed Libraries.

[root@test ~]# rpm -qa | grep oracleasm
oracleasmlib-2.0.4-1.el5
oracleasm-2.6.18-164.15.1.el5-2.0.5-1.el5
oracleasm-support-2.1.8-1.el5
[root@test ~]#

I had all for my 64bit Linux. But still not working :(.

[root@test ~]# cd /home/oracle/Desktop/
[root@test Desktop]# ls -lrt
total 957456
-rwxrw-rw- 1 oracle oinstall 137515 Apr 13 06:15 oracleasm-2.6.18-164.15.1.el5-2.0.5-1.el5.x86_64.rpm
-rwxrw-rw- 1 oracle oinstall 90225 Apr 13 2014 oracleasm-support-2.1.8-1.el5.x86_64.rpm
-rwxrw-rw- 1 oracle oinstall 14176 Apr 13 2014 oracleasmlib-2.0.4-1.el5.x86_64.rpm
[root@test Desktop]#

Then I checked the kernel version again and thought of giving  a try to the different library with the same kernel version.

uname -r: 2.6.18-164.el5
uname -a: Linux test.localdomain 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

We can also get kernel version from the /etc/grub.conf file.

[root@test Desktop]# cat /etc/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-164.el5)
root (hd0,0)
kernel /boot/vmlinuz-2.6.18-164.el5 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.18-164.el5.img
[root@test Desktop]#

I downloaded the different RPM for ASMLib Driver for the same kernel. Update the existing one with the below command:

[root@test Desktop]# rpm -Uvh oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm
warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:oracleasm-2.6.18-164.el########################################### [100%]
[root@test Desktop]#

Now try to configure again and see if it works:

[root@test Desktop]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets (‘[]’). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface [oracle]:
Default group to own the driver interface [dba]:
Start Oracle ASM library driver on boot (y/n) [y]:
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@test Desktop]#

We can also try enabling and disabling:

[root@test Desktop]# /etc/init.d/oracleasm disable
Writing Oracle ASM library driver configuration: done
Dropping Oracle ASMLib disks: [ OK ]
Shutting down the Oracle ASMLib driver: [ OK ]
[root@test Desktop]#
[root@test Desktop]# /etc/init.d/oracleasm enable
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]
[root@test Desktop]#

Finally I created the disks for ASM and it went well without any problem:

[root@test Desktop]# /usr/sbin/oracleasm createdisk DISK1 /dev/sdb1
Writing disk header: done
Instantiating disk: done
[root@test Desktop]#
[root@test Desktop]# /usr/sbin/oracleasm createdisk DISK2 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@test Desktop]#
[root@test Desktop]# /usr/sbin/oracleasm createdisk DISK3 /dev/sdd1
Writing disk header: done
Instantiating disk: done
[root@test Desktop]#

Hope it helps…

Advertisements

4 thoughts on “Instantiating disk: failed or Initializing the Oracle ASMLib driver: [FAILED]

  1. Hello Sir,

    Please give me a link to donaload
    oracleasmlib-2.0.4-1.el5.i386.rpm
    OR
    oracleasmlib-2.6.18-8.el5.rpm

    [root@node2 rpms]# uname -rm
    2.6.18-8.el5 x86_64

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s