Home > linux, oracle > Unable to create ASM disk under OEL 6.x

Unable to create ASM disk under OEL 6.x

It was busy month and I’m behind with my blog posts. First of all Happy New Year to all of you and wish you all the best through the new year!

This is a short note for installing Oracle Database with ASM under Oracle Enterprise Linux 6.x, which is not certified YET!

If you are running ASM with ASMLib you may get the following error when try to create ASM disk:

[root@db-app2 ~]# oracleasm createdisk DISK01 /dev/mapper/data01
Writing disk header: done
Instantiating disk: failed
Clearing disk header: done


Writing the header on the disk fails without obvious reason. Well, it turned out that Security Linux was blocking the access to the disk. Because configuration of SELinux is not part of the startup configuration any more I just forgot it.

To disable the SELinux edit file /etc/selinux/config and configure SELINUX=disabled. Then reboot your system and run getenforce to confirm that SELinux is disabled:

[root@db-app2 ~]# /usr/sbin/getenforce


The ASM disk is created successfully this time:

[root@db-app2 ~]# oracleasm createdisk DISK01 /dev/mapper/data01
Writing disk header: done
Instantiating disk: done



Similar Posts:

Categories: linux, oracle Tags: ,
  • Francisco Javier

    It works great, thanks a lot.

  • Svetoslav Gyurov

    Hi Francisco,

    I’m glad it helps. It took me some time and debugging to simply found that SE was enabled.


  • Thanks Sve!

  • Max

    Hello, thanks for pointing out to SELINUX. Just curious, is there any smarter way to configure SELINUX properly (adding some policies) rather than just disabling it? Thank you.

  • Max

    Found it myself, but please note that I did not have a chance to test it well:
    cat > oracleasm.te << EOF
    module oracleasm 1.0;
    require {
    type unlabeled_t;
    class filesystem associate;
    allow unlabeled_t unlabeled_t:filesystem associate;
    checkmodule -M -m -o oracleasm.mod oracleasm.te
    semodule_package -o oracleasm.pp -m oracleasm.mod
    semodule -i oracleasm.pp

    This module must stay forever (do not remove it after successful operation with oracleasm utility), otherwise the disk cannot reappear in /dev/oracleasm/disks/ after system reboot.

  • alex

    Thanks so much! You solved my problem! 🙂

  • Thanks!

    Good point.