How to configure UDEV Scsi Rules for ASM in Oracle Linux 7

Convertir en PDF Version imprimable Suggérer par mail
Écrit par Sidibe   

 

Configure ISCI device using UDEV on Linux

 

Identifiying the disk:

Use the command below to identify the disk.

# for i in b c d; do echo "/dev/sd$i";  /usr/lib/udev/scsi_id -g -u -d /dev/sd$i; echo ""; done

 

Command result:

/dev/sdb

36001405e1c687e1d47c8d4715d927cd2

 

/dev/sdc

360014058dafb475d0a45d4a5fd8be9d5

 

/dev/sdd

36001245e1c687gerd47cd4715d927ef7

 

Create files to store all required informations:

Make SCSI Devices Trusted by adding "options=-g" in "/etc/scsi_id.config" file if doesn't already exist.

 

Creating UDEV Rules File

In "/etc/udev/rules.d" create a file named "99-oracle-asmdevices.rules"

 

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

Add the following lines in this file (i.e only for oracle linux 7):

KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36001405e1c687e1d47c8d4715d927cd2", SYMLINK+="asm-data1", OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="360014058dafb475d0a45d4a5fd8be9d5", SYMLINK+="asm-data2", OWNER="oracle", GROUP="dba", MODE="0660"

KERNEL=="sd?1", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d /dev/$parent", RESULT=="36001245e1c687gerd47cd4715d927ef7", SYMLINK+="asm-ocr", OWNER="oracle", GROUP="dba", MODE="0660"

 

Updating Block Device Partitions (/sbin/partprobe)

# /sbin/partprobe /dev/sdb1

# /sbin/partprobe /dev/sdc1

# /sbin/partprobe /dev/sdd1

 

Testing

 

# udevadm test /block/sdb/sdb1

# udevadm test /block/sdc/sdc1

# udevadm test /block/sdd/sdd1

 

Check Ownership and Permissions

Check the disks are now available with the "asm-*" alias and the correct ownership and permissions.

 

 

 

 
< Précédent   Suivant >