ITPub博客

首页 > 数据库 > Oracle > How to set udev rule for setting the disk permission on ASM disks

How to set udev rule for setting the disk permission on ASM disks

Oracle 作者:q418441117 时间:2016-11-25 09:51:51 0 删除 编辑

How to set udev rule for setting the disk permission on ASM disks when using multipath on OL 6.x (Doc ID 1521757.1)


In this Document

Goal
Solution


APPLIES TO:

Linux OS - Version Oracle Linux 6.0 with Unbreakable Enterprise Kernel [2.6.32] and later
Information in this document applies to any platform.
review currency on 22th.Sep 2014

GOAL

How to set udev rule for setting the disk permission on ASM disks when using multipath on OL 6.x.
 

SOLUTION

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

# 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

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26655292/viewspace-2129054/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-09-11

  • 博文量
    203
  • 访问量
    471913