在7.4以上的redhat或者centos,配置afd不能配置成功,AFD is not ‘supported’,经过查询MOS资料,发现在7.4以上的redhat内核需要升级”kmod”
1、加载afd
[root@rac1 ~]# asmcmd afd_configure
ASMCMD-9520: AFD is not 'supported' -----仅输出不支持的信息,无法得知具体内容
2、查看afd的支持的内核版本
[root@rac1 ~]# afdroot install
AFD-620: AFD is not supported on this operating system version: '3.10.0-693.el7.x86_64'
[root@rac1 ~]# acfsdriverstate -orahome $ORACLE_HOME supported
ACFS-9459: ADVM/ACFS is not supported on this OS version: '3.10.0-693.el7.x86_64'
ACFS-9201: Not Supported
[root@rac1 ~]# uname -a
Linux rac1 3.10.0-693.el7.x86_64 #1 SMP Thu Jul 6 19:56:57 EDT 2017 x86_64 x86_64 x86_64 GNU/Linux
----查看当前系统内核版本确实不被支持
[root@rac1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
3、查看kmod版本
[root@rac2 ~]# rpm -qa|grep kmod
kmod-libs-20-15.el7.x86_64
kmod-20-15.el7.x86_64 ----20-15版本
4、升级kmod
[root@rac1 yum.repos.d]# yum install kmod
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Local | 3.6 kB 00:00:00
(1/2): Local/group_gz | 166 kB 00:00:00
(2/2): Local/primary_db | 3.1 MB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package kmod.x86_64 0:20-15.el7 will be updated
---> Package kmod.x86_64 0:20-21.el7 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=======================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================
Updating:
kmod x86_64 20-21.el7 Local 121 k
Transaction Summary
=======================================================================================================================
Upgrade 1 Package
Total download size: 121 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Updating : kmod-20-21.el7.x86_64 1/2
Cleanup : kmod-20-15.el7.x86_64 2/2
Verifying : kmod-20-21.el7.x86_64 1/2
Verifying : kmod-20-15.el7.x86_64 2/2
Updated:
kmod.x86_64 0:20-21.el7
Complete!
5、再次查看lmod
[grid@rac1:/home/grid]$rpm -qa|grep kmod
kmod-libs-20-15.el7.x86_64
kmod-20-21.el7.x86_64 --->已升级到20-21版本
6、查看afd驱动信息
[root@rac1 yum.repos.d]# acfsdriverstate -orahome $ORACLE_HOME supported
ACFS-9200: Supported 升级kmod之后afd驱动已支持
7、重新安装afd
加载以及配置AFD
[root@rac1 yum.repos.d]# asmcmd afd_configure
加载afd过程:
AFD-627: AFD distribution files found.
AFD-634: Removing previous AFD installation.
AFD-635: Previous AFD components successfully removed.
AFD-636: Installing requested AFD software.
AFD-637: Loading installed AFD drivers.
AFD-9321: Creating udev for AFD.
AFD-9323: Creating module dependencies - this may take some time.
AFD-9154: Loading 'oracleafd.ko' driver.
AFD-649: Verifying AFD devices.
AFD-9156: Detecting control device '/dev/oracleafd/admin'.
AFD-638: AFD installation correctness verified.
Modifying resource dependencies - this may take some time.
查询afd状态信息
[root@rac1 yum.repos.d]# asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'rac1'
无任何报错,配置成功
ACFS and AFD report “Not Supported” after installing appropriate Oracle Grid Infrastructure Patches on RedHat (文档 ID 2303388.1)
https://www.linux.org/docs/man8/kmod.html
上述为linux对kmod的一段简单描述,简单意思是KMOD是管理linux内核的一个模块,对于用户来说不会直接使用kmod,而是其他一些系统命令会调用。
进入sbin目录发现kmod被做了软连接,很多系统命令会被重定向
[grid@rac1:/sbin]$pwd
/sbin
[grid@rac1:/sbin]$ls -alt | grep kmod
lrwxrwxrwx 1 root root 11 Feb 15 17:11 insmod -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Feb 15 17:11 lsmod -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Feb 15 17:11 modinfo -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Feb 15 17:11 modprobe -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Feb 15 17:11 rmmod -> ../bin/kmod
lrwxrwxrwx 1 root root 11 Feb 15 17:11 depmod -> ../bin/kmod