This discussion is archived
1 2 Previous Next 22 Replies Latest reply: Oct 2, 2013 3:53 AM by Peter René Menges RSS

oracleasm createdisk fails - permission denied

dazzer Newbie
Currently Being Moderated
I've got a fresh install of Oracle Linux 6.1, I'm trying to configure the disks ready to use with ASM.

# oracleasm configure
ORACLEASM_ENABLED=true
ORACLEASM_UID=oracle
ORACLEASM_GID=dba
ORACLEASM_SCANBOOT=true
ORACLEASM_SCANORDER=""
ORACLEASM_SCANEXCLUDE=""

# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes

I'm testing withthe following mulipath device :-
mpathd (360060160d9b12200c4640ab38416e111) dm-2 DGC,RAID 5
size=1.0G features='1 queue_if_no_path' hwhandler='1 emc' wp=rw
|-+- policy='round-robin 0' prio=-1 status=active
| |- 0:0:2:0 sdg 8:96 active undef running
| |- 0:0:3:0 sdi 8:128 active undef running
| |- 1:0:2:0 sdo 8:224 active undef running
| `- 1:0:3:0 sdq 65:0 active undef running
`-+- policy='round-robin 0' prio=-1 status=enabled
|- 0:0:0:0 sdc 8:32 active undef running
|- 0:0:1:0 sde 8:64 active undef running
|- 1:0:0:0 sdk 8:160 active undef running
`- 1:0:1:0 sdm 8:192 active undef running

I've partioned this device and mounted it as a file system(just to check I can access it):-

ll /dev/mapper/mpath*
lrwxrwxrwx. 1 root root 7 Nov 24 11:01 /dev/mapper/mpathd -> ../dm-2
lrwxrwxrwx. 1 root root 7 Nov 24 11:31 /dev/mapper/mpathdp1 -> ../dm-5
lrwxrwxrwx. 1 root root 7 Nov 24 11:01 /dev/mapper/mpathe -> ../dm-3

But when I try and create an asm disk it fails :-

# /etc/init.d/oracleasm createdisk TEST1 /dev/mapper/mpathdp1
Marking disk "TEST1" as an ASM disk: [FAILED]
# tail /var/log/oracleasm
Disk "TEST1" does not exist or is not instantiated
Writing disk header: done
Instantiating disk: oracleasm-instantiate-disk: Unable to create ASM disk "TEST1": Permission denied
failed
Clearing disk header: done

I don't know and can't find what permissions I'm missing - any help appreciated.

Thanks
  • 1. Re: oracleasm createdisk fails - permission denied
    Zoltan Kecskemethy Expert
    Currently Being Moderated
    I'm in the very same situation at the moment. :D
    If I understand well ASMLIB is not supported and not fully available for OEL6.

    I solved/workaround this issue using RAW devices for ASM.
    Simple created empty partition at the disk and issues a raw command for it to create a raw device for it.
    e.g.
    raw /dev/raw/raw1 /dev/sdb1 
    chown oracle:dba /dev/raw/raw1
    chmod 660 /dev/raw/raw1
    and I could use this raw device in GI installer for ASM.

    So at the moment I'm testing the same using OEL5 U7 in Virutalbox.

    Also please note there is an ASM forum here:
    Forum Home » Grid Computing » Automatic Storage Management

    Edited by: Kecskemethy on Nov 24, 2011 5:10 AM
  • 2. Re: oracleasm createdisk fails - permission denied
    Dude! Guru
    Currently Being Moderated
    f you refer to OEL6 as Oracle Linux using the original Red Hat kernel, then, no ASMLIB is not available, as far as I know. The kernel ASMLIB driver is build-in with the Oracle Linux UEK kernel, which is the default kernel since OL 5.7.

    Please note that raw device support is depreciated. If you want to use a disk for ASM than you should use "fdisk" to create a standard partition and use that partition for ASM. Setting permissions on a device will only last until the next reboot. ASMlib and the "oracleasm-support" package will configure ASM device ownerships that are set when the driver loads.

    You don't actually have to use ASMLIB and can also use "udev" permissions file and "device-mapper" to set permanent device ownerships. There are some related posts in the forum, or check this link:

    http://www.oracle.com/technetwork/database/device-mapper-udev-crs-asm.pdf
  • 3. Re: oracleasm createdisk fails - permission denied
    Zoltan Kecskemethy Expert
    Currently Being Moderated
    Thank you for the info.
    Please note that I created sdb1 using fdisk.
    But somehow oracleasm createdisk command could not use it under OEL6 (yes oracle Linux 6 using UEK kernel).

    I followed a much newer document when I was testing OEL6 ASM from MOS:
    ASM 11.2 Configuration KIT (ASM 11gR2 Installation & Configuration, Deinstallation, Upgrade, ASM Job Role Separation (Standalone Only). [ID 1092213.1]
    Solution 2.
    pdf file: ASM 11gR2 Installation & Configuration.pdf

    I did my test in Vritualbox.
    I added a new disk in and created a type 83 linux partition for it. No file system (as the mentioned document suggested)

    One thing was strange: I found and installed oracleasm-support package only. I have not found any package using name oracleasm or oracleasmlib.
    Please note I used the public yum repository only I guess I would have needed access to ULN to able to get these mentioned packages :(
    They are not present in the install DVD either.
    So that's why I turned to the raw device finally.

    BTW I solved the device permission issue by adding oracle user into disk group. which was the default group enabled to write raw devices by default.
    Now I can setup udev changing owners to oracle.oisntall ...

    Meanwhile I found in MOS doc:
    Oracle ASMLib Software Update Policy for Oracle Linux [ID 1096685.1]
    that we need ULN acess to get ASM...

    Other docs from MOS:
    Configuring Oracle ASMLib on Multipath Disks on Linux [ID 394956.1]
    ASM Technical Best Practices [ID 265633.1]

    Edited by: Kecskemethy on Nov 24, 2011 6:49 AM
  • 4. Re: oracleasm createdisk fails - permission denied
    Dude! Guru
    Currently Being Moderated
    Since Oracle database isn't certified for OL6 I didn't play too much with it, but I remember creating asm disks works.

    Have you seen the following link:
    Release plans for oracleasm and RHEL 6?

    There is no oracleasm package for the uek kernel because it is build-in. You will still need to install the "oracleasm-support" package.

    http://www.oracle.com/technetwork/topics/linux/asmlib/index-101839.html

    The "oracleasmlib" package allows Oracle to access the kernel driver. I think it is not absolutely necessary since you can use /etc/init.d/oracleasm routines and specify the device string for ASM disks manually. As as I remember you can download http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el5.x86_64.rpm though, which is not kernel version dependent and still works in OL6.

    Did you use "modprobe oracleasm"?

    Edited by: Dude on Nov 24, 2011 6:59 AM
  • 5. Re: oracleasm createdisk fails - permission denied
    Zoltan Kecskemethy Expert
    Currently Being Moderated
    Ah no. I did not load that kernel module.
    modprobe oracleasm
    Why this module is not auto-loaded?! I used /etc/init.d/oracleasm script and I thought it does auto load this module.
    Retesting...

    This could be dazzer's issue too!

    Edited by: Kecskemethy on Nov 24, 2011 7:05 AM
  • 6. Re: oracleasm createdisk fails - permission denied
    dazzer Newbie
    Currently Being Moderated
    Thanks for the information.

    I've tried using the raw devices and can see them through the grid installer.
    I haven't complted the install and actually setup asm but it looks it would complete - I'll continue and try this but using raw devices doesan't sound like the right way to go.

    I've read through several other posts and documents and everything suggests i should be able to :-

    oracleasm creatdisk TEST1 /dev/mapper/mpathdp1 - but I always get permission denied

    Module is loaded :(

    Edited by: dazzer on Nov 24, 2011 7:27 AM
  • 7. Re: oracleasm createdisk fails - permission denied
    Zoltan Kecskemethy Expert
    Currently Being Moderated
    Same here. No luck. Even module loaded, oracleasmlib pacakge installed I got the same permission denied error. (I guess it is no use to install a RHEL oracleasmlib pkg for OEL, since it has only a few files in /opt/oracle.)
    [root@orali6 ~]# uname -a
    Linux orali6.budapest.epam.com 2.6.32-100.34.1.el6uek.x86_64 #1 SMP Wed May 25 17:46:45 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
    [root@orali6 ~]# lsmod | grep asm
    oracleasm              48306  1 
    [root@orali6 ~]# cat /etc/oracle-release 
    Oracle Linux Server release 6.1
    [root@orali6 ~]# fdisk -l /dev/sdc
    
    Disk /dev/sdc: 34.4 GB, 34359738368 bytes
    255 heads, 63 sectors/track, 4177 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Sector size (logical/physical): 512 bytes / 512 bytes
    I/O size (minimum/optimal): 512 bytes / 512 bytes
    Disk identifier: 0xfe0ff414
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1               1        4177    33551721   83  Linux
    [root@orali6 ~]# /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  ]
    [root@orali6 ~]# /etc/init.d/oracleasm listdisks 
    [root@orali6 ~]# cat /dev/null > /var/log/oracleasm 
    [root@orali6 ~]# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdc1
    Marking disk "ASMDISK1" as an ASM disk:                    [FAILED]
    [root@orali6 ~]# cat /var/log/oracleasm 
    Disk "ASMDISK1" does not exist or is not instantiated
    Writing disk header: done
    Instantiating disk: oracleasm-instantiate-disk: Unable to create ASM disk "ASMDISK1": Permission denied
    failed
    Clearing disk header: done
    [root@orali6 ~]# 
    Looks like we need to go back and use OEL5 U7.
  • 8. Re: oracleasm createdisk fails - permission denied
    dazzer Newbie
    Currently Being Moderated
    Dude,
    Do you know when Oracle database will be certified - or could you point towards any certification matric - struggling to find it.
    Thanks
  • 9. Re: oracleasm createdisk fails - permission denied
    Zoltan Kecskemethy Expert
    Currently Being Moderated
    [url https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&doctype=REFERENCE&id=1304727.1]My Oracle Support: Certification Information for Oracle Database on Linux x86-64 ID 1304727.1
  • 10. Re: oracleasm createdisk fails - permission denied
    Avi Miller Guru
    Currently Being Moderated
    Kecskemethy wrote:
    If I understand well ASMLIB is not supported and not fully available for OEL6.
    This is incorrect: ASMlib is fully supported under Oracle Linux 6 and is built into the Unbreakable Enterprise Kernel.
  • 11. Re: oracleasm createdisk fails - permission denied
    Dude! Guru
    Currently Being Moderated
    Sorry I don't know. Perhaps someone from Oracle can answer that question.
  • 12. Re: oracleasm createdisk fails - permission denied
    Avi Miller Guru
    Currently Being Moderated
    dazzer wrote:
    Do you know when Oracle database will be certified - or could you point towards any certification matric - struggling to find it.
    Certification of Database on Oracle Linux 6 is still in progress.
  • 13. Re: oracleasm createdisk fails - permission denied
    Dude! Guru
    Currently Being Moderated
    I suggest you start your own thread since we are now addressing different things here, ASMLIB or device-mapper.

    Regarding oracleasm, I just verified its operation under OL6.1 x86_64 and have no problems:
    # /etc/init.d/oracleasm deletedisk VOL1
    Removing ASM disk "VOL1":                                  [  OK  ]
    
    # dd if=/dev/zero of=/dev/sdc1
    ^C   46959+0 records in
    46959+0 records out
    
    [root@vm2 /]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
    Marking disk "VOL1" as an ASM disk:                        [  OK  ]
    
    # ls -l /dev/sdc1
    brw-rw---- 1 root disk 8, 33 Nov 25 01:06 /dev/sdc1
    
    # fdisk -l /dev/sdc
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1               1         261     2096451   83  Linux
    
    # yum list oracleasm*
    Loaded plugins: refresh-packagekit
    Installed Packages
    oracleasm-support.x86_64          2.1.5-1.el6          @ol6_u1_base
    oracleasmlib.x86_64          2.0.4-1.el5          installed   
    
    # oracleasm scandisks
    Reloading disk partitions: done
    Cleaning any stale ASM disks...
    Scanning system for ASM disks...
    
    # oracleasm listdisks
    VOL1
    
    # oracleasm status
    Checking if ASM is loaded: yes
    Checking if /dev/oracleasm is mounted: yes
    Did you create any udev rules? I did not. Perhaps you need to use "oracleasm scandisks" or perhaps reboot your system.
  • 14. Re: oracleasm createdisk fails - permission denied
    Zoltan Kecskemethy Expert
    Currently Being Moderated
    I think I have the same issue as dazzer has because I get pretty much the same error message under OEL 6.1
    instantiating disk: oracleasm-instantiate-disk: Unable to create ASM disk "ASMDISK1": Permission denied
    Here I just wanted to report that this issue does not exists under OEL 5.7 (I'm testing it right now in Virutalbox.)
    [root@oel5 ~]# cat /etc/oracle-release 
    Oracle Linux Server release 5.7
    [root@oel5 ~]# uname -a
    Linux oel5.budapest.epam.com 2.6.32-200.13.1.el5uek #1 SMP Wed Jul 27 21:02:33 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
    
    [root@oel5 ~]# fdisk -l /dev/sdb /dev/sdc /dev/sdd
    
    Disk /dev/sdb: 34.3 GB, 34359738368 bytes
    255 heads, 63 sectors/track, 4177 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1               1        4177    33551721   83  Linux
    
    Disk /dev/sdc: 34.3 GB, 34359738368 bytes
    255 heads, 63 sectors/track, 4177 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdc1               1        4177    33551721   83  Linux
    
    Disk /dev/sdd: 34.3 GB, 34359738368 bytes
    255 heads, 63 sectors/track, 4177 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdd1               1        4177    33551721   83  Linux
    
    
    [root@oel5 ~]# /etc/init.d/oracleasm status
    Checking if ASM is loaded: no
    Checking if /dev/oracleasm is mounted: no
    [root@oel5 ~]# /etc/init.d/oracleasm enable
    Writing Oracle ASM library driver configuration: done
    Initializing the Oracle ASMLib driver:                     [  OK  ]
    Scanning the system for Oracle ASMLib disks:               [  OK  ]
    [root@oel5 ~]# /etc/init.d/oracleasm status
    Checking if ASM is loaded: yes
    Checking if /dev/oracleasm is mounted: yes
    [root@oel5 ~]# /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  ]
    [root@oel5 ~]# /etc/init.d/oracleasm scandisks 
    Scanning the system for Oracle ASMLib disks:               [  OK  ]
    [root@oel5 ~]# /etc/init.d/oracleasm createdisk ASMDISK01 /dev/sdb1 
    Marking disk "ASMDISK01" as an ASM disk:                   [  OK  ]
    [root@oel5 ~]# /etc/init.d/oracleasm createdisk ASMDISK02 /dev/sdc1 
    Marking disk "ASMDISK02" as an ASM disk:                   [  OK  ]
    [root@oel5 ~]# /etc/init.d/oracleasm createdisk ASMDISK03 /dev/sdd1 
    Marking disk "ASMDISK03" as an ASM disk:                   [  OK  ]
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points