Oracle Consulting Oracle Training Development

Remote DBA

Remote DBA Plans  

Remote DBA Service

Remote DBA RAC

   
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

 

Remote DBA services

Remote DBA Support

Remote DBA RAC

Remote DBA Reasons

Remote Oracle Tuning

Remote DBA Links

Oracle DBA Support

Oracle DBA Forum

Oracle Disaster

Oracle Training

Oracle Tuning

Oracle Training

 Remote DBA SQL Server

Remote MSSQL Consulting

Oracle DBA Hosting

Oracle License Negotiation

 

 


 

 

 

        
 

 Using udev Rule to Map Block Devices
Oracle Tips by Burleson Consulting

Oracle 11g Grid & Real Application Clusters by Rampant TechPress is written by four of the top Oracle database experts (Steve Karam, Bryan Jones, Mike Ault and Madhu Tumma).  The following is an excerpt from the book.

In RHEL and OEL 5, entries must be made under the rules specified in /etc/udev.  Udev is responsible for managing the /dev area in Linux, and udev rules determine how /dev will be presented.

 

While /bin/raw can be used to bind a block device to a raw device, /bin/raw binding alone is not meant to be a long-term configuration.  One of the primary purposes of udev is to keep disk areas and naming consistent.

 

To create a udev rule that maps block device /dev/sda1 to raw device /dev/raw1:

  • Create a file called:  /etc/udev/rules.d/60-raw.rules

  • Any number greater than or equal to 60 may be used

  • Add the line:  ACTION==”add”, “KERNEL==”sda1”, RUN+=”/bin/raw /dev/raw/raw1 %N”

  • Despite this ability, in Oracle 11g there is really no point in creating /dev/raw devices unless it is being done for comfort value.  This is because in Oracle 10.2.0.2 up, block devices are accessible by Oracle using the O_DIRECT flag, meaning they are able to perform direct I/O without using the rawio interface.  OUI and ASMlib will both accept a block device (i.e. /dev/sda1) as input for file placement in Oracle 11g on Linux.

Note: In 10gR2, even though Oracle allowed block devices to be used in 10.2.0.2 and up, OUI was not able to handle a block device name.  Instead, symbolic links had to be created to map the block device to a different name under /dev.  While effective, this does not follow the udev rules.

 

Even with direct support for block devices, in order to configure a block device for Oracle’s use, udev rules must still be created.  Since udev manages the /dev area, the rules will need to state ownership of the block devices in order to grant Oracle the permissions necessary to use them.

  1. Edit the file:  /etc/udev/rules.d/50-udev.rules

  2. At the bottom of the file, add the new rules in the following format:

KERNEL==”blockdevicename”, OWNER=”deviceowner”, GROUP=”devicegroup”, MODE=”4digitpermissions”

  • Block device name - the name of the block device.  For instance, if the device is listed as /dev/sda1, the block device name is sda1.

  • Device owner - should be set to the name of the OS user that will own the block device.  For instance, if the device is going to be used for placement of the OCR, root should be the owner.  For the voting disk or ASM disks, oracle should be the owner.

  • Device group - should be set to the name of the group which owns the block device.  This will usually be oinstall or dba.

  • 4digitpermissions - should be set to the permissions mask of the block device.  For the OCR and ASM devices this will be 0640.  For the voting disk, it will usually be 0644.

It is important to note that even though Oracle is writing to a block device instead of a raw device, this is still technically raw storage.  Instead of using the rawio interface, a direct interface to the block device has been provided by the Linux kernel and Oracle.

 

The limitations of raw are still a factor when writing to block devices.  Only one file may be present on any single block device when the device is unformatted.

 

Creating the OCR and voting disk on block devices is a popular option, as the only other storage method available is a cluster file system such as OCFS2 which presents yet another layer of dependency for an Oracle installation.  For datafiles, control files, SPFILEs, redo logs, RMAN backups, and archive logs, ASM is the new de facto standard for RAC storage.

     

Remote DBA Service
 

Oracle Tuning Book

 

Advance SQL Tuning Book 

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

 

 

 

 

 

 

 

 

 

BC Remote Oracle Support

Remote DBA

Remote DBA Services

Copyright © 1996 -  2013 by Burleson. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.