11.2 RAC 修改了目录权限(u01)后crs不能启动的解决方法-2-使用root.sh重构crs

联系:QQ(5163721)

标题:11.2 RAC 修改了目录权限(u01)后crs不能启动的解决方法-2-使用root.sh重构crs

作者:Lunar©版权所有[文章允许转载,但必须以链接方式注明源地址,否则追究法律责任.]

因此,下面我尝试比这个方法稍微科学一点点的方法2:重新执行节点1的root.sh,来尝试修复节点1的权限问题。
使用rootcrs.pl -deconfig删除crs配置信息:

[root@lunardb1 ohasd]# $GRID_HOME/crs/install/rootcrs.pl -deconfig
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
Network exists: 1/10.8.8.0/255.255.252.0/eth4, type static
VIP exists: /lunardb1-vip/10.8.8.31/10.8.8.0/255.255.252.0/eth4, hosting node lunardb1
VIP exists: /lunardb2-vip/10.8.8.33/10.8.8.0/255.255.252.0/eth4, hosting node lunardb2
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
PRCR-1065 : Failed to stop resource ora.lunardb1.vip
CRS-2529: Unable to act on 'ora.lunardb1.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
PRCR-1014 : Failed to stop resource ora.net1.network
PRCR-1065 : Failed to stop resource ora.net1.network
CRS-2529: Unable to act on 'ora.net1.network' because that would require stopping or relocating 'ora.lunardb1.vip', but the force option was not specified

PRKO-2380 : VIP lunardb1 is still running on node: lunardb1
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'lunardb1'
CRS-2677: Stop of 'ora.registry.acfs' on 'lunardb1' succeeded
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'lunardb1'
CRS-2673: Attempting to stop 'ora.crsd' on 'lunardb1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'lunardb1'
CRS-2673: Attempting to stop 'ora.LISTENER_DG.lsnr' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.ARCH.dg' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.DATA1.dg' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.REDODG.dg' on 'lunardb1'
CRS-2677: Stop of 'ora.ARCH.dg' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.LISTENER_DG.lsnr' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.lunardb1-dg-vip.vip' on 'lunardb1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.lunardb1.vip' on 'lunardb1'
CRS-2677: Stop of 'ora.DATA.dg' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.DATA1.dg' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.REDODG.dg' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.lunardb1-dg-vip.vip' on 'lunardb1' succeeded
CRS-2672: Attempting to start 'ora.lunardb1-dg-vip.vip' on 'lunardb2'
CRS-2677: Stop of 'ora.lunardb1.vip' on 'lunardb1' succeeded
CRS-2672: Attempting to start 'ora.lunardb1.vip' on 'lunardb2'
CRS-2676: Start of 'ora.lunardb1-dg-vip.vip' on 'lunardb2' succeeded
CRS-2676: Start of 'ora.lunardb1.vip' on 'lunardb2' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'lunardb1'
CRS-2677: Stop of 'ora.asm' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.net2.network' on 'lunardb1'
CRS-2677: Stop of 'ora.net1.network' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.net2.network' on 'lunardb1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'lunardb1' has completed
CRS-2677: Stop of 'ora.crsd' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.evmd' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.asm' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'lunardb1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'lunardb1'
CRS-2677: Stop of 'ora.evmd' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.asm' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'lunardb1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'lunardb1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'lunardb1'
CRS-2677: Stop of 'ora.cssd' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'lunardb1'
CRS-2677: Stop of 'ora.gipcd' on 'lunardb1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'lunardb1'
CRS-2677: Stop of 'ora.gpnpd' on 'lunardb1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'lunardb1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle clusterware stack on this node
You have new mail in /var/spool/mail/root
[root@lunardb1 ohasd]# 

使用root.sh重新配置crs:

[root@lunardb1 ohasd]# $GRID_HOME/root.sh
Performing root user operation for Oracle 11g 

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/11.2.0/grid

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
OLR initialization - successful
Adding Clusterware entries to inittab
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node lunardb2, number 2, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
PRKO-2190 : VIP exists for node lunardb1, VIP name lunardb1-vip
Preparing packages for installation...
cvuqdisk-1.0.9-1
Configure Oracle Grid Infrastructure for a Cluster ... succeeded
You have new mail in /var/spool/mail/root
[root@lunardb1 ohasd]# 

配置结束后,可以看到,节点1的数据库是不能正常启动的:

[root@lunardb1 ohasd]# crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ARCH.dg
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.DATA.dg
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.DATA1.dg
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.LISTENER.lsnr
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.LISTENER_DG.lsnr
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.OCR_VOTE.dg
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.REDODG.dg
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.asm
               ONLINE  ONLINE       lunardb1                   Started             
               ONLINE  ONLINE       lunardb2                   Started             
ora.gsd
               OFFLINE OFFLINE      lunardb1                                       
               OFFLINE OFFLINE      lunardb2                                       
ora.net1.network
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.net2.network
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.ons
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
ora.registry.acfs
               ONLINE  ONLINE       lunardb1                                       
               ONLINE  ONLINE       lunardb2                                       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       lunardb2                                       
ora.cvu
      1        ONLINE  ONLINE       lunardb2                                       
ora.oc4j
      1        ONLINE  ONLINE       lunardb2                                       
ora.lunardb.db
      1        ONLINE  OFFLINE                               Instance Shutdown   
      2        ONLINE  ONLINE       lunardb2                   Open,Readonly       
ora.lunardb1-dg-vip.vip
      1        ONLINE  ONLINE       lunardb1                                       
ora.lunardb1.vip
      1        ONLINE  ONLINE       lunardb1                                       
ora.lunardb2-dg-vip.vip
      1        ONLINE  ONLINE       lunardb2                                       
ora.lunardb2.vip
      1        ONLINE  ONLINE       lunardb2                                       
ora.scan1.vip
      1        ONLINE  ONLINE       lunardb2                                       
You have new mail in /var/spool/mail/root
[root@lunardb1 ohasd]# 

这个原因是很明显的,跟手工修改u01目录权限一文中的类似:

[root@lunardb1 ohasd]# su - oracle
[oracle@lunardb1 ~]$ ss

SQL*Plus: Release 11.2.0.3.0 Production on Sat Oct 4 20:23:05 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

ERROR:
ORA-12547: TNS:lost contact


Enter user-name: 

修改oracle二进制文件的权限:

[oracle@lunardb1 ~]$
[root@lunardb1 ohasd]# cd $GRID_HOME
[root@lunardb1 grid]# cd bin
[root@lunardb1 bin]# ll oracle
-rwxr-x--x 1 grid oinstall 204113496 Jun  7  2013 oracle
[root@lunardb1 bin]# chmod 6751 oracle
[root@lunardb1 bin]# ll oracle
-rwsr-s--x 1 grid oinstall 204113496 Jun  7  2013 oracle
[root@lunardb1 bin]# 

再次尝试启动数据库:

[oracle@lunardb1 ~]$ ss

SQL*Plus: Release 11.2.0.3.0 Production on Sat Oct 4 20:26:55 2014

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

20:26:55 @>startup
ORACLE instance started.

Total System Global Area 1.6034E+11 bytes
Fixed Size                  2236968 bytes
Variable Size            3.0602E+10 bytes
Database Buffers         1.2939E+11 bytes
Redo Buffers              352468992 bytes
Database mounted.
Database opened.
20:27:40 @>

再回过头看看root.sh修改了哪些主要目录的权限:

[root@lunardb1 grid]# ll |grep root
drwxr-xr-x  2 root oinstall 12288 Oct  4 20:15 bin
drwxr-x---  4 root oinstall  4096 Jun  7  2013 crf
drwxr-xr-x 17 root oinstall  4096 Jun  7  2013 crs
drwxr-xr-x  3 root oinstall  4096 Jun  7  2013 ctss
drwxr-x---  3 root oinstall  4096 Jun  7  2013 gns
drwxr-xr-x  3 root oinstall 12288 Jun  7  2013 lib
drwxr-xr-x  3 root oinstall  4096 Jun  7  2013 ologgerd
drwxr-xr-x  3 root oinstall  4096 Jun  7  2013 osysmond
-rwxr-x---  1 grid oinstall   467 Jun  7  2013 root.sh
-rwxr-xr-x  1 grid oinstall   480 Jun  7  2013 rootupgrade.sh
[root@lunardb1 grid]# 

这些目录是11.2 RAC的基本服务资源。从11.2开始,GI中不再显示类似上面的基础服务资源,需要使用init参数来看:

[root@lunardb1 grid]# crsctl status res -t -init
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.asm
      1        ONLINE  ONLINE       lunardb1                   Started             
ora.cluster_interconnect.haip
      1        ONLINE  ONLINE       lunardb1                                       
ora.crf
      1        ONLINE  ONLINE       lunardb1                                       
ora.crsd
      1        ONLINE  ONLINE       lunardb1                                       
ora.cssd
      1        ONLINE  ONLINE       lunardb1                                       
ora.cssdmonitor
      1        ONLINE  ONLINE       lunardb1                                       
ora.ctssd
      1        ONLINE  ONLINE       lunardb1                   OBSERVER            
ora.diskmon
      1        OFFLINE OFFLINE                                                   
ora.drivers.acfs
      1        ONLINE  ONLINE       lunardb1                                       
ora.evmd
      1        ONLINE  ONLINE       lunardb1                                       
ora.gipcd
      1        ONLINE  ONLINE       lunardb1                                       
ora.gpnpd
      1        ONLINE  ONLINE       lunardb1                                       
ora.mdnsd
      1        ONLINE  ONLINE       lunardb1                                       
You have new mail in /var/spool/mail/root
[root@lunardb1 grid]# 

从修改过程可以看出,感觉上,root.sh比第一种手工修改的方法科学一点,但是居然oracle二进制文件的权限还是没有修改好,那么其他的是否有细节问题,不好说。
总之,Oracle建议的方法,还是加减节点,让Oracle完全的重构这个节点的所有文件,以防止日后任何的CRS异常终止或者异常宕机等行为。

此条目发表在 RAC 分类目录,贴了 , , 标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注