• 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

How to set udev rule for setting the disk permission on ASM disks when using multipath on CentOS/RHEL 6

by admin

This note explains how to set udev rule for setting the disk permission on ASM disks in multipath on CentOS/RHEL 6.x. Follow the below steps if you are using multipath and want to set udev rule on multipath device.

1. Determine partitioned alias for target device

# dmsetup ls |grep p1
datap1 (253, 4)      ### you would see something similar to this

2. Edit /etc/udev/rules.d/12-dm-permissions.rules file to set the above device ownership as oracle:dba.

# vi /etc/udev/rules.d/12-dm-permissions.rules
# Set permissions for first partition created on a multipath device (and detected by kpartx)
ENV{DM_NAME}=="datap1", OWNER:="oracle", GROUP:="dba", MODE:="660", SYMLINK+="iscsi/oraasm-$env{DM_NAME}"

3. Restart multipathd service.

# service multipathd restart

4. Check if permissions are correct

# ls -l /dev/dm*
brw-rw---- 1 root   disk 253, 0 Apr 15 19:40 /dev/dm-0
brw-rw---- 1 root   disk 253, 1 Apr 15 19:40 /dev/dm-1
brw-rw---- 1 root   disk 253, 2 Apr 15 21:47 /dev/dm-2
brw-rw---- 1 root   disk 253, 3 Apr 15 21:47 /dev/dm-3
brw-rw---- 1 oracle dba  253, 5 Apr 15 21:47 /dev/dm-4

5. Verify if oracle ASM symbolic links exists for multipath devices.

# ls -l /dev/iscsi/*
lrwxrwxrwx 1 root root 7 Apr 15 21:47 /dev/iscsi/oraasm-datap1 -> ../dm-4

Filed Under: ASM, CentOS/RHEL 6, OEL 6, oracle

Some more articles you might also be interested in …

  1. How to modify the iSCSI initiator ID in Linux
  2. How to determine file and free space fragmentation of OCFS2
  3. ORA-00031: session marked for kill
  4. Installing Security Vulnerabilities with yum on CentOS/RHEL 5,6,7 (Cheat Sheet)
  5. Bind to port 22 on 0.0.0.0 failed: address already in use – error while starting sshd service CentOS/RHEL
  6. How to recreate Control file in Oracle Database
  7. How to Convert Ext File Systems to Btrfs
  8. How to Install and configure OSWatcher Black Box (OSWbb)
  9. How to Install SSHFS on CentOS/RHEL/Ubuntu
  10. How to Enable or Disable Veritas ODM for Oracle database 12.1.0.1

You May Also Like

Primary Sidebar

Recent Posts

  • powertop Command Examples in Linux
  • powertop: command not found
  • powerstat: command not found
  • powerstat Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright