Oracleasm createdisk fails with selinux enabled

[root@testdb1 grid]# /etc/init.d/oracleasm createdisk DATA_0001 /dev/sda3

Marking disk "DATA_0001" as an ASM disk:                   [FAILED]

 

[root@testdb1 ~]$ cat /var/log/oracleasm

Disk "DATA_0001" does not exist or is not instantiated

Writing disk header: done

Instantiating disk: oracleasm-instantiate-disk: Unable to open manager: No such file or directory

failed

Clearing disk header: done

 

Solution:

SELinux is enabled. We have to disable SELinux.

[root@testdb1~]# /usr/sbin/sestatus

SELinux status:                 enabled

SELinuxfs mount:                /selinux

Current mode:                   enforcing

Mode from config file:          enforcing

Policy version:                 21

Policy from config file:        targeted

 

Change SELINUX=disabled in /etc/sysconfig/selinux  file and save it. Reboot the server.

[root@testdb1 ~]# reboot

[root@testdb1 ~]# /usr/sbin/sestatus

SELinux status:                 disabled

Run getenforce to confirm that SELINUX is disabled: 

[root@testdb1 ~]# /usr/sbin/getenforce Disables

Disabled

[root@testdb1 ~]# /etc/init.d/oracleasm createdisk DATA_0001 /dev/sda3

Marking disk "DATA_0001" as an ASM disk:                   [  OK  ]

Comments