How to create Oracle ASM devices using Device-mapper multipath devices in Red Hat Enterprise Linux 6?
Environment
Red Hat Enterprise Linux 6 device-mapper Multipath (DM Multipath) Oracle ASM Udev
Resolution
Following steps to create Oracle ASM disks with Dm-multipath on RHEL 6 systems:
Determine the Dm_uuid value for each multipath device, which is required to being used for Oracle ASM. You could use following command for the same:
$ udevadm Info--query=all--name=/dev/mapper/mpathn |grep-i dm_uuid
Please replace MpathN in above command with name of the multipath devices used in your setup/environment.
The output of above command would is similar to the one shown below:
$ udevadm Info--query=all--name=/dev/mapper/mpathd|grep-i dm_uuid e:dm_uuid=mpath-1234567890abcdefghijklmnopqrstuv Wxyz
Above command would is required to being repeated for each multipath device to being used with Oracle ASM, and please note down The Dm_uuid value retrieved for each multipath device. This value would is used to create Udev rule.
Create a Udev rule file/etc/udev/rules.d/96-asmmultipath.rules and add a udev rule for each multipath device using it s D M_uuid Value:
action== "Add|change", env{dm_uuid}== "mpath-<uuid>", symlink+= "oracleasm/asm01", group= "DBA", OWNER= "Oracle", Mode= "0660"
e.g. to-create Oracle ASM disk/dev/oracleasm/asm01 using above multipath device MPATHD following udev rule could be used:
$ cat/etc/udev/rules.d/96-asmmultipath.rules action== "Add|change", env{dm_uuid}== " Mpath-1234567890abcdefghijklmnopqrstuvwxyz ", symlink+=" oracleasm/asm01 ", group=" DBA ", owner=" Oracle ", MODE=" 0660 "
Note that we had replaced mpath-<uuid> in above rule with the Dm_uuid retrieved in step [1]. Similarly a udev rule for each multipath device would is required to be appended In/etc/udev/rules.d/96-asmmultipath.rule S file.
You could also modify Symlink path (e.g. ORACLEASM/ASM01 in above Udev rules), Group, Owner permissions as per requirement .
Reload the Udev service for the changes to take effect and create the ASM disks.
From for notes (Wiz)
How to create Oracle ASM devices using Device-mapper multipath devices in Red Hat Enterprise Linux 6