Oracle user writing to ASM disks owned by grid

Version:11gR2
OS: Solaris, AIX, LINUX
When Grid infrastructure is owned by grid user, the permissions should be like
# chown grid:asmadmin /dev/rdsk/cxtydzs4
# chmod 660 /dev/rdsk/cxtydzs4But, how does oracle user which belongs to dba group manage to write to these disks ?

Hi,
If the device names are the same on all nodes, then enter commands similar to the following on all nodes to change the owner, group, and permissions on the character raw device files for the disk devices where grid is the Oracle Grid
Infrastructure installation owner, and asmadmin is the OSASM group
example
# chown grid:asmadmin /dev/rhdiskn
# chmod 660 /dev/rhdiskn
see this link
http://download.oracle.com/docs/cd/E11882_01/install.112/e17210.pdf

Similar Messages

  • RE: Creation of two oracle database in Single ASM Disk group

    IS it possible to create two oracle database in Single ASM Disk group. if it is possible how?.
    Giri

    All you have to do is to create a tablespace at the most minimumlevel and your db would become a client of the disk group. Other than that, you can migrate your db tothe disk group and it would be then start using the same disk group shared by another database for its use also.
    HTH
    Aman....

  • Installing Oracle 11gR2 RAC Problem: ASM disks

    Folks,
    Hello. I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer and according to the tutorial
    http://appsdbaworkshop.blogspot.com/2011/10/11gr2-rac-on-linux-56-using-vmware.html
    At the first time, I create VM rac1. While its OS Oracle Linux 5.6 is booting, initializing ASMLib Driver OK. I create 5 ASM disks successfully using the command:
    [root@rac1 /]# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdb1
    Output: Marking disk "ASMDISK1" as an ASM disk: OK
    Because the hard disk space of rac1 is not enough to install Database, I create VM rac1 again with bigger hard disk space (30GB). I do everything the same with that at the first time. But this time, While OS Oracle Linux 5.6 is booting, initializing ASMLib Driver failed. I create 5 ASM disks using the same command:
    [root@rac1 /]# /etc/init.d/oracleasm createdisk ASMDISK1 /dev/sdb1
    Output: Marking disk "ASMDISK1" as an ASM disk: failed
    But when I use the command:
    [root@rac1 /]# /etc/init.d/oracleasm listdisks
    Output: ASMDISK1 ASMDISK2 ASMDISK3 ASMDISK4 ASMDISK5
    My questions are:
    First, can the 5 disks "ASMDISK1 ASMDISK2 ASMDISK3 ASMDISK4 ASMDISK5" be used correctly in spite of Marking disk "ASMDISK1(2 3 4 5)" as an ASM disk failed ?
    Second, how to fix OS Oracle Linux 5.6 so that initializing ASMLib Driver OK while booting ?
    Thanks.

    Folks,
    Hello. The issue is solved by myself. Thanks.

  • Oracle 11gR2 RAC Installation - ASM Disks - Need advice on configurations

    Hi Guys
    How many disks are needed for Voting, Data, Log and Failover. Each should be in a seperate group or it can be in a single group of disk. Please advice. Thanks.

    Hi Friend,
    Option 1 :
    If Oracle Clusterware is used for implementing normal redundancy. We require the following for failover purpose also.
    1. Two OCR files - 280 MB each
    2. Three Voting Disks - 280 MB each
    Total - 1.4 GB approx
    Option 2 :
    Oracle recommends that the disk used for the file system be on a RAID. When you use external redundancy the minimum requirement is One OCR and One Voting Disk with 280 MB each.
    Choices :
    1. External Redundancy - > Minimum No Of Disks (1) - > One OCR (280 MB) and One Voting Disk (280 MB) -> 580 MB
    2. Normal Redundancy - > Minimum No Of Disks (3) - > Two OCR (560 MB) and Three Voting Disk (840 MB) -> 1.4 GB
    3. High Redundancy - > Minimum No Of Disks (5) - > Three OCR (840 MB) and Five Voting Disk (1.4 GB) -> 2.3 GB
    So, Choose based on redundancy...
    Hope it helps..
    Note : Use ASM for storing above files..
    Thanks
    LaserSoft

  • ASM Disk preparation for Datafiles and FRA in Oracle 10g RAC Inst

    Dear Friends,
    Please clarify wheteher the below method is correct to confiure ASM disks for Datafiles and FRA
    Partitions provided by IT team for OCR and Voting Disk
    /dev/sda1 - 150 GB (For +DATA)
    /dev/sda2 - 100 GB (For +FRA)
    OS     : RHEL 5.6 (64 Bit)
    kernel version = 2.6.18-238.el5
    Steps:(Node1)
    1) Install the RPM's for ASM
    rpm -Uvh oracleasm-support-2.1.7-1.el5.x86_64.rpm
    rpm -Uvh oracleasm-2.6.18-238.el5-2.0.5-1.el5.x86_64.rpm
    rpm -Uvh oracleasmlib-2.0.4-1.el5.x86_64.rpm
    2) Configure ASM
    /etc/init.d/oracleasm configure
    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
    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  ]
    3) Cretae ASM Disk
    /etc/init.d/oracleasm createdisk DISK1 /dev/sda1
    /etc/init.d/oracleasm createdisk DISK2 /dev/sda2
    4)/etc/init.d/oracleasm status
    5)/etc/init.d/oracleasm scandisks
    6)/etc/init.d/oracleasm listdisks
    7) Nothing to perform on Node2
    8) In dbca choose ASM and map the DISK1 for datafiles and DISK2 for FRA
    Please confirm the above steps are right?if not please clarify
    If DBCA ->ASM doesn't discover my disk then what should be the Discovery path i have to give?
    Please refer any document / Metalink ID for the above complete process
    Can i have ASM and oracle DB binary in the same home
    Regards,
    DB

    user564706 wrote:
    If DBCA ->ASM doesn't discover my disk then what should be the Discovery path i have to give?for asm disk created with oracleasm discovery path variable is ORCL:*
    Please refer any document / Metalink ID for the above complete processhttp://docs.oracle.com/cd/B19306_01/install.102/b14203/storage.htm#BABIFHAB
    Can i have ASM and oracle DB binary in the same homeyes. unless you want job role seperation or plan to run multiple versions of oracle homes
    >
    Regards,
    DB

  • Oracle ASM Disk Name Lenght Limit

    Hi,
    Does anyone know wheter or not oracleasm has a maximum disk name lenght limit, I have a situation where "#oracleasm listdisks" shows the same name for 5 of my disks and seems to have truncated the last character from the disk name.
    So, now my ASM Diskgroup is not starting up because it sees that there are "missing" disks, but they are not missing, they are just listed with the same Disk Name.
    Commands used to create the disks:
    oracleasm createdisk RAC_DATA146_500GB_DISK001 /dev/emcpowerek1
    oracleasm createdisk RAC_DATA146_500GB_DISK002 /dev/emcpowerem1
    oracleasm createdisk RAC_DATA146_500GB_DISK003 /dev/emcpowerej1
    oracleasm createdisk RAC_DATA146_500GB_DISK004 /dev/emcpowerel1
    oracleasm createdisk RAC_DATA146_500GB_DISK005 /dev/emcpowerei1
    Now, see the output when I do a querydisk:
    [root@birac01 ~]# oracleasm querydisk /dev/emcpowerek1
    Disk "/dev/emcpowerek1" is marked an ASM disk with the label "RAC_DATA146_500GB_DISK00"
    [root@birac01 ~]# oracleasm querydisk /dev/emcpowerem1
    Disk "/dev/emcpowerem1" is marked an ASM disk with the label "RAC_DATA146_500GB_DISK00"
    [root@birac01 ~]# oracleasm querydisk /dev/emcpowerej1
    Disk "/dev/emcpowerej1" is marked an ASM disk with the label "RAC_DATA146_500GB_DISK00"
    [root@birac01 ~]# oracleasm querydisk /dev/emcpowerel1
    Disk "/dev/emcpowerel1" is marked an ASM disk with the label "RAC_DATA146_500GB_DISK00"
    [root@birac01 ~]# oracleasm querydisk /dev/emcpowerei1
    Disk "/dev/emcpowerei1" is marked an ASM disk with the label "RAC_DATA146_500GB_DISK00"
    So, it looks like the version of oracleasm that I'm running has a name lenght limit? IS this possible?
    [root@birac01 ~]# rpm -qa | grep oracleasm
    oracleasm-support-2.0.3-1
    oracleasm-2.6.9-55.ELsmp-2.0.3-1
    oracleasmlib-2.0.2-1
    Can anyone please help?
    Regards
    Stephan
    Edited by: user1675141 on Mar 22, 2011 2:10 AM

    Oracleasmlib does not seem to advertise such information. As such it might be a poor design that it is not verifiying user input.
    According to http://download.oracle.com/docs/cd/E11882_01/install.112/e17212/storage.htm#CWLIN294
    +"The disk names that you specify can contain uppercase letters, numbers, and the underscore character. They must start with an uppercase letter."+
    The Oracle ASM assistant documentation shows:
    +"A volume name of Oracle ASM can be a maximum of 11 alphanumeric characters; dashes are not allowed. The first character must be alphabetic"+
    Why are you using such long volume and device names in first place? I would abbreviate the names and make them shorter. The url above will also show you information about configuring multipath and udev.
    You could try to query device names using:
    /etc/init.d/oracleasm querydisk -p VOL1
    and rename volumes using:
    /etc/init.d/oracleasm renamedisk /dev/sdb1 VOL1
    Edited by: Dude on Mar 22, 2011 5:19 AM

  • OUI returns "Verify that the partition is owned by Oracle user" message

    Hi,
    When I'm installing Clusterware 10.2.0.1 I receive the following error on the OCR location screen:
    "The specified shared raw partition /dev/ora1/ may not have correct permission. Verify that the partition is owned by Oracle User."
    I have used the "chown" command to change the owner and group to oracle:dba but it didn't work, I'm still get the message.
    This is my disk:
    node1/oracle/ocr_voting1/> ls -la /dev/ora1
    crwxrwxrwx 1 oracle dba 2,150 Feb 25 02:15 /dev/ora1
    node1/oracle/ocr_voting1/>
    As you can see I have set 777 permissions.
    What else Can I do ?
    Thank you

    Hi,
    I'm looking the dd command on oraexperts.com but I haven't founanged it.
    I'm installing 10.2..0.1 but we are gonig upgrade to 10.2.0.4 as soon we install CRS
    I have the correct permissions on the second node, actually I can create and delete files from both nodes in the same device.
    I changed permission for /dev/oracle and the error still happens. I changed the owner and group directly on the hdisk21 and I specify this path: /dev/hdisk21 but it didn't work.
    I have 777 permissions for that device, it has oracle owner and dba group but I still have the same error.
    My OS is AIX 5.3. ML8
    We are using GPFS 3.2
    Because CRS needs a raw device to storage the voting disk, How can I know what raw devices are ? How can I be
    sure that my hdisk21 is a raw device ?

  • Oracle ASM disk group

    Hi,
    Having a multiple Oracle ASM disk group is more beneficial for Oracle database? if no why? if yes why?
    Any metalink note if have.
    thanks

    Any metalink note do you refer?What is your database version?
    Please see these docs.
    11g ASM New Feature [ID 429098.1]
    ASM 11g New Features - How ASM Disk Resync Works. [ID 466326.1]
    Thanks,
    Hussein

  • Oracle ASM Disks Question

    Hi,
    We have two Linux hosts accessing EMC SAN LUNs and we have Oracle ASM Disks created on those devices. Both the Linux Hosts (server1/2)are in once Dell Blade Chassis1 and one of the Server we are planning to move to a different Dell Chassis(2) to have redundency in case of Chassis1 faliure. But if we move one server2 to Chassis2 the HBA WWN Number for the host on the new Dell Chassis2 will change ( WWNs are assigned by Chassis on Dell) and the server2 will loose all the SAN LUNs from EMC Array. I will have to rezone the new server WWNs to storage and pesent the same disks again and rescan the disks which will take couple of reboots. During this period EMC LUNs will not be visible to server2 and I would like to what will happen to ASM disks on the server2 and how to I accomlish this goal? Any detailed steps please? This is a production system with oracle 11g running.
    This is the output of emc powerpath devices (LUNs) which is same on both the hosts.
    [root@server2 ~]# powermt display dev=all | grep emc
    Pseudo name=emcpowerl
    Pseudo name=emcpowerj
    Pseudo name=emcpowerf
    Pseudo name=emcpowerk
    Pseudo name=emcpowerg
    Pseudo name=emcpowerh
    Pseudo name=emcpowerm
    Pseudo name=emcpoweri
    [root@server2 ~]#
    This are the ASM disks on both the hosts:
    [root@server2 ~]# oracleasm listdisks
    DATA01_F1
    DATA01_G1
    DATA01_H1
    DATA01_I1
    FRA01_L1
    LOG01_J1
    LOG01_K1
    [root@server2 ~]#
    Thanks in advance.

    808306 wrote:
    But if we move one server2 to Chassis2 the HBA WWN Number for the host on the new Dell Chassis2 will change ( WWNs are assigned by Chassis on Dell) and the server2 will loose all the SAN LUNs from EMC Array.This does not sound correct to me. WWNs are global - not local. If the WWN is foo123 on server1 for EMC LUN1, why would it not also be foo123 on server2 for EMC LUN1? When you move to server3 or install server3, why would EMC LUN1 not have a WWN of foo123 on server3?
    I will have to rezone the new server WWNs to storage and pesent the same disks again and rescan the disks which will take couple of reboots. Using Powerpath perhaps - using multipath, not. New devices (LUNs) can be made visible by the kernel my refreshing multipath - no reboot required. If existing LUNs are going to be changed - yes, a single reboot will be needed. But not multiple (unless you have a driver issue with stale connections not being reset on the storage server side).
    This is the output of emc powerpath devices (LUNs) which is same on both the hosts.We dropped Powerpath a long time ago. There were compatibility issues between it and AsmLib kernel drivers. Powerpath taints the Linux kernel and limits kernel upgrade flexibility. I refuse to run it on our new clusters. I use multipath instead - the very same s/w used by some of the largest clusters (with Pentabyte storage) in the world. The comfort factor using Open Source drivers (and certified for that kernel version) is significantly higher than installing 3rd party kernel driver binaries - and having to deal with a 2nd party when it comes to o/s and kernel support.

  • Oracle ASM disk to WWID

    Anyone know of a way to take an Oracle ASM disk (i.e. oracle ORCL:TEST_ASMDATA006) and finding the wwid of the underlying LUN? We are running 11.2.0.3 EE on redhat 5.8 with asmlib installed. Our current thought is we can take major minor and back track to multipath.conf file which we manually maintain when we add a lun. Would prefer a more direct way to do this if there is one.
    Thanks
    Steve

    You can query the physical device of a ASMLib volume using:
    /etc/init.d/oracleasm querydisk -p ASMVOL
    Then query the WWID:
    scsi_id -g -u -s /block/sda

  • Oracle user can't execute grid owned asmcmd

    11.2.0.2 in RHEL 5.4
    In my shop, OS user grid manages Grid Infrastructure.
    I don't have the password for grid user.
    As oracle user , I was trying to invoke asmcmd. But it errored out with the below error. Is this normal ?
    It seems that Oracle installs its own perl binary in GI Home.
    I can run crsctl which run from GI home though.
    ## Currently connected as oracle user
    $ id
    uid=555(oracle) gid=56(oinstall) groups=55(dba),56(oinstall),57(oper),58(asmadmin),59(asmdba)
    # oracle user has execute privileges on crsctl binary (because oracle belongs to oinstall group )
    $ ls -alrt `which crsctl`
    -rwxr-xr-x 1 grid oinstall 8260 Jun  1  2011 /u01/app/grid/product/11gR2/bin/crsctl
    # Attempts to invoke asmcmd command from oracle user fails because it doesn't have execute privilege on perl and asmcmd binaries in GRID_HOME/bin
    $ echo $ORACLE_SID
    +ASM1
    $ asmcmd
    /u01/app/grid/product/11gR2/bin/asmcmd: line 123: /u01/app/grid/product/11gR2/perl/bin/perl: Permission denied
    /u01/app/grid/product/11gR2/bin/asmcmd: line 146: /u01/app/grid/product/11gR2/perl/bin/perl: Permission denied
    /u01/app/grid/product/11gR2/bin/asmcmd: line 146: exec: /u01/app/grid/product/11gR2/perl/bin/perl: cannot execute: Permission denied
    $ ls -alrt /u01/app/grid/product/11gR2/perl/bin/perl
    -rwx------ 1 grid oinstall 1424555 Sep  3  2009 /u01/app/grid/product/11gR2/perl/bin/perl
    $
    $ which perl
    /usr/bin/perl
    $ ls -alrt /usr/bin/perl
    -rwxr-xr-x 2 root root 19208 Jul  2  2009 /usr/bin/perl
    # oracle user doesn't have execute privileges on asmcmd
    $ ls -alrt `which asmcmd`
    -rwxr-x--- 1 grid oinstall 5469 Apr 21  2010 /u01/app/grid/product/11gR2/bin/asmcmdIn my previous shops, oracle user managed both RDBMS and GI homes.
    So, I would like to know ; In a typical RAC setup where grid user manages GI , what are the grid owned binaries that oracle user cannot execute ?

    As oracle user , I was trying to invoke asmcmd. But it errored out with the below error. Is this normal ?yes as asmcmd suppose to be run from grid user after setting the oracle env variable.
    -rwx------ 1 grid oinstall 1424555 Sep 3 2009 /u01/app/grid/product/11gR2/perl/bin/perl-rwx------
    user under oinstall group doesn't have permission to execute file under above location.
    only grid can execute it.
    so login with grid and run asmcmd cmd.

  • Reinstalling Oracle 11gR2 RAC Grid Problem - ASM Disks Group

    Folks,
    Hello.
    I am installing Oracle 11gR2 RAC using 2 Virtual Machines (rac1 and rac2 whose OS are Oracle Linux 5.6) in VMPlayer.
    I have been installing Grid Infrastructure using runInstaller in the first VM rac1 from step 1 to step 9 of 10.
    On the step 9 of 10 in the Wizard, accidentally, I touch the Mouse, and the Wizard is gone.
    The directory for installing Grid in the 2 VMs is the same: /u01
    In order to make sure everything is correct, I delete entire directory /u01 in the 2 VMs and install Grid in rac1 again.
    I have understood it's not the right way to delete /u01. The right way is to follow the tutorial
    http://docs.oracle.com/cd/E11882_01/install.112/e22489/rem_orcl.htm#CBHEFHAC
    But I have deleted /u01 and need to fix one by one. I install Grid again and get the error message on step 5 of 9 as follows:
    [INS - 30516] Please specify unique disk groups.
    [INS-3050] Empty ASM disk group.
    Cause - Installer has detected the disk group name provided already exists on the system.
    Action - Specify different disk group.
    In Wizard, the previous Disk Group name is "DATA" and its Candidate disks (5 ASMDISKs) are gone. I try to use a different name "DATA2", but no ASMDISKs come up under "Candidate disks". For "ALL Disks", all ASMDISKs cannot be selected.
    I want to use the same ASM disk group "DATA" and don't want to create a new disk group.
    My question is:
    How to have the previous ASM disks and its group "DATA" come up under "Candidate Disks" so that can use it again ?
    Thanks.

    Hi, in case this helps anyone else. I got this INS-30516 error too was stumped for little while. I have 2 x 2-node RAC which are hitting same SAN. The first-built RAC has a DATA diskgroup. When went to build second RAC on new ASM disk new DIskgroup (but same diskgroup name DATA) got INS-30516 about diskgroup name already in use etc. Finally figured out all that was required was to restrict diskstring using button in installer to only retrieve the LUNS for this RAC (this was quick and dirty - all LUNS for both RAC being presented to both RAC). Once diskstring only searched for the LUNS required for this RAC only, e.g.
    ORCL:DATA_P* (for DATA_PD and FRA_PD)
    the error went away.
    I also have DATA_DR and FRA_DR presenting to both RAC. Apparently it scans the header and if it finds a diskgroup name that is already in use based on the diskstring scan it will not allow reuse of the diskgroup name since it has no way of knowing that the other ASM disks are for a different RAC.
    HTH

  • Wheather ASM Disk need to be configured before Oracle 11gR2 Grid software

    Hi All,
    I have a confusion regarding ASM Disk configuration. Whether this need to be done before the grid software installation or shall we do it after grid software installation.
    Kindly Advice over the same

    vk82 wrote:
    Hi All,
    I have a confusion regarding ASM Disk configuration. Whether this need to be done before the grid software installation or shall we do it after grid software installation.
    Kindly Advice over the same
    ASM is going to be a storage option. The storage that would be used by the ASM instance must be available already. The installation of the GI would be on the file system of the node.
    HTH
    Aman....

  • Problem with create asm disk group

    Hi all
    I am about configuring ASM, so I have downloaded the Grid infrastructure 11g (32 bit), I have configured and created parameters and directories.
    I runned the installer but get stack at the 3 step where I have to change the discovery path. I have taped as path /dev where I have created 3 partitions sdb1, sdc1 and sdd1.
    Is there any thing should I perform on partitions may be or parameters to set before I go through the installation?
    Thanks for help

    You can use the below link to install ASMLIB:
    http://gssdba.wordpress.com/category/asm/
    REFERANCE : Doc ID 580153.1
    There are two different methods to configure ASM on Linux:
    ASM with ASMLib I/O: This method creates all Oracle database files on raw block devices managed by ASM using ASMLib calls. RAW devices are not required with this method as ASMLib works with block devices.
    ASM with Standard Linux I/O: This method creates all Oracle database files on raw character devices managed by ASM using standard Linux I/O system calls. You will be required to create RAW devices for all disk partitions used by ASM.
    You can download the ASMLIB rpm’s from below URL:
    http://www.oracle.com/technetwork/server-storage/linux/downloads/rhel5-084877.html
    STEP 01: LOG IN AS ROOT USER AND INSTALL THE RPMS
    [root@node1 ASMLIB]# rpm -Uvh oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm \
    > oracleasmlib-2.0.4-1.el5.i386.rpm \
    > oracleasm-support-2.1.8-1.el5.i386.rpm
    warning: oracleasm-2.6.18-164.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
    Preparing… ########################################### [100%]
    1:oracleasm-support ########################################### [ 33%]
    2:oracleasm-2.6.18-164.el########################################### [ 67%]
    3:oracleasmlib ########################################### [100%]
    STEP 02: CONFIGURE ASMLIB
    [root@node1 ASMLIB]# /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) [n]: y
    Scan for Oracle ASM disks on boot (y/n) [y]: y
    Writing Oracle ASM library driver configuration: done
    Initializing the Oracle ASMLib driver: [ OK ]
    Scanning the system for Oracle ASMLib disks: [ OK ]
    STEP 03 :CREATE ASM DISK
    [root@node1 ASMLIB]# /etc/init.d/oracleasm listdisks
    [root@node1 ASMLIB]#
    [root@node1 ~]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdb1
    Marking disk “VOL1″ as an ASM disk: [ OK ]
    [root@node1 ~]# /etc/init.d/oracleasm createdisk VOL2 /dev/sdc1
    Marking disk “VOL2″ as an ASM disk: [ OK ]
    [root@node1 ~]# /etc/init.d/oracleasm createdisk VOL3 /dev/sdd1
    Marking disk “VOL3″ as an ASM disk: [ OK ]
    [root@node1 ~]# /etc/init.d/oracleasm createdisk VOL4 /dev/sde1
    Marking disk “VOL4″ as an ASM disk: [ OK ]
    [root@node1 ~]# /etc/init.d/oracleasm createdisk VOL5 /dev/sdf1
    Marking disk “VOL5″ as an ASM disk: [ OK ]
    [root@node1 ~]# /etc/init.d/oracleasm listdisks
    VOL1
    VOL2
    VOL3
    VOL4
    VOL5
    [root@node1 ~]#

  • ASM: cannot create asm disks - permission denied

    We cannot create ASM disks using the command:
    # /etc/init.d/oracleasm creatdisk ASMDISK1 /dev/mapper/mpathdp1
    Marking disk "ASMDISK1" as an ASM disk: [FAILED]
    The log (/var/log/oracleasm) has the following:
    Clearing disk header: done
    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
    The command is being executed by the root user. Our environment is OEL6:
    [oracle@uxdbidbd1 mapper]$ uname -rm
    2.6.32-100.28.11.el6.x86_64 x86_64
    To install ASMLib we did the following:
    Installed the three packages:
    1.oracleasm-support-2.1.4-1.el5.x86_64.rpm
    2.oracleasmlib-2.0.4-1.el5.x86_64.rpm
    3.oracleasm-2.6.18-238.9.1.el5-debuginfo-2.0.5-1.el5.x86_64.rpm
    [root@uxdbidbd1 ~]# modprobe oracleasm
    [root@uxdbidbd1 ~]# /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 []: oinstall
    Start Oracle ASM library driver on boot (y/n) [n]: y
    Scan for Oracle ASM disks on boot (y/n) [y]: y
    Writing Oracle ASM library driver configuration: done
    Initializing the Oracle ASMLib driver: [  OK  ]
    Scanning the system for Oracle ASMLib disks: [  OK  ]
    [root@uxdbidbd1 ~]#
    [root@uxdbidbd1 ~]# /etc/init.d/oracleasm status
    Checking if ASM is loaded: yes
    Checking if /dev/oracleasm is mounted: yes
    Our SA partitioned the disk using fdisk:
    [root@uxdbidbd1 ~]# fdisk -l /dev/mapper/mpathd
    Disk /dev/mapper/mpathd: 52.4 GB, 52428800000 bytes
    255 heads, 63 sectors/track, 6374 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: 0x4849251a
    Device Boot Start End Blocks Id System
    /dev/mapper/mpathdp1 1 6374 51199123+ 83 Linux
    Here are the owner/permissions:
    [oracle@uxdbidbd1 mapper]$ ls -al /dev/mapper/
    lrwxrwxrwx. 1 root root 7 Apr 22 14:58 mpathd -> ../dm-5
    brw-rw-r--. 1 oracle oinstall 253, 6 Apr 25 10:56 mpathdp1
    [oracle@uxdbidbd1 dev]$ ls -al /dev
    brw-rw----. 1 root disk 253, 5 Apr 22 15:45 dm-5
    drwxr-xr-x. 4 root root 0 Apr 22 14:58 oracleasm
    [oracle@uxdbidbd1 oracleasm]$ ls -al /dev/oracleasm
    total 0
    drwxr-xr-x. 4 root root 0 Apr 22 14:58 .
    drwxr-xr-x. 23 root root 7200 Apr 24 03:41 ..
    -rw-rw----. 1 oracle oinstall 0 Apr 22 14:58 .check_iid
    drwxr-xr-x. 1 root root 0 Apr 22 14:58 disks
    -rw-rw----. 1 oracle oinstall 0 Apr 22 14:58 .get_iid
    drwxrwx---. 1 oracle oinstall 0 Apr 22 14:58 iid
    -rw-rw----. 1 oracle oinstall 0 Apr 22 14:58 .query_disk
    -rw-rw----. 1 oracle oinstall 0 Apr 22 14:58 .query_version
    We ran an strace on the createdisk command that is failing and I noticed this in the output file:
    28830 mknod("/dev/oracleasm/disks/ASMDISK1", S_IFBLK|0600, makedev(253, 6)) = -1 EACCES (Permission denied)
    28830 write(2, "oracleasm-instantiate-disk: ", 28) = 28
    28830 write(2, "Unable to create ASM disk \"ASMDI"..., 56) = 56
    We changed /dev/oracleasm/disks to 777 in order to test but we got the same result. Do we need to adjust the permissions to all of the parent directories in the path (/dev/oracleasm/disks)? I've been looking around for anything related to permissions on /dev/oracleasm but the docs don't mention anything. Any help would be greatly appreciated.

    From what I understand, you should not set device permissions of /dev/oracleasm since oracleasm takes care of it according to /etc/init.d/oracleasm configure.
    The problem in your case seems to be that ASM refuses to initialize and write metadata to your device. Was the device previously used by ASM? ASM will fail to initialize a device that contains previous ASM metadata. To erase the device you will need to use the dd command, e.g. dd if=/dev/zero of=/dev/sdb. Both ASMLib and raw devices require the candidate disks to be partitioned before they can be accessed. To create a partition on /dev/sdb, for instance, type fdisk /dev/sdb and create a standard partition using the defaults. This will create /dev/sdb1 and you can try oracleasm createdisk again.
    You may try the above, but anyway, I was not sure how much you can trust your installation. The problem could also be that you installed the oracleasm kernel driver and asmlib software for OEL 5. Oracle Linux 6 includes an oracleasm kernel driver and as far as I remember you must not install another oracleasm kernel driver. Using modprob oracleasm and installing oracleasm support package using yum should do the trick. You may also need to download and install the asmlib package for the Oracle ASM grid install to see the ASM disks.

Maybe you are looking for