UDEV rules for configuring ASM disks

Problem:

During my previous installations I used the following udev rule on multipath devices:

KERNEL=="dm-[0-9]*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/$parent", RESULT=="360050768028200a9a40000000000001c", NAME="oracleasm/asm-disk1", OWNER="oracle", GROUP="asmadmin", MODE="0660"

So to identify the exact disk I used PROGRAM option. The above script looks through `/dev/dm-*` devices and if any of them satisfy the condition, for example:

# scsci_id -gud /dev/dm-3
360050768028200a9a40000000000001c 

then device name will be changed to /dev/oracleasm/asm-disk1, owner:group to grid:asmadmin and permission to 0660

But on my new servers same udev rule was not working anymore. (Of course, it needs more investigation, but our time is really valuable and never enough and if we know another solution that works and is acceptable- let’s just use it)

Solution:

I used udevadm command to identify other properties of these devices and wrote new udev rule (to see all properties, just remove grep):

# udevadm info --query=property --name /dev/mapper/asm1 | grep DM_UUID
DM_UUID=mpath-360050768028200a9a40000000000001c

New udev rule looks like this:

# cat /etc/udev/rules.d/99-oracle-asmdevices.rules
ENV{DM_UUID}=="mpath-360050768028200a9a40000000000001c",  SUBSYSTEM=="block", NAME="oracleasm/asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660"

Trigger udev rules:

# udevadm trigger

Verify that name, owner, group and permissions are changed:

# ll /dev/oracleasm/
total 0
brw-rw---- 1 grid asmadmin 253, 3 Jul 17 17:33 asm-disk1

Supported Oracle Versions and Operating Systems

I was trying to install Oracle 10.2.0.1 on Windows Server 2008 R2 and of course this installation was UNSUCCESSFUL. So I decide to post Oracle versions and Operating System list. Here it is:

Oracle versions

Windows Server versions

Oracle 10g, Release 2 (10.2.0.1.0)
  • Windows Server 2003 (64-bit)
Oracle 10g, Release 2 (10.2.0.2.0, 10.2.0.3.0)
    • Windows Server 2003 (64-bit)

    • Windows Server 2003 (64-bit) R2

Oracle 10g, Release 2 (10.2.0.4.0)
  • Windows Server 2003 (64-bit)

  • Windows Server 2003 (64-bit) R2

  • Windows Server 2008 (64-bit)

Oracle 10g, Release 2 (10.2.0.5.0)
  • Windows Server 2003 (64-bit)

  • Windows Server 2003 (64-bit) R2

  • Windows Server 2008 (64-bit)

  • Windows Server 2008 (64-bit) R2

Oracle 11g, Release 1 (11.1.0.6.0)
  • Windows Server 2003 (64-bit)

  • Windows Server 2003 (64-bit) R2

Oracle 11g, Release 1 (11.1.0.7.0)
  • Windows Server 2003 (64-bit)

  • Windows Server 2003 (64-bit) R2

  • Windows Server 2008 (64-bit)

Oracle 11g, Release 2 (11.2.0.1.0, 11.2.0.2.0)
  • Windows Server 2003 (64-bit)

  • Windows Server 2003 (64-bit) R2

  • Windows Server 2008 (64-bit)

  • Windows Server 2008 (64-bit) R2