Linux: How To Setup UDEV Rules For RAC OCR And Voting Devices On SLES10, RHEL5, OL5
Last updated on JANUARY 30, 2018
Applies to:Oracle Database - Enterprise Edition - Version 10.1.0.2 and later
***Checked for relevance on 2011-01-22***
Linux Kernel - Version: 2.6.18-8 to 2.6.21
Real Application Clusters (RAC) requires special ownership (owner, group and permissions) for the OCR (Oracle Cluster Registry) and Voting devices on Linux.
In the 2.6 kernel, the UDEV system is the default method through which the kernel controls the creation of the special files that represent resources such as block devices.
In Oracle 10g RAC, where raw devices are a mandatory requirement for use by CRS, raw devices require specific ownership and permissions. Prior to UDEV, device nodes
could be created and their access permissions persistently set using the mknod(1) utility; the UDEV facility dynamically recreates the /dev content each reboot, preventing this approach.
The solution is to add UDEV rules to set these attributes automatically. The configuration file syntax for UDEV in SLES10, RHEL5 and OL5 have vary slightly compared depending on the software version.
For SuSE Linux Enterprise Server 10 (SLES10), UDEV rules for raw device permission setting should be placed into rule files under the /etc/udev/rules.d/ directory.
The files are processed in ls(1) order, with default system rules contained in the 50-udev-default.rules file.
- Filenames begin with two decimal digits, to sequence the rules into ascending numerical order.
- After a dash, filenames contain descriptive words.
- The filename must end with ".rules" to be recognized.
- Rule clauses using a double equal sign (==) are predicate matching patterns, to determine if the rest of the line should be processed.
- Rule clauses are separated by a comma.
- Rule clauses with only a single equal sign (=) are actions to be performed.
- Content after a sharp sign / hash mark / octothorpe (#) is ignored as a comment.
- Blank lines are OK.
From SLES10, there is no separation between rules for creating devices and rules for device permissions - both are now set from the same rule file.
In order to alter the permissions for raw devices, create a permission rule file that sets the appropriate device permissions in the rules.d/ directory,
so that it is processed before the default rules:
Do not change the default 50-udev-default.rules file. This file will be over-written should the UDEV package be updated.
On RHEL5/OL5, the UDEV rules file is called 50-udev.rules, otherwise the behavior is the same. Always use a separate, custom file.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms