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

Unable to create ASM disk under OEL 6.x

Print Friendly

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
Disabled

 

The ASM disk is created successfully this time:

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

 

Regards,
Sve

Share this:
    Categories: linux, oracle Tags: ,
    1. Francisco Javier
      August 17th, 2012 at 01:19 | #1

      It works great, thanks a lot.

    2. Svetoslav Gyurov
      August 17th, 2012 at 17:18 | #2

      Hi Francisco,

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

      Regards,
      Sve

    3. September 27th, 2012 at 20:09 | #3

      Thanks Sve!

    4. Max
      October 2nd, 2012 at 01:06 | #4

      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.

    5. Max
      October 2nd, 2012 at 16:30 | #5

      @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;
      EOF
      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.

    6. alex
      December 16th, 2012 at 17:07 | #6

      Thanks so much! You solved my problem! :)

    1. No trackbacks yet.