oracle home/bin 下的oracle权限导致ORA-01078和Linux-x86_64 Error故障

1.具体故障现象

[root@rac01 bin]# ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.BAK01.dg
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.DATA01.dg
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.GBF1_ARC.dg
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.GBF2_ARC.dg
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.OCRVDISK.dg
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.YWDB_ARC.dg
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.asm
               ONLINE  ONLINE       rac01                    Started             
               ONLINE  ONLINE       rac02                    Started             
ora.gsd
               OFFLINE OFFLINE      rac01                                        
               OFFLINE OFFLINE      rac02                                        
ora.net1.network
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.ons
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
ora.registry.acfs
               ONLINE  ONLINE       rac01                                        
               ONLINE  ONLINE       rac02                                        
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac02                                        
ora.cvu
      1        ONLINE  ONLINE       rac02                                        
ora.gbf1.db
      1        ONLINE  OFFLINE                               Instance Shutdown   
      2        ONLINE  ONLINE       rac02                    Open                
ora.gbf2.db
      1        ONLINE  OFFLINE                               Instance Shutdown   
      2        ONLINE  ONLINE       rac02                    Open                
ora.oc4j
      1        ONLINE  ONLINE       rac02                                        
ora.rac01.vip
      1        ONLINE  ONLINE       rac01                                        
ora.rac02.vip
      1        ONLINE  ONLINE       rac02                                        
ora.scan1.vip
      1        ONLINE  ONLINE       rac02                                        
ora.ywdb.db
      1        ONLINE  OFFLINE                               Instance Shutdown   
      2        ONLINE  ONLINE       rac02                    Open  

2.尝试在rac01上直接拉起数据库

SQL> startup
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA01/GBF1/spfileGBF1.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA01/GBF1/spfileGBF1.ora
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux-x86_64 Error: 13: Permission denied
Additional information: 26
Additional information: 6553606

初步分析:spfileGBF1.ora这个参数文件问题
3.确认参数文件

root@rac01 grid]# su - grid
grid@rac01 ~]$ asmcmd
ASMCMD> ls       
BAK01/
DATA01/
GBF1_ARC/
GBF2_ARC/
OCRVDISK/
YWDB_ARC/
ASMCMD> cd GBF1
ASMCMD-8001: diskgroup 'GBF1' does not exist or is not mounted
ASMCMD> cd DATA01
ASMCMD> ls    
GBF1/
GBF2/
YWDB/
ASMCMD> cd GBF1
ASMCMD> ls    
CONTROLFILE/
DATAFILE/
ONLINELOG/

分析:参数文件存在,初步估计是权限的问题
4.检查rac01和rac02 下列信息或文件是否一致

su - oracle
ulimit -a  检查两边ulimit
su - root
grep Huge /proc/meminfo
cat /etc/security/limits.conf
cat /etc/sysctl.conf
echo $ORACLE_HOME --->/u01/app/oracle/product/11.2.0/db_1
cat /u01/app/oracle/product/11.2.0/db_1/dbs/initGBF11.ora 值为:
SPFILE='+DATA01/GBF1/spfileGBF1.ora'
SQL> create pfile='/home/oracle/rac01-gbf11.ora' from spfile='+DATA01/GBF1/spfileGBF1.ora';
ERROR at line 1:
ORA-01565: error in identifying file '+DATA01/GBF1/spfileGBF1.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA01/GBF1/spfileGBF1.ora
ORA-01034: ORACLE not available
ORA-27123: unable to attach to shared memory segment
Linux-x86_64 Error: 13: Permission denied
Additional information: 26
Additional information: 6553606

分析:磁盘组是grid用户 而数据库实例是oracle用户,所以oracle可能没权限操作磁盘组
检查 gird用户下

su - grid
echo  $GRID_HOME --->/u01/app/11.2.0/grid/
cd /u01/app/11.2.0/grid/bin/oracle
ls -ald oracle
./setasmgidwrap o=/u01/app/oracle/product/11.2.0/db_1/bin/oracle

5.再次对比rac01和rac02的oracle文件权限

su - oracle
cd /u01/app/oracle/product/11.2.0/db_1/bin
chmod 6751 oracle
ls -ald oracle
rac01 -rwsr-x--x 1 oracle asmadmin 239627031 Mar 10  2015 oracle*
rac02 -rwsr-s--x 1 oracle asmadmin 239627031 Mar 10  2015 oracle*
su - oracle
cd /u01/app/oracle/product/11.2.0/db_1/bin
chmod g+s oracle
ls -ald oracle
rac01 -rwsr-x--x 1 oracle asmadmin 239627031 Mar 10  2015 oracle*
su - oracle
cd /u01/app/oracle/product/11.2.0/db_1/bin
chmod 6751 oracle
rac01 -rwsr-x--x 1 oracle asmadmin 239627031 Mar 10  2015 oracle*

6.备份rac01和rac02的
su - oracle
备份 /u01/app/oracle/product/11.2.0/db_1/bin/oracle
7.操作目标:将/u01/app/oracle/product/11.2.0/db_1/bin/oracle的文件属性rac01 -rwsr-x–x 1 oracle asmadmin 239627031 Mar 10 2015 oracle*改为rac01 -rwsr-s–x 1 oracle asmadmin 239627031 Mar 10 2015 oracle*
共享磁盘属于gird用户,必须要有s权限
8.尝试停止gird软件,然后再修改文件属性

su - root
cd /u01/app/11.2.0/grid/bin
./crsctl stop has
su - grid
echo $GRID_HOME  --->/u01/app/11.2.0/grid/
cd /u01/app/11.2.0/grid/bin
chmod 6751 oracle
./setasmgidwrap o=/u01/app/oracle/product/11.2.0/db_1/bin/oracle
再次比对
ls -ald oracle
su - oracle
echo $ORACLE_HOME --->/u01/app/oracle/product/11.2.0/db_1
cd /u01/app/oracle/product/11.2.0/db_1/bin
chmod 6751 oracle

再次比对

ls -ald oracle

9.再次启动has

su - root
cd /u01/app/11.2.0/grid/bin
./crsctl start has  等待几分钟
./crsctl stat res -t 

10.故障处理成功。

你可能感兴趣的:(Oracle-RAC)