Udev rules does not work

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux(RHEL) 6
  • Red Hat Enterprise Linux(RHEL) 7

Issue

  • Udev rules for creating asm disk symlinks to multipath devices does not work

Resolution

Example content of udev-rules file

ACTION=="add|change",ENV{DM_UUID}=="mpath-8937058940A802D001671617E1196E123",NAME+="oracleasm/disk01",OWNER="oracle",GROUP="oinstall",MODE="0660"
ACTION=="add|change",ENV{DM_UUID}=="mpath-8937058940A802D00F44429CD1196E123",NAME+="oracleasm/disk02",OWNER="oracle",GROUP="oinstall",MODE="0660"
ACTION=="add|change",ENV{DM_UUID}=="mpath-8937058940A802D003689B9D91196E123",NAME+="oracleasm/disk03",OWNER="oracle",GROUP="oinstall",MODE="0660"

Udev rules are case sensitive, using ENV{DM_UUID} field does not match because it has big letters

Use UUID output from #udevadm info --query=all --name=/dev/mapper/
Do not use UUID output from multipath -ll command

Correct example content of udev-rules file

ACTION=="add|change",ENV{DM_UUID}=="mpath-8937058940a802d001671617e1196e123",NAME+="oracleasm/disk01",OWNER="oracle",GROUP="oinstall",MODE="0660"
ACTION=="add|change",ENV{DM_UUID}=="mpath-8937058940a802d00f44429cd1196e123",NAME+="oracleasm/disk02",OWNER="oracle",GROUP="oinstall",MODE="0660"
ACTION=="add|change",ENV{DM_UUID}=="mpath-8937058940a802d003689b9d91196e123",NAME+="oracleasm/disk03",OWNER="oracle",GROUP="oinstall",MODE="0660"

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.