關於oracle RAC 通過udev繫結磁碟
通過udev繫結磁碟是一件特別煩人的事情,尤其是在使用了多路徑軟體emcpower後,下面是從metalink上摘下來的部分資訊,不做翻譯,僅供大家參考學習
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 OEL5 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/OEL5, the UDEV rules file is called 50-udev.rules, otherwise the behavior is the same. Always use a separate, custom file.
SOLUTION
1. Create The New UDEV Rules
Choose 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.
The filename must end in ".rules" to be recognized.
Add the required raw device ownership and permissions, for example:
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"
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
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:
For RHEL5/OL5/OEL5,
# /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"
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"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id i --whitelisted --device=/dev/$name", RESULT=="350002ac000020b52", NAME="vote2", ACTION=="add|change", OWNER="grid",GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id i --whitelisted --device=/dev/$name", 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:
2. Restart The UDEV Service
Restart the UDEV service as follows. Then verify the devices now reflect their intended ownership and permissions:
On SLES10:
# /etc/init.d/boot.udev start
On RHEL5/OEL5/OL5:
# /sbin/start_udev
On RHEL6/OL6:
#/sbin/start_udev
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/28612416/viewspace-1435230/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Oracle Linux 7.8 多路徑(Multipath)+Udev繫結磁碟OracleLinuxdev
- 如何檢視Oracle RAC的asm磁碟的udev對應關係OracleASMdev
- RAC之磁碟繫結及互信配置
- 12C__單機安裝Grid+Oracle的方法,ASM使用UDEV進行磁碟繫結OracleASMdev
- oracle rac 增加磁碟Oracle
- linux udev裸裝置繫結Linuxdev
- RAC_UDEV的99-oracle-asmdevices.rules配置方法devOracleASM
- Oracle 11g RAC安裝--基於openfiler儲存+多路徑+udev方式Oracledev
- 【BUILD_ORACLE】Oracle 19c RAC搭建(三)使用UDEV配置共享儲存UIOracledev
- Oracle RAC日常運維-ASM磁碟擴容Oracle運維ASM
- Oracle RAC日常運維-DATA磁碟組故障Oracle運維
- 通過ORACLE VM virtualbox環境安裝oracle 11G RAC(ASM)OracleASM
- 關於JavaScript中this的軟繫結JavaScript
- 關於動態字串的繫結字串
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- Oracle 11gR2 RAC 單網路卡轉雙網路卡繫結配置Oracle
- 關於Oracle 10g ASM磁碟大小的限制Oracle 10gASM
- 使用udev擴充套件ASM磁碟組dev套件ASM
- Oracle 11g RAC之HAIP相關問題總結OracleAI
- Oracle RAC ASM磁碟組擴容時遇到的VIP漂移OracleASM
- Oracle 12c RAC構築之二:共享磁碟配置Oracle
- Javascrip—關於this繫結機制的解析(12)Java
- 【ORACLE】Oracle繫結變數知識梳理Oracle變數
- Oracle11g RAC啟動關閉情況大概總結Oracle
- Oracle RAC 建設過程中各個層面關鍵點和最佳化項總結Oracle
- ORACLE RAC TO RAC DG搭建過程中可能遇到的問題Oracle
- 通過原生js實現資料的雙向繫結JS
- RAC19c搭建-centos7+openfiler+multipath+udevCentOSdev
- RAC11g搭建-centos7+openfiler+multipath+udevCentOSdev
- 在青雲上部署oracle rac全過程Oracle
- IOC容器的繫結解析過程(繫結單例)單例
- oracle RACOracle
- docker 安裝 wordpress,通過nginx反向代理,繫結域名,配置httpsDockerNginxHTTP
- Oracle RAC Cache Fusion 系列十七:Oracle RAC DRMOracle
- Oracle RAC DRM介紹和關閉DRMOracle
- Oracle-繫結執行計劃Oracle
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- 關於RAC的remote_listenerREM
- Oracle RAC CacheFusion 系列十五:Oracle RAC CRServer Part TwoOracleServer