DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2006

    Cannot create ASM disk: permission denied ???

    I was about to create ASM disks for an Oracle development server. For the purpose, I have create the necessary partitions as follows:
    Disk /dev/sda: 12.8 GB, 12884901888 bytes
    255 heads, 63 sectors/track, 1566 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1          13      104391   83  Linux
    /dev/sda2              14         924     7317607+  83  Linux
    /dev/sda3             925        1185     2096482+  82  Linux swap
    /dev/sda4            1186        1566     3060382+   5  Extended
    /dev/sda5            1186        1217      257008+  83  Linux
    /dev/sda6            1218        1249      257008+  83  Linux
    /dev/sda7            1250        1281      257008+  83  Linux
    /dev/sda8            1282        1313      257008+  83  Linux
    /dev/sda9            1314        1345      257008+  83  Linux
    /dev/sda10           1346        1377      257008+  83  Linux
    /dev/sda11           1378        1409      257008+  83  Linux
    /dev/sda12           1410        1441      257008+  83  Linux
    /dev/sda13           1442        1473      257008+  83  Linux
    /dev/sda14           1474        1505      257008+  83  Linux
    /dev/sda15           1506        1566      489951   83  Linux
    The partitions to be assigned for the ASM disks are /sda11 to /sda15. They're all logical volumes built on /sda4, an extended partition. I have formatted the drives with ext3 filesystem --using the mke2fs -j command. Also, I have assigned necessary permission and ownership of the devices. Here's the content of my /etc/rc.local:
    chown oracle:dba /dev/sda11
    chmod 660 /dev/sda11
    chown oracle:dba /dev/sda12
    chmod 660 /dev/sda12
    chown oracle:dba /dev/sda13
    chmod 660 /dev/sda13
    chown oracle:dba /dev/sda14
    chmod 660 /dev/sda14
    chown oracle:dba /dev/sda15
    chmod 660 /dev/sda15
    Yup, /dev/sda11 to /dev/sda15 are all owned by the user oracle.

    The next step is installing ASMLib. I'm using the following RPMs:

    And of course, my kernel is already 2.6.9-5.0.5.EL.
    [root@iceheart-rhel4es 2.6.9-5.0.5]# uname -r
    So using the root account, I have successfully installed ASMLib without any problems. I also have successfully configured the ASM library driver (with root account as well).
    [root@iceheart-rhel4es 2.6.9-5.0.5]# /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  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) [n]: y
      Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
      Writing Oracle ASM library driver configuration            [  OK  ]
      Creating /dev/oracleasm mount point                        [  OK  ]
      Loading module "oracleasm"                                 [  OK  ]
      Mounting ASMlib driver filesystem                          [  OK  ]
      Scanning system for ASM disks                              [  OK  ]

    Finally, I re -started the RHEL 4 server using the shutdown -r now command, and logged back in using oracle user. As the oracle user, I tried to create an ASM disk using /dev/sda11:
    [oracle@iceheart-rhel4es ~]$ /etc/init.d/oracleasm createdisk DISK1 /dev/sda11
    Marking disk "/dev/sda11" as an ASM disk: asmtool: Unable to create ASM disk "DISK1": Permission denied
    Whoa, so I failed due to "permission denied"? But /dev/sda11 has already been owned by oracle! In fact, here's what the ls -al shown:
    [oracle@iceheart-rhel4es ~]$ ls -l /dev/sda11
    brw-rw----  1 oracle dba 8, 11 Nov 17 18:33 /dev/sda11
    In fact, the necessary partitions have been all owned by oracle!
    [oracle@iceheart-rhel4es ~]$ ls -al /dev/sda11
    brw-rw----  1 oracle dba 8, 11 Nov 20 09:17 /dev/sda11
    [oracle@iceheart-rhel4es ~]$ ls -al /dev/sda12
    brw-rw----  1 oracle dba 8, 12 Nov 20 09:17 /dev/sda12
    [oracle@iceheart-rhel4es ~]$ ls -al /dev/sda13
    brw-rw----  1 oracle dba 8, 13 Nov 20 09:17 /dev/sda13
    [oracle@iceheart-rhel4es ~]$ ls -al /dev/sda14
    brw-rw----  1 oracle dba 8, 14 Nov 20 09:17 /dev/sda14
    [oracle@iceheart-rhel4es ~]$ ls -al /dev/sda15
    brw-rw----  1 oracle dba 8, 15 Nov 20 09:17 /dev/sda15
    So I don't understand. Why did I fail creating the ASMLib disk? Why did it give me "Permission Denied" error message? The partitions are already owned by oracle, ain't they?

  2. #2
    Join Date
    Sep 2002
    you need to do that as root, not oracle

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.