티스토리 뷰

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

 

oracle – The Geek Diary

 

www.thegeekdiary.com

 

https://www.thegeekdiary.com/centos-rhel-7-how-to-set-udev-rules-for-asm-on-multipath-disks/

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함