• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How To Setup UDEV Rules For RAC OCR And Voting Devices on Partitions

by admin

The Goal

How to setup UDEV rules RAC OCR and Voting Devices on different partitions, rather than a raw disk. Let’s assume that the disk is sdb, which have 3 partitions:

sbd1
sbd2
sdb3

It also applies to partitions over different hard disk.

The Solution

1. Find the WWID of the disk:

# /sbin/scsi_id -g -u -s /block/sdb
SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_

Here we got an WWID of ‘SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_‘.

2. Create an custom UDEV rule:

Create a new rule under /etc/udev/rules.d/, for example, /etc/udev/rules.d/99-oracle.rules. Ensure the file name lists after the default 50-xxx.rules file. The filename must end in “.rules” to be recognized.

KERNEL=="sd*1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_", RUN+="/bin/raw /dev/raw/raw1 %N"
KERNEL=="sd*2", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_", RUN+="/bin/raw /dev/raw/raw2 %N"
KERNEL=="sd*3", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="SATA_VBOX_HARDDISK_VBbb8af1a8-4d4db09b_", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="raw*", OWNER="oracle", GROUP="oinstall", MODE="0664"

The RESULT filed was the WWID of your hard disk found in step 1. Please also subsititue the value of ‘OWNER‘, ‘GROUP‘, and ‘MODE‘ to your actual one.

3. Restart the UDEV service :

# /sbin/start_udev

And then, you are free to use /dev/raw/raw1, /dev/raw/raw2, and /dev/raw/raw3 as your RAC OCR and Voting Devices.

Filed Under: Linux, oracle, RAC

Some more articles you might also be interested in …

  1. lcov: command not found
  2. Understanding Linux SCSI Reservation
  3. Substitution variable in PL/SQL
  4. How to Install gnome-session-wayland software package in Ubuntu
  5. flameshot Command Examples in Linux
  6. How to Reinstall Corrupted Library with yum
  7. edquota Command Examples in Linux
  8. apm – Atom editor Package Manager (Command Examples)
  9. gdebi: command not found
  10. CentOS / RHEL : Resize (extend) non-root EXT3/4 filesystem on LVM device

You May Also Like

Primary Sidebar

Recent Posts

  • diffstat: Create a histogram from the output of the diff command
  • diffoscope: Compare files, archives, and directories
  • diff-pdf: Tool for comparing two PDFs
  • dict: Command line dictionary using the DICT protocol

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright