Menu Content/Inhalt
Home arrow Linux arrow Linux_distros arrow Configure rawdevices on RHEL5
Configure rawdevices on RHEL5 PDF Print E-mail
Written by Martin   
Saturday, 10 November 2007

With Red Hat Enterprise Linux 5 the venerable /etc/sysconfig/rawdevices has vanished. And here is the threat that there may even be the day that rawdevices are no longer supported at all! Currently the raw devices interface is marked as deprecated. But for RAC, you need shared storage for the OCR and votedisk. Beginning with 10.2 you can use block devices for OCR/votedisk, see Metalink Note 401132.1. But with this said - how do you configure rawdevices now?

The following example is part of a RHEL 5 RAC installation on VMware server 1.04, and it  should only be used for testing on virtualised hosts. See the reference section at the end for a fully supported production ready solution.

First I created the shared storage as usual and made the necessary changes to the virtual machines' *vmx files. There are plenty of articles out there how to create shared disks for RAC on VMware Server so I won't go into detail here. Since disks are managed via udev nowadays, you need to get roughly familiar with it or do as I did - google for clues.

Once the system has rebooted with the shared storage added and properly configured, I need to change the file /etc/udev/rules.d/61-raw.rules. Don't touch 60-raw.rules as it's part of an RPM and might be overwritten the next time you update udev components. My configuration is single-pathed access to storage and uses the following setup:

  • /dev/sda as for the local storage,
  • /dev/sdb1 for OCR,
  • /dev/sdc1 for voting disk and
  • /dev/sdd1 for ASM (I know what you want to say but it's only a proof of concept anyway).

The mapping in /etc/udev/rules.d/61-raw.rules then is

ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw3 %N"

This maps /dev/sdb1 to /dev/raw/raw1 To get the permissions right, create a new file, say /etc/udev/rules.d/99-oracle.rules with the following content:

KERNEL=="raw[0-9]*", OWNER="oracle", GROUP="oinstall", MODE="640"

This in turn will change all /dev/raw/raw* permissions to 640, owner oracle, group oinstall.

A word or two of caution:

  • This is for testing only! You wouldn't use single pathing to storage in production anyway, would you?
  • Strong word of warning: don't reference devices by name ("sda") in production, always use scsi_id to get the scsi ID  for a device instead, see below references for syntax examples. I couldn't get scsi_id to return a value in virtualised environments (yet)
  • Multipathing is more complex to describe and depends on your driver. For example, the EMC PowerPath driver creates /dev/emcpowera etc which abstracts from the underlying view on block devices. Make sure multipathing works before you continue with udev configuration. Use scsi_id to get the unique scsi ID for the logical device and use it in 61-raw.rules.

References:

  • Note 443996.1 - How to map raw device on RHEL5 and OEL5 
  • Note 465001.1 - Configuring raw devices (singlepath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5
  • Note 564580.1 - Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5
  • Note 605828.1 - Configuring non-raw multipath devices for Oracle Clusterware 11g (11.1.0) on RHEL5/OEL5
  • Arkzoyd: Oracle11g sur Linux : La fin des raw devices ?
Last Updated ( Sunday, 05 July 2009 )
 
< Prev   Next >