How To Setup UDEV Rules For RAC OCR And Voting Devices On SLES10, RHEL5, OEL5, OL5 [ID 414897.1]
1. Create The New UDEV Rules
1.1 Create UDEV Permission Rule Prior Up-To Version 11.1.0.7
1.2 Create UDEV Permission Rule For Version 11.2 And Later
2. Restart The UDEV Service
UDEV Filename Rules
- 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.
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.
# /bin/cat /etc/udev/rules.d/99-raw.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %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 %p", RESULT=="3600805f30016c0e0ae51efbfb2930002", NAME="raw2", ACTION=="add|change", OWNER="oracle", GROUP="oinstall", MODE="0660"Create a UDEV rules file for the Oracle ASM devices, setting permissions to read/write for the group and owner (0660) for the installation owner and the group whose members are to be administrators of the grid infrastructure software.
For example, using the installation owner grid and using a role-based group configuration, with the OSASM group asmadmin:
# /bin/cat /etc/udev/rules.d/99-oracle-asmdevices.rules
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="350002ac000010b52", NAME="vote1", ACTION=="add|change", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="350002ac000020b52", NAME="vote2", ACTION=="add|change", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="350002ac000030b52", NAME="vote3", 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
# /etc/init.d/boot.udev stop
# /etc/init.d/boot.udev start# /sbin/udevcontrol reload_rules
# /sbin/start_udev
|
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1933/viewspace-1052016/ ,如需转载,请注明出处,否则将追究法律责任。