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
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/
,如需转载,请注明出处,否则将追究法律责任。