导航

  在安装ORACLE RAC的Grid Infrastructure时,在节点1运行/u01/app/11.2.0/grid/root.sh正常,当在节点2运行/u01/app/11.2.0/grid/root.sh时发生报错:

[root@RAC02 tmp]# /u01/app/11.2.0/grid/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]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
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
Creating trace directory
User ignored Prerequisites during installation
Installing Trace File Analyzer
OLR initialization - successful
Adding Clusterware entries to upstart
CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac01, number 1, and is terminating
An active cluster was found during exclusive startup, restarting to join the cluster
Start of resource "ora.crsd" failed
CRS-2800: Cannot start resource 'ora.asm' as it is already in the INTERMEDIATE state on server 'rac02'
CRS-4000: Command Start failed, or completed with errors.
Failed to start Oracle Grid Infrastructure stack
Failed to start Cluster Ready Services at /u01/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 1353.
/u01/app/11.2.0/grid/perl/bin/perl -I/u01/app/11.2.0/grid/perl/lib -I/u01/app/11.2.0/grid/crs/install /u01/app/11.2.0/grid/crs/install/rootcrs.pl execution failed

  根据上面报错,可以看到是因为在启动ora.asm磁盘时发生了错误,因此对比两个节点的asm磁盘权限,发现以下问题:

节点1:

[root@RAC01 app]# ls -l /dev/asm*
brw-rw---- 1 oracle oinstall 8, 16 Feb  6 05:26 /dev/asm-disk1
brw-rw---- 1 oracle oinstall 8, 32 Feb  6 05:26 /dev/asm-disk2
brw-rw---- 1 oracle oinstall 8, 48 Feb  6 05:26 /dev/asm-disk3
brw-rw---- 1 oracle oinstall 8, 64 Feb  6 02:59 /dev/asm-disk4

节点2:

[root@RAC02 app]# ls -l /dev/asm*
brw-rw----. 1 oracle oinstall 8, 16 Feb  6 05:26 /dev/asm-disk1
brw-rw----. 1 oracle oinstall 8, 32 Feb  6 05:26 /dev/asm-disk2
brw-rw----. 1 oracle oinstall 8, 48 Feb  6 05:26 /dev/asm-disk3
brw-rw----. 1 oracle oinstall 8, 64 Feb  6 02:59 /dev/asm-disk4

  从上面可以看到节点2的asm磁盘权限中多了一个‘.’,这里的点是seLinux的附件权限,但是查看seLinux已经处于Premissive,配置文件中已修改为disabled,因此重启服务器,再次查看asm权限,发现‘.’消失,再次执行/u01/app/11.2.0/grid/root.sh脚本,无报错