合 Oracle OCR的备份与恢复
- 前言部分
- 导读和注意事项
- 本文简介
- 相关知识点扫盲
- OCR Disk
- OCR包含的内容
- OCR存储内容的表现形式
- Voting Disk
- 健忘症(Amnesia)
- 脑裂(Split Brain)
- OCR命令系列
- ocrdump
- ocrcheck
- ocrconfig
- Oracle RAC OCR 的备份与恢复
- dd备份恢复
- kfed恢复磁盘头
- md_backup和md_restore恢复磁盘头
- 物理备份与恢复(自动备份)
- 逻辑备份与恢复(手动备份)
- 如何修复11.2 Grid权限误操作
- 校验权限
- 解决
- MOS 1515018.1 permission.pl脚本的使用
- 如何修复ASM实例名和节点名不一致的情况
- 如何彻底清除CRS信息
- 实验部分
- 实验环境介绍
- 实验目标
- 实验一:dd备份恢复OCR
- 实验二:通过kfed修复磁盘头
- 实验三:物理备份与恢复(自动备份)
- 实验四:逻辑备份与恢复(手动备份)
- 实验五:删除$ORACLE_HOME/log下的文件夹后的修复
- 实验六:permission.pl脚本的使用
- 实验中用到的SQL总结
- SQL总结
- 参考
前言部分
导读和注意事项
各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:
① rac中OCR的简介及其作用
② rac中OCR的备份和恢复
③ rac的健忘与脑裂
④ grid用户下的日志文件:$ORACLE_HOME/log文件夹内容被删除导致集群不能启动如何恢复?(重点)
⑤ 如何修复11.2 Grid权限误操作【(How to check and fix file permissions on Grid Infrastructure environment (文档 ID 1931142.1)】
⑥ 如何修复ASM实例名和节点名不一致的情况【How to Change 11.2 ASM Configuration to Match ASM Instance Name to the Node Where It Runs? (example, +ASM2 on Node2, etc) (文档 ID 1419424.1)】
⑦ permission.pl脚本的使用
本文简介
写这篇blog的情况是这样的,rac启动有问题,但是$GRID_HOME/log下的文件太多了,我就把下边的内容清空了,结果是集群更加不能启动就连基本的日志也没有了,重启OS无效,最后在仔细的想了想查看了一下运行正常的库的$GRID_HOME/log下的文件结构,发现有的文件夹最后有个T或t的权限,由此联想到可能是权限的缘故导致的,于是上MOS搜了搜文章果然搜到几篇文章,11.2.0.3.6以上比较好解决,但是小于这个版本的就不好弄了,自己总结的方法是重新跑root.sh脚本,而跑完后集群中注册的很多资源不存在了,于是这个又涉及到OCR的备份与恢复。另外执行root.sh若是顺序不对,或者其他的原因可能导致asm实例号和主机号不一致,就是rac1上的实例名是+ASM2,这个虽然没有啥影响,但是看着着实不爽,因此更改它们直接的对应关系也比较重要,所以总体而言就引出了文章开头提出的6个问题。
相关知识点扫盲
Clusterware 在运行期间需要两个文件: OCR 和 Voting Disk. 这 2 个文件必须存放在共享存储上。 OCR 用于解决健忘问题, Voting Disk 用于解决脑裂问题。
OCR Disk
Oracle Clusterware把整个集群的配置信息放在共享存储上,这个存储就是OCR Disk. 在整个集群中,只有一个节点能对OCR Disk 进行读写操作,这个节点叫作Master Node,所有节点都会在内存中保留一份OCR的拷贝,同时有一个OCR Process 从这个内存中读取内容。 OCR 内容发生改变时,由Master Node的OCR Process负责同步到其他节点的OCR Process。
健忘问题是由于每个节点都有配置信息的拷贝,修改节点的配置信息不同步引起的。Oracle 采用的解决方法就是把这个配置文件放在共享的存储上, 这个文件就是 OCR Disk。OCR 中保存整个集群的配置信息,配置信息以"Key-Value" 的形式保存其中。 在 Oracle10g 以前, 这个文件叫作 Server Manageability Repository(SRVM). 在 Oracle 10g, 这部分内容被重新设计,并重名为 OCR.。在 Oracle Clusterware 安装的过程中, 安装程序会提示用户指定 OCR 位置。并且用户指定的这个位置会被记录在/etc/oracle/ocr.loc(Linux System、AIX) 或者/var/opt/oracle/ocr.loc(Solaris System)文件中。 而在 Oracle 9i RAC 中,对等的是 srvConfig.Loc文件。 Oracle Clusterware在启动时会根据这里面的内容从指定位置读入 OCR 内容。
zfzhlhrdb3:root:/>cd /etc/oracle
zfzhlhrdb3:root:/etc/oracle>ls -l
total 3160
drwxrwx--- 2 root dba 256 Dec 29 14:16 lastgasp
-rw-r--r-- 1 root dba 37 Dec 29 14:10 ocr.loc
-rw-r--r-- 1 root system 0 Dec 29 14:10 ocr.loc.orig
-rw-r--r-- 1 root dba 92 Dec 29 14:10 olr.loc
-rw-r--r-- 1 root system 0 Dec 29 14:10 olr.loc.orig
drwxrwxr-x 5 root dba 256 Dec 29 14:09 oprocd
drwxr-xr-x 3 root dba 256 Dec 29 14:09 scls_scr
-rws--x--- 1 root dba 1606037 Dec 29 14:09 setasmgid
zfzhlhrdb3:root:/etc/oracle>more /etc/oracle/ocr.loc
ocrconfig_loc=+DATA
local_only=FALSE
OCR key
整个 OCR 的信息是树形结构,有 3 个大分支。分别是 SYSTEM,DATABASE 和 CRS。每个分支下面又有许多小分支。这些记录的信息只能由 root 用户修改。
OCR包含的内容
OCR中通常包含下列内容:
- 节点成员信息
- 数据库实例,节点,以及其他的映射关系
- ASM
- 资源配置信息(vip,services等等)
- 服务特性(Service characteristics)
- Oracle集群中相关进程的信息
- CRS控制的第三方应用程序信息
zfzhlhrdb1:root:/>ocrdump -local -stdout -xml|more|grep -i \\<name\>|sed -e 's/\\<NAME\>//g' -e 's/\\<\/NAME\>//g'|awk -F . '{print $1,$2,$3}'|uniq
SYSTEM
SYSTEM crs
SYSTEM crs usersecurity
SYSTEM crs deny
SYSTEM crs user_default_dir
SYSTEM ORA_CRS_HOME
SYSTEM WALLET
SYSTEM GNS
SYSTEM version
SYSTEM version localhost
SYSTEM version activeversion
SYSTEM GPnP
SYSTEM GPnP profiles
SYSTEM css
SYSTEM css nodenum_hint
SYSTEM network
SYSTEM network haip
SYSTEM OHASD
SYSTEM OHASD DM
SYSTEM OHASD SERVERPOOLS
SYSTEM OHASD SERVERS
SYSTEM OHASD TYPES
SYSTEM OHASD RESOURCES
SYSTEM CRS
SYSTEM CRS JOIN_SIGNATURE
SYSTEM OLR
SYSTEM OLR MANUALBACKUP
SYSTEM OCR
SYSTEM OCR BACKUP
DATABASE
DATABASE NODEAPPS
DATABASE VIP_RANGE
DATABASE LOG
DATABASE ASM
DATABASE DATABASES
CRS
zfzhlhrdb1:root:/>ocrdump -stdout -xml|more|grep -i \\<name\>|sed -e 's/\\<NAME\>//g' -e 's/\\<\/NAME\>//g'|awk -F . '{print $1,$2,$3}'|uniq
SYSTEM
SYSTEM version
SYSTEM version activeversion
SYSTEM version hostnames
SYSTEM versionstring
SYSTEM WALLET
SYSTEM WALLET APPQOSADMIN
SYSTEM GNS
SYSTEM css
SYSTEM css interfaces
SYSTEM crs
SYSTEM crs versions
SYSTEM crs usersecurity
SYSTEM crs deny
SYSTEM crs user_default_dir
SYSTEM crs e2eport
SYSTEM crs uiport
SYSTEM crs 11
SYSTEM ACFS
SYSTEM ORA_CRS_HOME
SYSTEM evm
SYSTEM evm debug
SYSTEM evm cevmkey
SYSTEM evm rmport
SYSTEM evm cevmport
SYSTEM DIAG
SYSTEM DIAG status
SYSTEM local_only
SYSTEM WLM
SYSTEM GPnP
SYSTEM GPnP profiles
SYSTEM JAZNFILE
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
\
SYSTEM JAZNFILE STATE
SYSTEM CRSADMIN
SYSTEM CRSUSER
SYSTEM CRSD
SYSTEM CRSD DM
SYSTEM CRSD SERVERPOOLS
SYSTEM CRSD SERVERS
SYSTEM CRSD TYPES
SYSTEM CRSD RESOURCES
SYSTEM OCR
SYSTEM OCR BACKUP
DATABASE
DATABASE NODEAPPS
DATABASE NODEAPPS zfzhlhrdb1
DATABASE NODEAPPS zfzhlhrdb2
DATABASE VIP_RANGE
DATABASE LOG
DATABASE ASM
DATABASE ASM zfzhlhrdb1
DATABASE ASM zfzhlhrdb2
DATABASE DATABASES
CRS
CRS CUR
CRS HIS
CRS SEC
CRS STAGE
CRS STAGE node1
CRS STAGE node2
OCR存储内容的表现形式
- 同样地与Windows注册表来类比,OCR其存储内容的表现形式与其相同,是采用键值对的方式来展现。
- 整个OCR 的信息是树形结构,有3个大分支。分别是SYSTEM,DATABASE 和CRS。
- 每个分支下面又有许多小分支。这些记录的信息只能由root用户修改。
- 可以使用ocrdump命令将其内容全部导出或者按分支进行导出。
Voting Disk
Voting Disk 这个文件主要用于记录节点成员状态,在出现脑裂时,决定那个 Partion 获得控制权,其他的 Partion 必须从集群中剔除。在安装 Clusterware 时也会提示指定这个位置。安装完成后可以通过如下命令来查看 Voting Disk 位置。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $crsctl query css votedisk [zfzhlhrdb3:root]:/dev>crsctl query css votedisk ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 83cb4909d3254f4ebf1181b024aaf539 (/dev/rhdisk2) [DATA] Located 1 voting disk(s). [zfzhlhrdb3:root]:/dev>ls -l /dev/rhdisk* crw------- 2 root system 19, 0 Dec 29 10:02 /dev/rhdisk0 crw------- 1 root system 19, 4 Dec 29 11:15 /dev/rhdisk1 crw-rw---- 1 grid asmadmin 19, 6 Jan 08 15:17 /dev/rhdisk2 crw-rw---- 1 root system 19, 3 Dec 29 11:15 /dev/rhdisk3 crw-rw---- 1 root system 19, 1 Dec 29 11:15 /dev/rhdisk4 crw------- 1 root system 19, 7 Dec 29 11:15 /dev/rhdisk5 crw------- 1 root system 19, 8 Dec 29 11:15 /dev/rhdisk6 crw------- 1 root system 19, 2 Dec 29 11:15 /dev/rhdisk7 crw------- 1 root system 19, 5 Dec 29 11:15 /dev/rhdisk8 [zfzhlhrdb3:root]:/dev> |
健忘症(Amnesia)
集群环境配置文件不是集中存放的,而是每个节点都有一个本地副本,在集群正常运行时,用户可以在任何节点更改集群的配置,并且这种更改会自动同步到其他节点。有一种特殊情况: 节点 A 正常关闭, 在节点 B 上修改配置, 关闭结点 A,启动结点B。 这种情况下,修改的配置文件是丢失的, 就是所谓的健忘症。OCR 用于解决健忘问题。
健忘是由于某个节点更新了OCR中的内容,而集群中的另外一些节点此时处于关闭,维护或重启阶段,OCR Master进程来不及将其信息更新到这些异常节点缓存而导致的不一致。譬如,在A节点发出了添加ocr镜像的命令,在这个时候B节点处于重启阶段。重启后A已经更新完毕,而此时B并不知道已经为ocr增加了一个新的镜像磁盘,健忘由此而生。
如下例,节点bo2dbp添加了新的ocr之后,配置文件发生了变化,此时节点bo2dbs的ocr.loc会被更新,如果bo2dbs处于关闭或重启阶段,则该文件得不到该更新,此即位健忘一例。
脑裂(Split Brain)
在集群中,节点间通过某种机制(心跳)了解彼此的健康状态,以确保各节点协调工作。假设只有"心跳"出现问题, 各个节点还在正常运行, 这时,每个节点都认为其他的节点宕机了, 自己是整个集群环境中的"唯一建在者",自己应该获得整个集群的"控制权"。 在集群环境中,存储设备都是共享的, 这就意味着数据灾难, 这种情况就是"脑裂"解决这个问题的通常办法是使用投票算法(Quorum Algorithm). 它的算法机理如下:集群中各个节点需要心跳机制来通报彼此的"健康状态",假设每收到一个节点的"通报"代表一票。对于三个节点的集群,正常运行时,每个节点都会有 3 票。 当结点 A 心跳出现故障但节点 A 还在运行,这时整个集群就会分裂成 2 个小的 partition。 节点 A 是一个,剩下的 2 个是一个。 这是必须剔除一个 partition 才能保障集群的健康运行。对于有 3 个节点的集群, A 心跳出现问题后, B 和 C 是一个 partion,有 2 票, A只有 1 票。 按照投票算法, B 和 C 组成的集群获得控制权, A 被剔除。如果只有 2 个节点,投票算法就失效了。 因为每个节点上都只有 1 票。 这时就需要引入第三个设备: Quorum Device. Quorum Device 通常采用饿是共享磁盘,这个磁盘也叫作Quorum disk。 这个 Quorum Disk 也代表一票。 当 2 个结点的心跳出现问题时, 2 个节点同时去争取 Quorum Disk 这一票, 最早到达的请求被最先满足。 故最先获得 Quorum Disk的节点就获得 2 票。另一个节点就会被剔除。
OCR命令系列
ocrdump
该命令能以ASCII的方式打印出OCR的内容,但是这个命令不能用作OCR的备份恢复,也就是说产生的文件只能用作阅读,而不能用于恢复。
命令格式: ocrdump [-stdout] [filename] [-keyname name] [-xml]
参数说明:
-stdout: 把内容打印输出到屏幕上
Filename:内容输出到文件中
-keyname:只打印某个键及其子健内容
-xml:以xml格式打印输出
示例:把system.css键的内容以.xml格式打印输出到屏幕
[root@raw1 bin]# ./ocrdump -stdout -keyname system.css -xml|more
\
\
\
\
......
这个命令在执行过程中,会在$CRS_HOME/log/\
ocrcheck
Ocrcheck 命令用于检查OCR内容的一致性,命令执行过程会在$CRS_HOME/log/nodename/client 目录下产生ocrcheck_pid.log 日志文件。 这个命令不需要参数。
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3176
Available space (kbytes) : 258944
ID : 362503260
Device/File Name : +DATA
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
ocrconfig
该命令用于维护OCR 磁盘,安装clusterware过程中,如果选择External Redundancy冗余方式,则只能输入一个OCR磁盘位置。 但是Oracle允许配置两个OCR 磁盘互为镜像,以防止OCR 磁盘的单点故障。 OCR 磁盘和Votedisk磁盘不一样,OCR磁盘最多只能有两个,一个Primary OCR 和一个Mirror OCR。
[root@raw1 bin]# ./ocrconfig --help
Name:
ocrconfig - Configuration tool for Oracle Cluster Registry.
Synopsis:
ocrconfig [option]
option:
-export \
- Export cluster register contents to a file
-import \
-upgrade [\
- Upgrade cluster registry from previous version
-downgrade [-version \
- Downgrade cluster registry to the specified version
-backuploc \
-showbackup - Show backup information
-restore \
-replace ocr|ocrmirror [\
-overwrite - Overwrite OCR configuration on disk
-repair ocr|ocrmirror \
-help - Print out this help information
Note:
A log file will be created in
$ORACLEHOME/log/\
you have file creation privileges in the above directory before
running this tool.
Oracle RAC OCR 的备份与恢复
Oracle Clusterware把整个集群的配置信息放在共享存储上,这些信息包括了集群节点的列表、集群数据库实例到节点的映射以及CRS应用程序资源信息。也即是存放在ocr 磁盘(或者ocfs文件)上。因此对于这个配置文件的重要性是不言而喻的。任意使得ocr配置发生变化的操作在操作之间或之后都建议立即备份ocr。
因为OCR的内容如此重要,Oracle 每4个小时对其做一次备份,并且保留最后的3个备份,以及前一天,前一周的最后一个备份。 这个备份由Master Node CRSD进程完成,备份的默认位置是$CRS_HOME/crs/cdata/\
与Oracle数据库备份恢复相似,OCR的备份也有物理备份或逻辑备份的概念,因此有两种备份方式,两种恢复方式。
常用命令:
crsctl query css votedisk
lquerypv -h /dev/rhdisk2
crsctl stop has -f
crsctl start has
crsctl stat res -t
dd备份恢复
备份表决磁盘:
dd if=/dev/raw/raw3 of=/tmp/votedisk_lhr.bak bs=1024k count=4
恢复表决磁盘:
dd if=/tmp/votedisk_lhr.bak of=/dev/raw/raw3 bs=1024k count=4
注:11g不推荐使用dd来进行备份恢复,盘头一般是前4K
kfed恢复磁盘头
dd if=/dev/rhdisk2 of=/asm_rhdisk2_dd.bak bs=1024 count=4
dd if=/dev/zero of=/dev/rhdisk2 bs=1024 count=4
kfed repair /dev/rhdisk2
关于kfed、kfod、amdu的更多内容可以参考:http://blog.itpub.net/26736162/viewspace-1694198/
http://blog.itpub.net/26736162/viewspace-1694199/
md_backup和md_restore恢复磁盘头
asmcmd md_backup /oracle/app/11.2.0/grid/cdata/ZFTPCCDB-crs/asm_md_backup.bak
asmcmd md_restore /oracle/app/11.2.0/grid/cdata/ZFTPCCDB-crs/asm_md_backup.bak
dd if=/dev/rhdisk2 of=/asm_rhdisk2_dd.bak bs=1024k count=4
dd if=/dev/zero of=/dev/rhdisk2 bs=1024k count=4
crsctl stop has -f
crsctl start has
ASMCMD [+] > startup force nomount;
ASMCMD [+] > md_restore /asm_rhdisk2_dd.bak
ASMCMD [+] > md_backup /rman/asm_md.bak
dd if=/dev/zero of=/dev/rhdisk2 bs=1024 count=4
crsctl stop has -f
crsctl start has
ASMCMD [+] > startup force nomount;
ASMCMD [+] > md_restore /rman/asm_md.bak
关于md_backup和md_restore更多内容可以参考:http://blog.itpub.net/26736162/viewspace-2121309/
物理备份与恢复(自动备份)
缺省情况下,Oracle 每4个小时对其做一次备份,并且保留最后的3个副本,以及前一天,前一周的最后一个备份副本。用户不能自定义备份频率以及备份文件的副本数。
对于OCR的备份由是由Master Node CRSD进程完成,因此备份的默认位置是$CRS_HOME/crs/cdata/\
备份的文件会自动更名,以反应备份时间顺序,最近一次的备份叫作backup00.ocr。
由于是在Master Node的节点之上进行备份,因此备份文件仅存在于Master Node节点。
对于Master Node的节点crash之后则由剩余节点接管。
备份目录可以通过ocrconfig -backuploc \
OCR磁盘最多只能有两个,一个Primary OCR 和一个Mirror OCR。两者互为镜像以避免单点故障。
对于物理备份恢复,不能简单的使用操作系统级别的复制命令(使用ocr文件时)来完成,该操作将导致ocr不可用。
对于物理备份,仅仅只能使用restore方式来进行恢复,而不支持import方式
1,查看备份磁盘
zfzhlhrdb2:grid:/home/grid>ocrconfig -showbackup
zfzhlhrdb1 2016/06/30 15:13:46 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup00.ocr
zfzhlhrdb1 2016/06/30 11:13:45 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup01.ocr
zfzhlhrdb1 2016/06/30 07:13:45 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup02.ocr
zfzhlhrdb1 2016/06/29 03:13:41 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/day.ocr
zfzhlhrdb1 2016/06/20 03:13:08 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
zfzhlhrdb2:grid:/home/grid>oerr prot 25
00025, 0, "Manual backups for the Oracle Cluster Registry are not available"
// *Cause: Manual backups for the Oracle Cluster Registry were not yet created.
// *Action: Manual backups can be created using 'ocrconfig -manualbackup'
// command.
zfzhlhrdb2:grid:/home/grid>ocrconfig -manualbackup
PROT-20: Insufficient permission to proceed. Require privileged user
zfzhlhrdb2:root:/>ocrconfig -manualbackup
zfzhlhrdb1 2016/06/30 16:21:34 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup_20160630_162134.ocr
zfzhlhrdb2:root:/>ocrconfig -showbackup
zfzhlhrdb1 2016/06/30 15:13:46 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup00.ocr
zfzhlhrdb1 2016/06/30 11:13:45 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup01.ocr
zfzhlhrdb1 2016/06/30 07:13:45 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup02.ocr
zfzhlhrdb1 2016/06/29 03:13:41 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/day.ocr
zfzhlhrdb1 2016/06/20 03:13:08 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/week.ocr
zfzhlhrdb1 2016/06/30 16:21:34 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup_20160630_162134.ocr
在节点一执行,可以看到2个节点得到的内容一致:
zfzhlhrdb1:root:/>ocrconfig -showbackup
zfzhlhrdb1 2016/06/30 15:13:46 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup00.ocr
zfzhlhrdb1 2016/06/30 11:13:45 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup01.ocr
zfzhlhrdb1 2016/06/30 07:13:45 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup02.ocr
zfzhlhrdb1 2016/06/29 03:13:41 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/day.ocr
zfzhlhrdb1 2016/06/20 03:13:08 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/week.ocr
zfzhlhrdb1 2016/06/30 16:21:34 /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs/backup_20160630_162134.ocr
2,恢复
ocrconfig -restore /app/crs/product/11.0.6/crs/cdata/racluster/backup01.ocr
3,查看配置
[grid@rac1 ~]$ more /etc/oracle/ocr.loc
ocrconfig_loc=+DATA
local_only=FALSE
[grid@rac1 ~]$
4,查看进程
[grid@rac1 ~]$ ps -ef | grep d.bin
root 4694 1 0 10:00 ? 00:00:13 /u01/grid/bin/ohasd.bin reboot
grid 4821 1 0 10:00 ? 00:00:28 /u01/grid/bin/oraagent.bin
root 4823 1 0 10:00 ? 00:00:04 /u01/grid/bin/orarootagent.bin
grid 4846 1 0 10:00 ? 00:00:00 /u01/grid/bin/gipcd.bin
grid 4859 1 0 10:00 ? 00:00:00 /u01/grid/bin/mdnsd.bin
grid 4874 1 0 10:00 ? 00:00:01 /u01/grid/bin/gpnpd.bin
root 8645 1 0 10:47 ? 00:00:04 /u01/grid/bin/cssdmonitor
root 8662 1 0 10:48 ? 00:00:05 /u01/grid/bin/cssdagent
grid 8664 1 0 10:48 ? 00:00:01 /u01/grid/bin/diskmon.bin -d -f
grid 8688 1 0 10:48 ? 00:00:40 /u01/grid/bin/ocssd.bin
root 8754 1 0 10:50 ? 00:00:01 /u01/grid/bin/octssd.bin
grid 8770 1 0 10:50 ? 00:00:02 /u01/grid/bin/evmd.bin
grid 8888 1 0 10:51 ? 00:00:00 /u01/grid/bin/oclskd.bin
root 8920 1 0 10:51 ? 00:00:07 /u01/grid/bin/crsd.bin reboot
root 8966 1 0 10:51 ? 00:00:00 /u01/grid/bin/oclskd.bin
grid 9013 8770 0 10:51 ? 00:00:00 /u01/grid/bin/evmlogger.bin -o /u01/grid/evm/log/evmlogger.info -l /u01/grid/evm/log/evmlogger.log
grid 9055 1 0 10:51 ? 00:00:06 /u01/grid/bin/oraagent.bin
root 9059 1 0 10:51 ? 00:00:42 /u01/grid/bin/orarootagent.bin
grid 9283 1 0 10:52 ? 00:00:00 /u01/grid/bin/tnslsnr LISTENER -inherit
oracle 9549 1 0 10:58 ? 00:00:26 /u01/grid/bin/oraagent.bin
oracle 9773 1 0 11:00 ? 00:00:00 /u01/grid/bin/oclskd.bin
grid 18618 1 0 13:46 ? 00:00:00 /u01/grid/bin/tnslsnr LISTENER_SCAN1 -inherit
grid 22527 21370 0 14:58 pts/2 00:00:00 grep d.bin
[grid@rac1 ~]$
注:
ocssd:用于管理与协调集群中各个节点的关系,并用于节点通信。该进程非常的重要,如果这个进程异常中止,会导致系统自动重启。在某些极端的情况下,如果ocssd无法正常启动,就会导致操作系统循环重启。
crsd:监控节点各个资源,当某个资源发生异常是,自动重启或者切换该资源。
evmd:是一个基于后台的事件检测程序。
oclskd:该守护进程是Oracle 11g(11.10.6)新增的一个后台进程,主要是用于监控RAC数据库节点实例,当某个实例挂起时,就重启该节点。
逻辑备份与恢复(手动备份)
其实OCR也可以通过手动的方式导出、导入、方法如下:
ocrconfig -export /tmp/ocr_bak
ocrconfig -import /tmp/ocr_bak
使用ocrconfig -export 方式产生的备份,统称之为逻辑备份。
对于重大的ocr配置发生变化前后,如添加删除节点,修改集群资源,创建数据库等,都建议使用逻辑备份。
对于由于错误配置而导致的ocr被损坏的情形下,我们可以使用ocrconfig -import方式进行恢复。
对于这种逻辑方式也可以还原丢失或损坏的ocr磁盘(文件)。
如何修复11.2 Grid权限误操作
关于Oracle GRID HOME文件目录的权限问题
- chown -R 误操作了,将整个/u01/app的权限修过了如何恢复?
- 删除了$GRID_HOME/log文件夹下的所有内容,集群不能启动,如何恢复?
使用chown -R 误操作了,将整个/u01/app的权限修过了,导致grid无法启动。,搜了下mos发现了一篇文档:Tips for checking file permissions on GRID environment(ID 1931142.1)
该文档中描述到,$GRID_HOME/crs/utl下面的几个文件中记录了整个GRID_HOME下面的文件和目录的相关权限。
Check the permissions from the following 2 files which are created during Grid Infrastructure installation.
In $GRID_HOME/crs/utl (for 11.2 and 12.1.0.1) and \
crsconfig_dirs :which has all directories listed in \
crsconfig_fileperms :which has list of files and their permissions and locations in \
我们来看下是否是这样的,cd $ORACLE_HOME/crs/utl:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 | [root@rac2 bin]# cd /home/grid/app/11.2/grid/crs/utl [root@rac2 utl]# ls -ltr total 324 -rw-r–r– 1 root root 1128 Aug 11 09:48 usrvip -rw-r–r– 1 root root 8437 Aug 11 09:48 srvctl …… -rw-r–r– 1 root root 12102 Aug 11 09:48 crsconfig_files -rw-r–r– 1 root root 13468 Aug 11 09:48 crsconfig_fileperms -rw-r–r– 1 root root 8666 Aug 11 09:48crsconfig_dirs -rw-r–r– 1 root root 699 Aug 11 09:48 crfsetenv -rw-r–r– 1 root root 1280 Aug 11 09:48 cmdllroot.sh -rw-r–r– 1 root root 3680 Aug 11 09:48 cluutil -rw-r–r– 1 root root 1648 Aug 11 09:48 clsrwrap -rw-r–r– 1 root root 540 Aug 11 09:48 appvipcfg [zfzhlhrdb1:grid]:/oracle/app/11.2.0/grid/crs/utl>more crsconfig_dirs # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # The values in each line use the following format: # # OSLIST DIRNAME OWNER GROUP CLOSED-PERMS OPEN-PERMS # # Note: # 1) OSLIST is a comma-separated list of platforms on which the directory # needs to be created. 'all' indicates that the directory needs to be # created on every platform. OSLIST MUST NOT contain whitespace. # 2) Permissions need to be specified AS OCTAL NUMBERS. If permissions are # not specified, default (umask) values will be used. # # TBD: OPEN-PERMS need to be added for each dir all /oracle/app/11.2.0/grid/cdata grid dba 0775 all /oracle/app/11.2.0/grid/cdata/zfzhlhrdb-crs grid dba 0775 all /oracle/app/11.2.0/grid/cfgtoollogs grid dba 0775 all /oracle/app/11.2.0/grid/cfgtoollogs/crsconfig grid dba 0775 all /oracle/app/11.2.0/grid/log grid dba 0775 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1 root dba 01755 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/crsd root dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/ctssd root dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/evmd grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/cssd grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/mdnsd grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/gpnpd grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/gnsd root dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/srvm grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/gipcd grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/diskmon grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/cvu grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/cvu/cvulog grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/cvu/cvutrc grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/acfssec root dba 0755 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/acfsrepl grid dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/acfslog grid dba 0750 all /oracle/app/11.2.0/grid/cdata/localhost grid dba 0755 all /oracle/app/11.2.0/grid/cdata/zfzhlhrdb1 grid dba 0755 all /oracle/app/11.2.0/grid/cv grid dba 0775 all /oracle/app/11.2.0/grid/cv/log grid dba 0775 all /oracle/app/11.2.0/grid/cv/init grid dba 0775 all /oracle/app/11.2.0/grid/cv/report grid dba 0775 all /oracle/app/11.2.0/grid/cv/report/html grid dba 0775 all /oracle/app/11.2.0/grid/cv/report/text grid dba 0775 all /oracle/app/11.2.0/grid/cv/report/xml grid dba 0775 # These dirs must be owned by crsuser in SIHA, and $SUPERUSER in cluster env. # 'HAS_USER' is set appropriately in roothas.pl and rootcrs.pl for this # purpose all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/ohasd root dba 0750 all /oracle/app/11.2.0/grid/lib root dba 0755 all /oracle/app/11.2.0/grid/bin root dba 0755 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/agent root dba 01775 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/agent/crsd root dba 01777 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/agent/ohasd root dba 01775 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/client grid dba 01777 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/racg grid dba 01775 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/racg/racgmain grid dba 01777 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/racg/racgeut grid dba 01777 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/racg/racgevtf grid dba 01777 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/admin grid dba 0750 all /oracle/app/11.2.0/grid/log/diag/clients grid asmadmin 01770 all /oracle/app/11.2.0/grid/evm grid dba 0750 all /oracle/app/11.2.0/grid/evm/init grid dba 0750 all /oracle/app/11.2.0/grid/auth/evm/zfzhlhrdb1 root dba 01777 all /oracle/app/11.2.0/grid/evm/log grid dba 01770 all /oracle/app/11.2.0/grid/eons/init grid dba 0750 all /oracle/app/11.2.0/grid/auth/ohasd/zfzhlhrdb1 root dba 01777 all /oracle/app/11.2.0/grid/mdns grid dba 0750 all /oracle/app/11.2.0/grid/mdns/init grid dba 0750 all /oracle/app/11.2.0/grid/gipc grid dba 0750 all /oracle/app/11.2.0/grid/gipc/init grid dba 0750 all /oracle/app/11.2.0/grid/gnsd root dba 0750 all /oracle/app/11.2.0/grid/gnsd/init root dba 0750 all /oracle/app/11.2.0/grid/gpnp grid dba 0750 all /oracle/app/11.2.0/grid/gpnp/init grid dba 0750 all /oracle/app/11.2.0/grid/ohasd grid dba 0750 all /oracle/app/11.2.0/grid/ohasd/init grid dba 0750 all /oracle/app/11.2.0/grid/gpnp grid dba 0750 all /oracle/app/11.2.0/grid/gpnp/profiles grid dba 0750 all /oracle/app/11.2.0/grid/gpnp/profiles/peer grid dba 0750 all /oracle/app/11.2.0/grid/gpnp/wallets grid dba 01750 all /oracle/app/11.2.0/grid/gpnp/wallets/root grid dba 01700 all /oracle/app/11.2.0/grid/gpnp/wallets/prdr grid dba 01750 all /oracle/app/11.2.0/grid/gpnp/wallets/peer grid dba 01700 all /oracle/app/11.2.0/grid/gpnp/wallets/pa grid dba 01700 all /oracle/app/11.2.0/grid/mdns grid dba 0750 all /oracle/app/11.2.0/grid/gpnp grid dba 0750 all /oracle/app/11.2.0/grid/gpnp/zfzhlhrdb1/profiles grid dba 0750 all /oracle/app/11.2.0/grid/gpnp/zfzhlhrdb1/profiles/peer grid dba 0750 all /oracle/app/11.2.0/grid/gpnp/zfzhlhrdb1/wallets grid dba 01750 all /oracle/app/11.2.0/grid/gpnp/zfzhlhrdb1/wallets/root grid dba 01700 all /oracle/app/11.2.0/grid/gpnp/zfzhlhrdb1/wallets/prdr grid dba 01750 all /oracle/app/11.2.0/grid/gpnp/zfzhlhrdb1/wallets/peer grid dba 01700 all /oracle/app/11.2.0/grid/gpnp/zfzhlhrdb1/wallets/pa grid dba 01700 all /oracle/app/11.2.0/grid/css grid dba 0711 all /oracle/app/11.2.0/grid/css/init grid dba 0711 all /oracle/app/11.2.0/grid/css/log grid dba 0711 all /oracle/app/11.2.0/grid/auth/css/zfzhlhrdb1 root dba 01777 all /oracle/app/11.2.0/grid/crs root dba 0755 all /oracle/app/11.2.0/grid/crs/init root dba 0755 all /oracle/app/11.2.0/grid/crs/profile root dba 0755 all /oracle/app/11.2.0/grid/crs/script root dba 0755 all /oracle/app/11.2.0/grid/crs/template root dba 0755 all /oracle/app/11.2.0/grid/auth/crs/zfzhlhrdb1 root dba 01777 all /oracle/app/11.2.0/grid/crs/log grid dba 01750 all /oracle/app/11.2.0/grid/crs/trace grid dba 01750 all /oracle/app/11.2.0/grid/crs/public grid dba 01777 all /oracle/app/11.2.0/grid/ctss root dba 0755 all /oracle/app/11.2.0/grid/ctss/init root dba 0755 all /oracle/app/11.2.0/grid/racg/usrco grid dba all /oracle/app/11.2.0/grid/racg/dump grid dba 0775 all /oracle/app/11.2.0/grid/srvm/admin grid dba 0775 all /oracle/app/11.2.0/grid/srvm/log grid dba 0775 all /oracle/app/11.2.0/grid/evm/admin/conf grid dba 0750 all /oracle/app/11.2.0/grid/evm/admin/logger grid dba 0750 all /oracle/app/11.2.0/grid/crf root dba 0750 all /oracle/app/11.2.0/grid/crf/admin root dba 0750 all /oracle/app/11.2.0/grid/crf/admin/run grid dba 0750 all /oracle/app/11.2.0/grid/crf/admin/run/crfmond root dba 0700 all /oracle/app/11.2.0/grid/crf/admin/run/crflogd root dba 0700 all /oracle/app/11.2.0/grid/crf/db root dba 0750 all /oracle/app/11.2.0/grid/crf/db/zfzhlhrdb1 root dba 0750 all /oracle/app/11.2.0/grid/osysmond root dba 0755 all /oracle/app/11.2.0/grid/osysmond/init root dba 0755 all /oracle/app/11.2.0/grid/ologgerd root dba 0755 all /oracle/app/11.2.0/grid/ologgerd/init root dba 0755 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/crfmond root dba 0750 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/crflogd root dba 0750 unix /etc/oracle/oprocd root dba 0775 unix /etc/oracle/oprocd/check root dba 0770 unix /etc/oracle/oprocd/stop root dba 0770 unix /etc/oracle/oprocd/fatal root dba 0770 unix /etc/oracle/scls_scr root dba 0755 unix /etc/oracle/scls_scr/zfzhlhrdb1 root dba 0755 unix /var/tmp/.oracle root dba 01777 unix /tmp/.oracle root dba 01777 unix /oracle/app/11.2.0/grid/log/zfzhlhrdb1/acfsreplroot root dba 0750 # create $ID, if it doesn't exist (applicable only in dev env) unix /etc root root 0755 unix /oracle/app/11.2.0/grid root dba 0755 # Last Gasp files directory - change "unix" to "all" # once Windows makes a directory decision. unix /etc/oracle/lastgasp root dba 0770 unix /etc/rc.d/rc2.d root root 0755 [zfzhlhrdb1:grid]:/oracle/app/11.2.0/grid/crs/utl> more crsconfig_fileperms # Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. # The values in each line use the following format: # # OSLIST FILENAME OWNER GROUP PERMS # # Note: # 1) OSLIST is a comma-separated list of platforms on which the file # permissions need to be set. 'all' indicates that the directory needs # to be created on every platform. OSLIST MUST NOT contain whitespace. # 2) Permissions need to be specified AS OCTAL NUMBERS. If permissions # are not specified, default (umask) values will be used. # 3) The fields within each line of this file must be delimited by a single space # unix /oracle/app/11.2.0/grid/log/zfzhlhrdb1/alertzfzhlhrdb1.log grid dba 0664 unix /oracle/app/11.2.0/grid/bin/usrvip root dba 0755 unix /oracle/app/11.2.0/grid/bin/appvipcfg root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/preupdate.sh grid dba 0755 unix /oracle/app/11.2.0/grid/crs/install/s_crsconfig_defs grid dba 0755 unix /oracle/app/11.2.0/grid/bin/cluutil grid dba 0755 unix /oracle/app/11.2.0/grid/bin/ocrcheck root dba 0755 unix /oracle/app/11.2.0/grid/bin/ocrcheck.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/ocrconfig root dba 0755 unix /oracle/app/11.2.0/grid/bin/ocrconfig.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/ocrdump root dba 0755 unix /oracle/app/11.2.0/grid/bin/ocrdump.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/ocrpatch root dba 0755 unix /oracle/app/11.2.0/grid/bin/appagent grid dba 0755 unix /oracle/app/11.2.0/grid/bin/clssproxy grid dba 0755 unix /oracle/app/11.2.0/grid/bin/cssvfupgd root dba 0755 unix /oracle/app/11.2.0/grid/bin/cssvfupgd.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/racgwrap grid dba 0755 unix /oracle/app/11.2.0/grid/bin/cemutls grid dba 0755 unix /oracle/app/11.2.0/grid/bin/cemutlo grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_getperm grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_profile grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_register grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_relocate grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_setperm grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_start grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_stat grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_stop grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crs_unregister grid dba 0755 unix /oracle/app/11.2.0/grid/bin/gipcd grid dba 0755 unix /oracle/app/11.2.0/grid/bin/mdnsd grid dba 0755 unix /oracle/app/11.2.0/grid/bin/gpnpd grid dba 0755 unix /oracle/app/11.2.0/grid/bin/gpnptool grid dba 0755 unix /oracle/app/11.2.0/grid/bin/oranetmonitor grid dba 0755 unix /oracle/app/11.2.0/grid/bin/rdtool grid dba 0755 unix /oracle/app/11.2.0/grid/bin/octssd root dba 0741 unix /oracle/app/11.2.0/grid/bin/octssd.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/ohasd root dba 0741 unix /oracle/app/11.2.0/grid/bin/ohasd.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/crsd root dba 0741 unix /oracle/app/11.2.0/grid/bin/crsd.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/evmd grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evminfo grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evmlogger grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evmmkbin grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evmmklib grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evmpost grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evmshow grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evmsort grid dba 0755 unix /oracle/app/11.2.0/grid/bin/evmwatch grid dba 0755 unix /oracle/app/11.2.0/grid/bin/lsnodes grid dba 0755 unix /oracle/app/11.2.0/grid/bin/oifcfg grid dba 0755 unix /oracle/app/11.2.0/grid/bin/olsnodes grid dba 0755 unix /oracle/app/11.2.0/grid/bin/oraagent grid dba 0755 unix /oracle/app/11.2.0/grid/bin/orarootagent root dba 0741 unix /oracle/app/11.2.0/grid/bin/orarootagent.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/scriptagent grid dba 0755 unix /oracle/app/11.2.0/grid/bin/lsdb grid dba 0755 unix /oracle/app/11.2.0/grid/bin/emcrsp grid dba 0755 unix /oracle/app/11.2.0/grid/bin/onsctl grid dba 0755 unix /oracle/app/11.2.0/grid/crs/install/onsconfig grid dba 0554 unix /oracle/app/11.2.0/grid/bin/gnsd root dba 0741 unix /oracle/app/11.2.0/grid/bin/gnsd.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/gsd.sh grid dba 0755 unix /oracle/app/11.2.0/grid/bin/gsdctl grid dba 0755 unix /oracle/app/11.2.0/grid/bin/scrctl grid dba 0750 unix /oracle/app/11.2.0/grid/bin/vipca grid dba 0755 unix /oracle/app/11.2.0/grid/bin/oc4jctl grid dba 0755 unix /oracle/app/11.2.0/grid/bin/cvures grid dba 0755 unix /oracle/app/11.2.0/grid/bin/odnsd grid dba 0755 unix /oracle/app/11.2.0/grid/bin/qosctl grid dba 0755 unix /oracle/app/11.2.0/grid/crs/install/cmdllroot.sh grid dba 0755 unix /oracle/app/11.2.0/grid/crs/utl/rootdelete.sh root root 0755 unix /oracle/app/11.2.0/grid/crs/utl/rootdeletenode.sh root root 0755 unix /oracle/app/11.2.0/grid/crs/utl/rootdeinstall.sh root root 0755 unix /oracle/app/11.2.0/grid/crs/utl/rootaddnode.sh root root 0755 unix /oracle/app/11.2.0/grid/lib/libskgxpcompat.so grid dba 0644 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/client/olsnodes.log grid dba 0666 all /oracle/app/11.2.0/grid/log/zfzhlhrdb1/client/oifcfg.log grid dba 0666 unix /oracle/app/11.2.0/grid/bin/srvctl root dba 0755 unix /oracle/app/11.2.0/grid/bin/cluvfy root dba 0755 unix /oracle/app/11.2.0/grid/bin/clsecho root dba 0755 unix /oracle/app/11.2.0/grid/bin/clsecho.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/clscfg root dba 0755 unix /oracle/app/11.2.0/grid/bin/clscfg.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/clsfmt root dba 0755 unix /oracle/app/11.2.0/grid/bin/clsfmt.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/clsid grid dba 0755 unix /oracle/app/11.2.0/grid/bin/crsctl root dba 0755 unix /oracle/app/11.2.0/grid/bin/crsctl.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/ndfnceca grid dba 0750 unix /oracle/app/11.2.0/grid/bin/oclskd root dba 0755 unix /oracle/app/11.2.0/grid/bin/oclskd.bin root dba 0751 unix /oracle/app/11.2.0/grid/bin/oclsomon grid dba 0755 unix /oracle/app/11.2.0/grid/bin/oclsvmon grid dba 0755 unix /oracle/app/11.2.0/grid/bin/ocssd grid dba 0755 unix /oracle/app/11.2.0/grid/bin/cssdagent root dba 0741 unix /oracle/app/11.2.0/grid/bin/cssdagent.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/cssdmonitor root dba 0741 unix /oracle/app/11.2.0/grid/bin/cssdmonitor.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/diskmon root dba 0741 unix /oracle/app/11.2.0/grid/bin/diskmon.bin root dba 0741 unix /oracle/app/11.2.0/grid/bin/diagcollection.sh root dba 0755 unix /oracle/app/11.2.0/grid/bin/oradnssd grid dba 0755 unix /oracle/app/11.2.0/grid/bin/oradnssd.bin grid dba 0755 unix /oracle/app/11.2.0/grid/bin/setasmgidwrap grid dba 0755 unix /oracle/app/11.2.0/grid/bin/oclumon root dba 0750 unix /oracle/app/11.2.0/grid/bin/oclumon.bin root dba 0750 unix /oracle/app/11.2.0/grid/bin/oclumon.pl grid dba 0750 unix /oracle/app/11.2.0/grid/bin/crswrapexece.pl root dba 0744 unix /oracle/app/11.2.0/grid/bin/crfsetenv root dba 0750 unix /oracle/app/11.2.0/grid/bin/osysmond root dba 0750 unix /oracle/app/11.2.0/grid/bin/osysmond.bin root dba 0750 unix /oracle/app/11.2.0/grid/bin/ologgerd root dba 0750 unix /oracle/app/11.2.0/grid/bin/ologdbg grid dba 0750 unix /oracle/app/11.2.0/grid/bin/ologdbg.pl grid dba 0750 unix /etc/oracle/setasmgid root dba 4710 # Jars and shared libraries used by the executables invoked by the root script unix /oracle/app/11.2.0/grid/jlib/srvm.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/srvmasm.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/srvctl.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/srvmhas.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/gns.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/ons.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/netcfg.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/i18n.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/supercluster.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/supercluster-common.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/antlr-complete.jar root dba 0644 unix /oracle/app/11.2.0/grid/jlib/antlr-3.3-complete.jar root dba 0644 unix /oracle/app/11.2.0/grid/lib/libhasgen11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libocr11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libocrb11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libocrutl11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libclntsh.so.11.1 root dba 0644 unix /oracle/app/11.2.0/grid/lib/libclntshcore.so.11.1 root dba 0644 unix /oracle/app/11.2.0/grid/lib/libskgxn2.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libskgxp11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libasmclntsh11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libcell11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libnnz11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libclsra11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libgns11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libeons.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libonsx.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libeonsserver.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libsrvm11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libsrvmhas11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libsrvmocr11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libuini11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libgnsjni11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/librdjni11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libgnsjni11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libclsce11.so root dba 0644 unix /oracle/app/11.2.0/grid/lib/libcrf11.so root dba 0644 unix /oracle/app/11.2.0/grid/bin/diagcollection.pl root dba 0755 # crs configuration scripts invoked from rootcrs.pl unix /oracle/app/11.2.0/grid/crs/install/crsconfig_lib.pm root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/s_crsconfig_lib.pm root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/crsdelete.pm root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/crspatch.pm root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/oracss.pm root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/oraacfs.pm root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/hasdconfig.pl root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/rootcrs.pl root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/roothas.pl root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/preupdate.sh root dba 0755 unix /oracle/app/11.2.0/grid/crs/install/rootofs.sh root dba 0755 # XXX: required only for dev env, where inittab ($IT) is not present already unix /etc/inittab root root 0644 # USM FILES # Only files which will be installed with executable permissions need # to be listed. unix /oracle/app/11.2.0/grid/bin/acfsdriverstate root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsload root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsregistrymount root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsroot root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfssinglefsmount root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsrepl_apply root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsrepl_apply.bin root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsreplcrs grid dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsreplcrs.pl grid dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsrepl_initializer root dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsrepl_monitor grid dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsrepl_preapply grid dba 0755 unix /oracle/app/11.2.0/grid/bin/acfsrepl_transport grid dba 0755 unix /oracle/app/11.2.0/grid/lib/acfsdriverstate.pl root dba 0644 unix /oracle/app/11.2.0/grid/lib/acfsload.pl root dba 0644 unix /oracle/app/11.2.0/grid/lib/acfsregistrymount.pl root dba 0644 unix /oracle/app/11.2.0/grid/lib/acfsroot.pl root dba 0644 unix /oracle/app/11.2.0/grid/lib/acfssinglefsmount.pl root dba 0644 unix /oracle/app/11.2.0/grid/lib/acfstoolsdriver.sh root dba 0755 unix /oracle/app/11.2.0/grid/lib/libusmacfs11.so grid dba 0644 #EVM config files unix /oracle/app/11.2.0/grid/evm/admin/conf/evm.auth root dba 0644 unix /oracle/app/11.2.0/grid/evm/admin/conf/evmdaemon.conf root dba 0644 unix /oracle/app/11.2.0/grid/evm/admin/conf/evmlogger.conf root dba 0644 # TFA files unix /oracle/app/11.2.0/grid/crs/install/tfa_setup.sh root dba 0755 unix /oracle/app/11.2.0/grid/cdata/zfzhlhrdb1.olr root dba 0600 unix /etc/oracle/olr.loc root dba 0644 unix /etc/oracle/ocr.loc root dba 0644 [zfzhlhrdb1:grid]:/oracle/app/11.2.0/grid/crs/utl> |
我们可以看到,确实是这样,crsconfig_dirs里面记录所有$GRID_HOME相关目录的权限。crsconfig_fileperms中记录了文件的权限.
校验权限
我们可以通过命令来校验:Validate the \
$ cluvfy comp software -n all -verbose
[zfzhlhrdb1:grid]:/home/grid>cluvfy comp software -n all -verbose
Verifying software
Check: Software
Component: crs
Node Name: zfzhlhrdb2
/oracle/app/11.2.0/grid/bin/racgeut..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgeut" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/racgmain..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgmain" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/asmproxy..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/asmproxy" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/lib/oc4jctl_common.pm..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/lib/oc4jctl_common.pm" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/lib/oc4jctl_lib.pm..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/lib/oc4jctl_lib.pm" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/appagent.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/appagent.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/clssproxy.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/clssproxy.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_getperm.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_getperm.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_profile.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_profile.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_register.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_register.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_relocate.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_relocate.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_setperm.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_setperm.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_start.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_start.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_stat.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_stat.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_stop.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_stop.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_unregister.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_unregister.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gipcd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gipcd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/mdnsd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/mdnsd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gpnpd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gpnpd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gpnptool.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gpnptool.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oranetmonitor.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oranetmonitor.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evminfo.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evminfo.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmlogger.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmlogger.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmmkbin.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmmkbin.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmmklib.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmmklib.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmpost.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmpost.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmshow.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmshow.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmsort.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmsort.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmwatch.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmwatch.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oraagent.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oraagent.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/racgevtf..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgevtf" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/racgvip..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgvip" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/sclsspawn..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/sclsspawn" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/scriptagent.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/scriptagent.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oprocd..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oprocd" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/emcrsp.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/emcrsp.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/clsid.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/clsid.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/ocssd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/ocssd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crstmpl.scr..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crstmpl.scr" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evt.sh..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evt.sh" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/cemutls.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/cemutls.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/cemutlo.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/cemutlo.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/lsdb.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/lsdb.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oifcfg.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oifcfg.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/olsnodes.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/olsnodes.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gsd..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gsd" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oc4jctl.pl..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oc4jctl.pl" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/lib/s_oc4jctl_lib.pm..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/lib/s_oc4jctl_lib.pm" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/appvipcfg.pl..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/appvipcfg.pl" did not match the expected value. [Expected = "0750" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/lxinst..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/lxinst" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/clone/rootpre/ORCLcluster/lib/libskgxnr.a...No such file or directory
Node Name: zfzhlhrdb1
/oracle/app/11.2.0/grid/bin/racgeut..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgeut" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/racgmain..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgmain" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/asmproxy..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/asmproxy" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/lib/oc4jctl_common.pm..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/lib/oc4jctl_common.pm" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/lib/oc4jctl_lib.pm..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/lib/oc4jctl_lib.pm" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/appagent.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/appagent.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/clssproxy.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/clssproxy.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_getperm.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_getperm.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_profile.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_profile.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_register.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_register.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_relocate.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_relocate.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_setperm.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_setperm.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_start.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_start.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_stat.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_stat.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_stop.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_stop.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crs_unregister.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crs_unregister.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gipcd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gipcd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/mdnsd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/mdnsd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gpnpd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gpnpd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gpnptool.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gpnptool.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oranetmonitor.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oranetmonitor.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evminfo.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evminfo.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmlogger.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmlogger.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmmkbin.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmmkbin.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmmklib.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmmklib.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmpost.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmpost.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmshow.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmshow.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmsort.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmsort.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evmwatch.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evmwatch.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oraagent.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oraagent.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/racgevtf..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgevtf" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/racgvip..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/racgvip" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/sclsspawn..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/sclsspawn" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/scriptagent.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/scriptagent.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oprocd..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oprocd" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/emcrsp.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/emcrsp.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/clsid.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/clsid.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/ocssd.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/ocssd.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/crstmpl.scr..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/crstmpl.scr" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/evt.sh..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/evt.sh" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/cemutls.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/cemutls.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/cemutlo.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/cemutlo.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/lsdb.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/lsdb.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oifcfg.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oifcfg.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/olsnodes.bin..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/olsnodes.bin" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/gsd..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/gsd" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/oc4jctl.pl..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/oc4jctl.pl" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/lib/s_oc4jctl_lib.pm..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/lib/s_oc4jctl_lib.pm" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/appvipcfg.pl..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/appvipcfg.pl" did not match the expected value. [Expected = "0750" ; Found = "0775"]
/oracle/app/11.2.0/grid/bin/lxinst..."Permissions" did not match reference
Permissions of file "/oracle/app/11.2.0/grid/bin/lxinst" did not match the expected value. [Expected = "0755" ; Found = "0775"]
/oracle/app/11.2.0/grid/clone/rootpre/ORCLcluster/lib/libskgxnr.a...No such file or directory
1227 files verified
Software check failed
Verification of software was unsuccessful on all the specified nodes.
解决
所以要解决这个问题其实并不难,我们大致可以通过如下几种方法来解决:
1. 根据前面的几个权限配置脚本自己参考进行修改,实际上并不难,直接UE编辑就很快搞定.
2. 根据Mos文档提供的建议通过 $GRID_HOME/crs/install/rootcrs.pl -init 或 roothas.pl -init进行解决. rootcrs.pl –init是在PSU>11.2.0.3.6下执行的,如果PSU\<11.2.0.3.6可以执行如下两条命令来实现同样的效果
\
\
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | For 11.2: For clustered Grid Infrastructure, as root user # cd <GRID_HOME>/crs/install/ # ./rootcrs.pl -init For Standalone Grid Infrastructure, as root user # cd <GRID_HOME>/crs/install/ # ./roothas.pl -init For 12c: For clustered Grid Infrastructure, as root user # cd <GRID_HOME>/crs/install/ # ./rootcrs.sh -init For Standalone Grid Infrastructure, as root user # cd <GRID_HOME>/crs/install/ # ./roothas.sh -init |
3.采用MOS1515018.1文档提供的脚本在正常库上生成脚本,然后将生成的脚本在异常库上执行从而来修复权限问题(应该和方法2结合使用)。
4. 11gR2可以deconfig crs的配置,然后重新跑root.sh即可。重新跑root.sh脚本并不影响数据库,所以无需担心(个人推荐的一种方式).
$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose
$ORACLE_HOME/root.sh
5. 如果是rac的某个节点的误操作,那么还可以通过delete node然后add node来做,不过这个相对麻烦太多了,但是或许是最保险的一种方式。oracle也推荐这样,因为你如果人为修改文件权限,很难保证以后运行过程中不会出现什么问题。
补充:
Linux环境中还可以通过getfacl和setfacl来进行操作,如下是例子:
1) getfacl /home/grid/app/11.2/grid > dir_privs.txt
2) set –restore dir_privs.txt
总结:
在安装有GI的环境下,权限、属主是严格被设定的,任何对于它们的错误修改容易引发一系列的问题,而且这些问题往往都很诡异很难按照常规的思路去诊断。万一权限或属主被修改了可以通过rootcrs.pl -init及permission.pl进行修复,rootcrs.pl –init仅修复GI的核心目录,所以其修复速度较快,如果遇到GI无法启动的问题,建议首选这种方法以使GI能够快速启动,但其缺点在于无法全量的进行修复,GI虽然正常了,并不能保证之后的运行过程中不出现这样那样的问题,这时就需要permission.pl出场了,permission.pl的运行模式决定了源库(权限正确的库)与目标库(权限错误的库)间的软件版本尽可能的一致,所以源库一定要选好,否则问题会更糟,另外如果源、目标两个库的安装目录不一样还需要对permission*脚本作调整后再执行。
所以个人建议还是跑root.sh来的稳妥一点。
MOS 1515018.1 permission.pl脚本的使用
chmod 755 permission.pl
oracle用户获取ORACLE_HOME: ./permission.pl $ORACLE_HOME
root用户获取GRID_HOME: ./permission.pl $ORACLE_HOME
Script generates two files
a. permission-\ - This contains file permission in octal value, owner and group information of the files captured
b. restore-perm-\ - This contains command to change the permission, owner, and group of the captured files
拷贝到目标主机后分别执行:
chmod 755 restore-perm-\
./restore-perm-\
如何修复ASM实例名和节点名不一致的情况
对于10g的情况,我们可以参考Dave大神的blog:RAC修改ASM实例名的步骤:http://blog.csdn.net/tianlesoftware/article/details/6275827
对于11g的情况,我们只能重新执行root.sh脚本来修复这个问题。
如何彻底清除CRS信息
ZFTPCCDB1:root:/>$ORACLE_HOME/crs/install/rootcrs.pl -h
Unknown option: h
Usage:
rootcrs.pl [-verbose] [-upgrade [-force] | -patch]
[-paramfile \
[-deconfig [-deinstall] [-keepdg] | -downgrade] [-force] [-lastnode]
[-downgrade] [-oldcrshome \
[-unlock [-crshome \
Options:
-verbose Run this script in verbose mode
-upgrade Oracle HA is being upgraded from previous version
-patch Oracle HA is being upgraded to a patch version
-paramfile Complete path of file specifying HA parameter values
-lastnode Force the node this is executing on to be considered the
last node of the install and perform actions associated
with configuring the last node
-downgrade Downgrade the clusterware
-version For use with downgrade; special handling is required if
downgrading to 9i. This is the old crs version in the format
A.B.C.D.E (e.g 11.1.0.6.0).
-deconfig Remove Oracle Clusterware to allow it to be uninstalled or reinstalled.
-force Force the execution of steps in delete that cannot be verified
to be safe
-deinstall Reset the permissions on CRS home during de-configuration
-keepdg Keep existing diskgroups during de-configuration
-unlock Unlock CRS home
-crshome Complete path of crs home. Use with unlock option.
-oldcrshome For use with downgrade. Complete path of the old crs home.
-nocrsstop used with unlock option to reset permissions on an inactive grid home
If neither -upgrade nor -patch is supplied, a new install is performed
To see the full manpage for this program, execute:
perldoc rootcrs.pl
根据MOS How to Proceed from Failed 11gR2 Grid Infrastructure (CRS) Installation (文档 ID 942166.1) 文档,若要重新执行root.sh脚本,我们可以如下操作:
在除最后一个节点外的所有节点执行:$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose
在最后一个节点执行:$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose -lastnode
重启OS后再执行:$ORACLE_HOME/root.sh
需要注意的一点是,我们在执行完$ORACLE_HOME/crs/install/rootcrs.pl -deconfig -force -verbose执成之后需要删除如下的文件: