Setting a raw device in RedHat/CentOS 5 for Oracle RAC

Apparently the issue got changed since RedHat 4, which had /etc/sysconfig/rawdevices, /etc/init.d/raw & /usr/bin/raw.

This version introduces /etc/udev/rules.d/60-raw.rules & /bin/raw.

A. Doing it manually (example):

/bin/raw /dev/raw/raw1 /dev/sdb1

of course, it'll be forgotten after reboot. so:

B. Doing it the right way - udev (example):

  1. Add to /etc/udev/rules.d/60-raw.rules:
  2. ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"

  3. [Optional] to set permissions, create a new /etc/udev/rules.d/99-raw-perms.rules containing lines such as:
  4. KERNEL=="raw[1-2]", MODE="0640", GROUP="oinstall", OWNER="oracle"

The header of rules.d/60-raw.rules file mentions that this method of using raw devices is deprecated. But still, I think that's the only available way if one wants to use raw devices with Oracle RAC, Either for cluster issues (Voting+OCR) or simple Oracle data files.

C. Oracle RAC raw device permissions

You might ask: what permissions should I give the Oracle RAC disks? This is what I've found out with Roman, a DBA expert who came to help:

  • OCR Device(s): root:oinstall , mode 0640
  • Voting device(s): oracle:oinstall, mode 0660
    • CRS cannot run if user oracle can't access the device!
  • Other devices (i.e. data): I guess also oracle:oinstall mode 0660, because oracle user might need to access them.

Disclaimer: I'm not a DBA expert; I hope this helps. Don't blame me if it ruins important data; send comments if you think I'm wrong/right.

3 thoughts on “Setting a raw device in RedHat/CentOS 5 for Oracle RAC

  1. Pingback: Raw devices for Oracle on RedHat (RHEL) 5 | Running Systems

  2. Panco

    RAW device still support. OCFS is not stable in some case and ASM can't support OCR and Voting, hence RAW is still the best option for OCR and Voting.

Leave a Reply

Your email address will not be published. Required fields are marked *