利用UDEV配置OCR VOTE(基於整個磁碟)
CRS的共享磁碟儲存OCR\VOTEDISK資料,11G之前,OUI不支援對block裝置的直接讀取(雖然從10.2.0.2開始,ORACLE可用O_DIRECT標誌讀取block裝置,但OUI還是不支援該特性),一般在CRS安裝前將block裝置對映為raw裝置(透過raw命令),raw裝置可以跳過作業系統的緩衝直接讀寫block磁碟。所以11.2以後和以前的配置的方式是不同的,MOS介紹了兩種方式
How To Setup UDEV Rules For RAC OCR And Voting Devices On SLES10, RHEL5, OEL5, OL5 [ID 414897.1] |
Applies to:
Linux OS - Version 2.6.18-8 to 2.6.21Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.2.0 [Release 10.1 to 11.2]
Linux x86
Linux x86-64
Linux Itanium
***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.
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", WNER="grid",GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="350002ac000020b52", NAME="vote2", ACTION=="add|change", WNER="grid",GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -s %p", RESULT=="350002ac000030b52", NAME="vote3", ACTION=="add|change", WNER="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", WNER="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", WNER="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", WNER="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/15747463/viewspace-762883/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM重新命名包含OCR/vote file的磁碟組ASM
- 利用UDEV管理配置ASMDISKdevASM
- ORACLE 10.2.0.5 RAC OCR&vote disk 磁碟遷移 DG Rebalance測試Oracle
- UDEV方式配置Oracle RAC ASM共享磁碟devOracleASM
- redhat 5.3 版本建立 ocr 和voteRedhat
- 關於oracle RAC 通過udev繫結磁碟Oracledev
- 關於oracle RAC 透過udev繫結磁碟Oracledev
- OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE)AINaNREM
- OCR / Vote disk Maintenance Operations: (ADD/REMOVE/REPLACE/MOVE) [ID 428681.1]AINaNREM
- udev+multipath配合繫結磁碟dev
- udev控制磁碟引導順序dev
- OEL5.7 UDEV繫結磁碟dev
- RAC關鍵資訊(OCR/VOTE DISK/ASM DISK HEADER)備份ASMHeader
- 官方版本的關於 OCR / Vote disk 維護: (ADD/REMOVE/REPLACE/MOVE) 收藏此主題REM
- 使用udev擴充套件ASM磁碟組dev套件ASM
- linux下udev重新繫結磁碟Linuxdev
- rhel 5.5UDEV繫結asm磁碟devASM
- 官方版本的關於 OCR / Vote disk 維護: (ADD/REMOVE/REPLACE/MOVE) 收藏此主題[轉]REM
- oracle 11gR2 如何對ocr和vote盤進行鏡象Oracle
- Linux 7下使用udev繫結ASM磁碟LinuxdevASM
- linux_openfiler_udev配置Linuxdev
- 中國首份OCR白皮書出爐,基於深度學習的OCR已成主流深度學習
- 基於神經網路的OCR識別神經網路
- OCR/Vote disk 維護操作: (新增/刪除/替換/移動) (文件 ID 1674859.1)
- oracle 11gr2 針對ocr/vote asm diskgroup損壞的處理方法OracleASM
- Oracle Linux 7.8 多路徑(Multipath)+Udev繫結磁碟OracleLinuxdev
- Linux udev 動態管理Oracle ASM磁碟-實驗LinuxdevOracleASM
- ORACLE LINUX 5.5 UDEV繫結asm磁碟問題OracleLinuxdevASM
- 利用RMAN恢復整個資料庫資料庫
- UDEV簡介及配置過程dev
- 【MOS】OCR/Vote disk 維護操作: (新增/刪除/替換/移動) (文件 ID 1674859.1)
- 遷移ocr/votedisk/asm spfile所在磁碟組ASM
- RAC-rac+dg step2--設定共享磁碟-udevdev
- Oracle 10gR2 RAC 沒有備份的情況下恢復ocr和voteOracle 10g
- linux上udev的配置(轉載)Linuxdev
- mulitpath配置+udev(red5+red6)dev
- 利用Raspberry Pi搭建一個基於OpenMediaVault系統的NAS
- Udev的配置,配置IP轉發,計劃任務dev