In Oracle ASM deployments on Linux, consistent device naming and correct ownership are critical—especially when you’re exposing SAN volumes through the Device-Mapper Multipath (DM-MP) layer. By default, multipath devices appear under /dev/mapper with names like mpathX or dm-Y, which can change after reboots or rescans. If ASM disks aren’t reliably identified or owned by the grid user and oinstall group, your cluster may fail to start or experience unexplained I/O errors.

In this article you’ll learn how to:

  1. Identify the unique DM UUID for each multipath device destined for ASM

  2. Write a udev rule that creates a stable symlink (e.g. /dev/asm-disk1), assigns grid:oinstall ownership and sets 0660permissions

  3. Reload and trigger udev so your new rule takes effect immediately

  4. Verify that your ASM candidate disks consistently appear with the correct name, permissions and owner

 

With these steps in place, your ASM instances will see a predictable, secure device layout—eliminating manual renames and reducing the risk of misconfigured disks in your clustered environment.

1. Find the UUID of the disk

 

Determine the UUID of the multipath disk meant for Oracle ASM use.

# udevadm info --query=all --name=/dev/mapper/mpathx | grep -i DM_UUID

Note: In the above command is /dev/mapper/mpathx is just an example multipath disk, in you case it may be different.

 

2. Create udev Rules

 

Create a udev rule file /etc/udev/rules.d/96-asm.rules. Add below udev rule for a multipath device using it’s DM_UUID value under the file /etc/udev/rules.d/96-asm.rules

# vi /etc/udev/rules.d/96-asm.rules
ACTION=="add|change", ENV{DM_UUID}=="mpath-[DM_UUID]", SYMLINK+="udev-asmdisk1", GROUP="oinstall", OWNER="grid", MODE="0660"

 

Replace [DM_UUID] with the one you got it from the step 1 command output. The user and group used here are the owner user/groups of the grid software i.e. oracle and grid respectively.

 

3. Reload udev Rules

 

To add or load Udev rules, use the below commands.

# udevadm control --reload-rules
# udevadm trigger --type=devices --action=change

 

4. Verify the disk permissions.

 

Check file permissions on the disk paths.

# ls -l /dev/udev-asmdisk1
# ls -l /dev/mapper/mpathx
# ls -l /dev/dm-x

 

Note: Here dm-x can be anything like dm-0 or dm-1 or dm-2, so it’s based on your environment.

 

5. Verify the disks with sg_inq command

 

Login as a grid user and check disk information using the sg_inq command. You should be able to see disk information using the below sg_inq commands.

# su - grid
$ sg_inq /dev/mapper/mpathx
$ sg_inq /dev/dm-x

 

Once you have done all the above steps and verified the disk details, you can proceed further with the RAC setup.

Esta resposta foi útil? 0 Utilizadores acharam útil (0 Votos)