• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

CentOS / RHEL 7 : How to set udev rules for ASM on multipath disks

by admin

Udev is the mechanism used to create and name /dev device nodes corresponding to the devices that are present in the system. Udev uses matching information provided by sysfs with rules provided by the user to dynamically add the required device nodes.

The post describes how to set udev rules for ASM disks in a dm multipath environment. The multipath disk used as an example is /dev/mapper/multipathx. We will be setting the udev rule for the multipath disks to have ownership of oracle:grid.

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.

Filed Under: ASM, CentOS/RHEL 7, Linux, OEL 7, oracle

Some more articles you might also be interested in …

  1. lcov: command not found
  2. Oracle ASM 11gR2 instance is unable to start due to missing ASM spfile
  3. How to use mdadm to create a software mirror on top of multipath devices
  4. Beginners Guide to DHCP – Install and configure DHCP server and client
  5. CentOS / RHEL 7 : Beginners guide to firewalld
  6. What is chroot jail in Linux
  7. How to Change or Rename a Mount Point in Linux
  8. How to check rpm package integrity in Linux
  9. Linux OS Service ‘sysstat’
  10. kwriteconfig5 Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • qsub Command Examples in Linux
  • qsub: command not found
  • qrcp Command Examples in Linux
  • qmrestore Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright