oracledba.help works great on your mobile device too!

oracledba.help

UDev Configuration

<- SpecialTopics

Overview

The following covers configuring UDev to manage your disks for use with Oracle Linux databases. Assumes you are using Linux 7.x or later.

Procedure

Add Option to scsi_id.config

echo options=-g>>/etc/scsi_id.config

Get Device ID (for each disk)

/usr/lib/udev/scsi_id -g -u -d /dev/sdb
1ATA_VBOX_HARDDISK_VBf70afbfd-d82c476f

Create 99-oracle-asmdevices.rules

  • In RESULT=="" place Device ID string from above. Make an entry for each disk.
  • Also change\increment the SYMLINK+= name for each disk.

vi /etc/udev/rules.d/99-oracle-asmdevices.rules

KERNEL=="sd?1",SUBSYSTEM=="block",
PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent",
RESULT=="1ATA_VBOX_HARDDISK_VBf70afbfd-d82c476f",
SYMLINK+="asm-disk1",
OWNER="grid",
GROUP="asmadmin",
MODE="0660"

The above goes on one line.

3 Disk Example Entries

KERNEL=="sd?1",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent",RESULT=="1ATA_VBOX_HARDDISK_VB6e1c8212-9186e436",SYMLINK+="asm-disk1",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd?1",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent",RESULT=="1ATA_VBOX_HARDDISK_VB1230a6ca-9dc08876",SYMLINK+="asm-disk2",OWNER="grid",GROUP="asmadmin",MODE="0660"
KERNEL=="sd?1",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent",RESULT=="1ATA_VBOX_HARDDISK_VB7c52c583-c613f77a",SYMLINK+="asm-disk3",OWNER="grid",GROUP="asmadmin",MODE="0660"

Reload Partition Tables, Test Udev

For each disk (3 shown in example):

/sbin/partprobe /dev/sdb1
udevadm test /block/sdb/sdb1

/sbin/partprobe /dev/sdc1
udevadm test /block/sdc/sdc1

/sbin/partprobe /dev/sdd1
udevadm test /block/sdd/sdd1

Reload\Start Udev

udevadm control --reload-rules

Check Ownership and Permissions

The symlinks are owned by root, but devices will be owned by grid:asmadmin

  • ls -al /dev/asm*
  • ls -rlt /dev/sd?1
[root]# ls -al /dev/asm*
lrwxrwxrwx 1 root root 4 Nov  4 08:24 /dev/asm-disk1 -> sdb1

[root]# ls -rlt /dev/sd?1
brw-rw---- 1 grid asmadmin 8, 17 Nov  4 08:24 /dev/sdb1

Repeat the above for all other systems. Use the Device ID as displayed from this system.