Udev rules does not work
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 rule's matching algorithm is case sensitive, the ENV{DM_UUID} field value does not match the real value. This is because the value within the rule has uppercase letters (for example, ...940A... ) while the actual field value has lower case letters (for example, ...940a... ).
Use the 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.
Comments