Linux: How To Setup UDEV Rules For RAC OCR And Voting Devices On SLES10, RHEL5, OEL5, OL5 (文档 ID 414897.1)
|
In this Document
Applies to:Oracle Database - Enterprise Edition - Version 10.1.0.2 and laterGeneric Linux ***Checked for relevance on 2011-01-22*** Linux Kernel - Version: 2.6.18-8 to 2.6.21 Goal
Real Application Clusters (RAC) requires special ownership (owner, group and permissions) for the OCR (Oracle Cluster Registry) and Voting devices on Linux.
UDEV Filename Rules
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.
Caution About Changing Files Owned By The Distribution
Do not change the default 50-udev-default.rules file. This file will be over-written should the UDEV package be updated. On RHEL5/OEL5, the UDEV rules file is called 50-udev.rules, otherwise the behavior is the same. Always use a separate, custom file.
Solution1. Create The New UDEV RulesChoose one of the following methods, depending upon your RAC version. 1.1 Create UDEV Permission Rule Prior Up-To Version 11.1.0.7
Create a custom UDEV permission rule file (for example, /etc/udev/rules.d/99-raw.rules) and ensure the file name lists after the default 50-xxx.rules file.
# /bin/cat /etc/udev/rules.d/99-raw.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="3600805f30016c0e0ad41ffa8e6d90001", NAME="raw1", ACTION=="add|change",OWNER="root", GROUP="oinstall", MODE="0640" KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s /block/%P", RESULT=="3600805f30016c0e0ae51efbfb2930002", NAME="raw2", ACTION=="add|change",OWNER="oracle", GROUP="oinstall", MODE="0660" 1.2 Create UDEV Permission Rule For Version 11.2 And Later
Create a UDEV rules file for the Oracle ASM devices, setting permissions to read/write for the group and owner (0660) for the installation For example, using the installation owner grid and using a role-based group configuration, with the OSASM group asmadmin: For RHEL5/OL5/OEL5,
# /bin/cat /etc/udev/rules.d/99-oracle-asmdevices.rules For RHEL6/OL6:
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id i --whitelisted --device=/dev/$name", RESULT=="350002ac000010b52", NAME="vote1", ACTION=="add|change", OWNER="grid",GROUP="asmadmin", MODE="0660" Copy this rules.d/file to all other nodes on the cluster. For example:
# /usr/bin/scp 99-oracle-asmdevices.rules root@node2:/etc/udev/rules.d/99-oracle-asmdevices.rules
2. Restart The UDEV Service
Restart the UDEV service as follows. Then verify the devices now reflect their intended ownership and permissions:
# /etc/init.d/boot.udev stop
# /etc/init.d/boot.udev start
# /sbin/udevcontrol reload_rules
# /sbin/start_udev On RHEL6/OL6:
#/sbin/udevadm control --reload-rules
#/sbin/start_udev 3. Additional UDEV informationFor additional information on UDEV, including how to manage multiple partitions, refer to the following article:
Using udev with Oracle Architecture (RAC & ASM) - Red Hat 4.0 Note:371814.1 ReferencesNOTE:465001.1 - Configuring raw devices (singlepath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OEL5NOTE:371814.1 - Using udev with Oracle Architecture (RAC & ASM) - Red Hat 4.0 NOTE:564580.1 - Configuring raw devices (multipath) for Oracle Clusterware 10g Release 2 (10.2.0) on RHEL5/OL5 |
|
|