一、参考资料:
(1)ACFS Support On OS Platforms (Certification Matrix). (Doc ID 1369107.1)
(2)ACFS and AFD report "Not Supported" after installing appropriate Oracle Grid Infrastructure Patches on RedHat (Doc ID 2303388.1)
Known Good Kmod Packages are:
kmod-20-15-el7_4.6.x86_64.rpm
kmod-20-9.el7.x86_64
kmod-devel-20-15.0.el7.x86_64.rpm
kmod-20-21.el7.x86_64 and later versions
(3)Configuring Oracle ASM Filter Driver
https://docs.oracle.com/en/database/oracle/oracle-database/19/ostmg/administer-filter-driver.html#GUID-6F16B5EC-BE7D-44FA-A05B-A62CF33763D3
二、配置步骤:
使用 root 用户执行
1、检查 kmod 版本是否为:kmod-20-21.el7.x86_64 and later versions
rpm -qa|grep kmod
2、检查 OS 版本是否在 ASMFD 支持列表中
rpm -qf /etc/redhat-release
export ORACLE_HOME=/oracle/app/19.3.0/grid
export ORACLE_BASE=/tmp
export PATH=$ORACLE_HOME/bin:$PATH
acfsdriverstate -orahome $ORACLE_HOME supported
3、查看当前共享盘:
fdisk -l|grep Disk
4、设置 ASMFD 标签( 用于固定磁盘 )
asmcmd afd_label ocrlbl /dev/sdb --init
asmcmd afd_lslbl /dev/sdb
示例:
root@racdb1:/oracle/software>asmcmd afd_label ocrlbl /dev/sdb --init
root@racdb1:/oracle/software>asmcmd afd_lslbl /dev/sdb
--------------------------------------------------------------------------------
Label Duplicate Path
================================================================================
OCRLBL /dev/sdb
root@racdb1:/oracle/software>
unset ORACLE_BASE
5、修改磁盘属主( 允许 grid 用户进行磁盘操作 )
chown grid:asmadmin /dev/sdb
6、安装 Grid
在安装过程中显示的有关 ASMFD 内容
CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 932c9985a2fc4fb6bf27814852985235 (AFD:OCRLBL) [OCRDG]
Located 1 voting disk(s).
二节点执行 root.sh 时报错( 无 ASMFD 配置时没有该报错 ):
CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
Error 4 opening dom ASM/Self in 0x6134c50
Domain name to open is ASM/Self
Error 4 opening dom ASM/Self in 0x6134c50
root@racdb2:/root>
参照 Oracle MOS:
19C: While Executing Root.sh on Remote Nodes HIT UNEXPECTED "ERROR 4 OPENING DOM ASM/SELF IN 0x57f7d60" (Doc ID 2571719.1)
This message itself occurs when executing root.sh on nodes other than Node 1 . There is no impact on installation and operation.
This bug is fixed in the Oracle 20c release.
即该问题对安装无影响,可忽略。
7、安装 Grid 后检查 ASMFD 安装情况:
查看 ASMFD 核心模块 oracleafd 是否存在
lsmod |grep oracle
查看AFD磁盘标签
asmcmd afd_lsdsk
查看 ASMFD 搜索磁盘路径
asmcmd afd_dsget
查看当前 Disk String
asmcmd dsget
验证 ASMFD 状态
asmcmd afd_state
示例:
grid@racdb2:/home/grid>lsmod |grep oracle
oracleacfs 5155332 0
oracleadvm 1257514 0
oracleoks 756550 2 oracleacfs,oracleadvm
oracleafd 214075 1
grid@racdb2:/home/grid>asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
OCRLBL ENABLED /dev/sdb
grid@racdb2:/home/grid>asmcmd afd_dsget
AFD discovery string: /dev/sd*
grid@racdb2:/home/grid>asmcmd dsget
parameter:/dev/sd*, AFD:*
profile:/dev/sd*,AFD:*
grid@racdb2:/home/grid>asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'racdb2'
-- END --