Initializing the Oracle ASMLib driver: [FAILED] — SELinux is turned on

SELinux would bring trouble for Oracle ASMLib, not only this, it played OCFS, OEM grid control, Oracle cluster service as well. Turn it off, Oracle would be happy.

Solution:
Turn off SELinux or put it in permssive mode.

How-to:
1) Go to modify /etc/selinux/config in redhat or /boot/grub/grub.conf in other linux with GRUB boot loader. It looks like this:

# SELINUX= can take one of these three values:
#       enforcing – SELinux security policy is enforced.
#       permissive – SELinux prints warnings instead of enforcing.
#       disabled – SELinux is fully disabled.
SELINUX=enforcing —> change it to
SELINUX=disabled
2) Reboot server to take it effect
You can set up it into permissive mode right away without reboot.

 Usage: setenforce [ Enforcing | Permissive | 1 | 0 ]

Reference:
Oracle support suggest this way in "fbirdzp’s blog" (http://fbirdzp.blogbus.com/logs/41076012.html)
Oracle forums with this thread "Error install ASMLib on RedHat linux " (http://forums.oracle.com/forums/thread.jspa?threadID=853632)
Very good article in "How to disable SELinux?" (http://www.crypt.gen.nz/selinux/disable_selinux.html)
Command of SELinux (http://linuxcommand.gds.tuwien.ac.at/man_pages/setenforce8.html)

Case:
[root@cetos5 asmlib]# rpm -Uvh oracleasm-support-2.1.3-1.el5.i386.rpm
>     oracleasmlib-2.0.4-1.el5.i386.rpm
>     oracleasm-2.6.18-92.1.22.el5-2.0.5-1.el5.i686.rpm
Preparing…                ########################################### [100%]
   1:oracleasm-support      ########################################### [ 33%]
   2:oracleasm-2.6.18-92.1.2########################################### [ 67%]
   3:oracleasmlib           ########################################### [100%]
[root@cetos5 asmlib]# /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) [n]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver:                     [FAILED]

[root@cetos5 asmlib]# vi /etc/sysconfig/selinux
Note: set  SELINUX=disabled
[root@cetos5 asmlib]# setenforce 0

[root@cetos5 asmlib]# /usr/sbin/sestatus
SELinux status:                 enabled
SELinuxfs mount:                /selinux
Current mode:                   permissive
Mode from config file:          disabled
Policy version:                 21
Policy from config file:        targeted

[root@cetos5 asmlib]# /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  ]

About Pang

Oracle DBA working in database, fusion middleware and identity management and cloud.
This entry was posted in Installation. Bookmark the permalink.

1 Response to Initializing the Oracle ASMLib driver: [FAILED] — SELinux is turned on

  1. Pingback: Installing and Configuring ASMLib on RHEL6 | blog.trichev.com

Leave a comment