在 http://www.rampant-books.com/t_hunter_using_oracle_acfs_on_linux_part1.htm 看到有此解决办法,
使用后,此问题是解决了。
自己思考,如果没有使用ACFS,可能此问题也没多大影响。(在 ASMCA 中,可以看到可在ASM 基础上建立ACFS条带,但我没建立)
并且在后面看到安装日志,acfs也是通过的,这个不知为什么。
[root@rac1 ~]# /opt/app/grid/bin/acfsload start -s ADVM/ACFS is not supported on centos-release-5-5.el5.centos
[root@racnode1 ~]# cd /opt/app/grid/lib
[root@racnode1 lib]# cp -p osds_acfslib.pm osds_acfslib.pm.orig
[root@racnode2 ~]# cd /opt/app/grid/lib
[root@racnode2 lib]# cp -p osds_acfslib.pm osds_acfslib.pm.orig
Next, edit the osds_acfslib.pm Perl module. Search for the string 'support this release' (which was line 278 in my case).
Replace
if (($release =~ /enterprise-release-5/) ||
($release =~ /redhat-release-5/))
with
if (($release =~ /enterprise-release-5/) ||
($release =~ /redhat-release-5/) ||
($release =~ /centos-release-5/))
This will get you past the supported version check; however, if you attempt to load the Oracle ASM volume driver from either Oracle RAC node, you get the following error:
[root@racnode1 ~]# /opt/app/grid/bin/acfsload start -s
acfsload: ACFS-9129: ADVM/ACFS not installed
To install ADVM/ACFS, copy the following kernel modules from the Oracle grid infrastructure home to the expected location:
[root@racnode1 ~]# mkdir /lib/modules/2.6.18-194.el5/extra/usm [root@racnode1 ~]# cd /opt/app/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode1 bin]# cp *ko /lib/modules/2.6.18-194.el5/extra/usm/ [root@racnode2 ~]# mkdir /lib/modules/2.6.18-194.el5/extra/usm [root@racnode2 ~]# cd /opt/app/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode2 bin]# cp *ko /lib/modules/2.6.18-194.el5/extra/usm/
Once the kernel modules have been copied, we can verify the ADVM/ACFS installation by running the following from all Oracle RAC nodes:
[root@racnode1 ~]# cd /opt/app/grid/bin [root@racnode1 bin]# ./acfsdriverstate -orahome /opt/app/grid version ACFS-9205: OS/ADVM,ACFS installed version = 2.6.18-8.el5(x86_64)/090715.1 [root@racnode2 ~]# cd /opt/app/grid/bin [root@racnode2 bin]# ./acfsdriverstate -orahome /opt/app/grid version ACFS-9205: OS/ADVM,ACFS installed version = 2.6.18-8.el5(x86_64)/090715.1
The next step is to record dependencies for the new kernel modules:
[root@racnode1 ~]# depmod [root@racnode2 ~]# depmod
Now, running acfsload start -s will complete without any further messages:
[root@racnode1 ~]# /opt/app/grid/bin/acfsload start -s [root@racnode2 ~]# /opt/app/grid/bin/acfsload start -s
Check that the modules were successfully loaded on all Oracle RAC nodes:
[root@racnode1 ~]# lsmod | grep oracle
oracleacfs 877320 4
oracleadvm 221760 8
oracleoks 276880 2 oracleacfs,oracleadvm
oracleasm 84136 1
[root@racnode2 ~]# lsmod | grep oracle
oracleacfs 877320 4
oracleadvm 221760 8
oracleoks 276880 2 oracleacfs,oracleadvm
oracleasm 84136 1
Configure the Oracle ASM volume driver to load automatically on system startup on all Oracle RAC nodes. You will need to create an initialization script (/etc/init.d/acfsload) that contains the runlevel configuration and the acfsload command. Change the permissions on the /etc/init.d/acfsload script to allow it to be executed by root and then create links in the rc2.d, rc3.d, rc4.d, and rc5.d runlevel directories using 'chkconfig --add':
[root@racnode1 ~]# chkconfig --list | grep acfsload
[root@racnode2 ~]# chkconfig --list | grep acfsload
=======================================================
[root@racnode1 ~]# cat > /etc/init.d/acfsload <<EOF
#!/bin/sh
# chkconfig: 2345 30 21
# description: Load Oracle ASM volume driver on system startup
ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_HOME
\$ORACLE_HOME/bin/acfsload start -s
EOF
[root@racnode2 ~]# cat > /etc/init.d/acfsload <<EOF
#!/bin/sh
# chkconfig: 2345 30 21
# description: Load Oracle ASM volume driver on system startup
ORACLE_HOME=/u01/app/11.2.0/grid
export ORACLE_HOME
\$ORACLE_HOME/bin/acfsload start -s
EOF
=======================================================
[root@racnode1 ~]# chmod 755 /etc/init.d/acfsload
[root@racnode2 ~]# chmod 755 /etc/init.d/acfsload
=======================================================
[root@racnode1 ~]# chkconfig --add acfsload
[root@racnode2 ~]# chkconfig --add acfsload
=======================================================
[root@racnode1 ~]# chkconfig --list | grep acfsload
acfsload 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@racnode2 ~]# chkconfig --list | grep acfsload
acfsload 0:off 1:off 2:on 3:on 4:on 5:on 6:off
If the Oracle grid infrastructure 'ora.registry.acfs' resource does not exist, create it. This only needs to be performed from one of the Oracle RAC nodes:
[root@racnode1 ~]# su - grid -c crs_stat | grep acfs
[root@racnode2 ~]# su - grid -c crs_stat | grep acfs
=======================================================
[root@racnode1 ~]# /opt/app/grid/bin/crsctl add type ora.registry.acfs.type \
-basetype ora.local_resource.type \
-file /u01/app/11.2.0/grid/crs/template/registry.acfs.type
[root@racnode1 ~]# /opt/app/grid/bin/crsctl add resource ora.registry.acfs \
-attr ACL=\'owner:root:rwx,pgrp:oinstall:r-x,other::r--\' \
-type ora.registry.acfs.type -f
=======================================================
[root@racnode1 ~]# su - grid -c crs_stat | grep acfs
NAME=ora.registry.acfs
TYPE=ora.registry.acfs.type
[root@racnode2 ~]# su - grid -c crs_stat | grep acfs
NAME=ora.registry.acfs
TYPE=ora.registry.acfs.type
Next, copy the Oracle ACFS executables to /sbin and set the appropriate permissions. The Oracle ACFS executables are located in the GRID_HOME/install/usm/EL5/<ARCHITECTURE>/<KERNEL_VERSION>/<FULL_KERNEL_VERSION>/bin directory (12 files) and include any file without the *.ko extension:
[root@racnode1 ~]# cd /opt/app/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode1 bin]# cp acfs* /sbin; chmod 755 /sbin/acfs* [root@racnode1 bin]# cp advmutil* /sbin; chmod 755 /sbin/advmutil* [root@racnode1 bin]# cp fsck.acfs* /sbin; chmod 755 /sbin/fsck.acfs* [root@racnode1 bin]# cp mkfs.acfs* /sbin; chmod 755 /sbin/mkfs.acfs* [root@racnode1 bin]# cp mount.acfs* /sbin; chmod 755 /sbin/mount.acfs* [root@racnode2 ~]# cd /opt/app/grid/install/usm/EL5/x86_64/2.6.18-8/2.6.18-8.el5-x86_64/bin [root@racnode2 bin]# cp acfs* /sbin; chmod 755 /sbin/acfs* [root@racnode2 bin]# cp advmutil* /sbin; chmod 755 /sbin/advmutil* [root@racnode2 bin]# cp fsck.acfs* /sbin; chmod 755 /sbin/fsck.acfs* [root@racnode2 bin]# cp mkfs.acfs* /sbin; chmod 755 /sbin/mkfs.acfs* [root@racnode2 bin]# cp mount.acfs* /sbin; chmod 755 /sbin/mount.acfs*
As a final step, modify any of the Oracle ACFS shell scripts copied to the /sbin directory (above) to include the ORACLE_HOME for grid infrastructure. The successful execution of these scripts requires access to certain Oracle shared libraries that are found in the grid infrastructure Oracle home. Since many of the Oracle ACFS shell scripts will be executed as the root user account, the ORACLE_HOME environment variable will typically not be set in the shell and will result in the executable to fail. An easy workaround to get past this error is to set the ORACLE_HOME environment variable for the Oracle grid infrastructure home in the Oracle ACFS shell scripts on all Oracle RAC nodes. The ORACLE_HOME should be set at the beginning of the file after the header comments as shown in the following example:
#!/bin/sh
#
# Copyright (c) 2001, 2009, Oracle and/or its affiliates. All rights reserved.
#
ORACLE_HOME=/opt/app/grid
ORA_CRS_HOME=%ORA_CRS_HOME%
if [ ! -d $ORA_CRS_HOME ]; then
ORA_CRS_HOME=$ORACLE_HOME
fi
...
Add the ORACLE_HOME environment variable for the Oracle grid infrastructure home as noted above to the following Oracle ACFS shell scripts on all Oracle RAC nodes:
-
/sbin/acfsdbg
-
/sbin/acfsutil
-
/sbin/advmutil
-
/sbin/fsck.acfs
-
/sbin/mkfs.acfs
-
/sbin/mount.acfs