Hoje ao instalar o asmlib em um servidor com Oracle Linux 8.10, encontrei o erro Mounting ASMlib driver filesystem: Not applicable with kernel 5.15.0, após investigar e resolver este problema, resolvi fazer este post.
Instalar o oracleasm-support:
[root@srv02 ~]# dnf config-manager --enable ol8_addons
[root@srv02 ~]# dnf install oracleasm-support
Oracle Linux 8 BaseOS Latest (x86_64) 11 kB/s | 4.3 kB 00:00
Oracle Linux 8 Application Stream (x86_64) 27 kB/s | 4.5 kB 00:00
Oracle Linux 8 Addons (x86_64) 7.6 MB/s | 23 MB 00:03
Last metadata expiration check: 0:00:01 ago on Fri 15 Nov 2024 09:27:19 AM -03.
Dependencies resolved.
===================================================================================================================================
Package Architecture Version Repository Size
===================================================================================================================================
Installing:
oracleasm-support x86_64 3.0.0-6.el8 ol8_addons 108 k
Transaction Summary
===================================================================================================================================
Install 1 Package
Total download size: 108 k
Installed size: 319 k
Is this ok [y/N]: y
Downloading Packages:
oracleasm-support-3.0.0-6.el8.x86_64.rpm 280 kB/s | 108 kB 00:00
-----------------------------------------------------------------------------------------------------------------------------------
Total 278 kB/s | 108 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracleasm-support-3.0.0-6.el8.x86_64 1/1
Running scriptlet: oracleasm-support-3.0.0-6.el8.x86_64 1/1
Note: Forwarding request to 'systemctl enable oracleasm.service'.
Synchronizing state of oracleasm.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable oracleasm
Created symlink /etc/systemd/system/multi-user.target.wants/oracleasm.service → /usr/lib/systemd/system/oracleasm.service.
Verifying : oracleasm-support-3.0.0-6.el8.x86_64 1/1
Installed:
oracleasm-support-3.0.0-6.el8.x86_64
Complete!
Instalar o oracleasmlib:
[root@srv02 ~]# rpm -Uvh oracleasmlib-3.0.0-13.el8.x86_64.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:oracleasmlib-3.0.0-13.el8 ################################# [100%]
Ao verificar a instalação e os módulos do asm que não forram carreragados, verifiquei o erro de incompatibilidade com a versão do kernel mais recente Not applicable with kernel 5.15.0.
[root@srv02 ~]# rpm -qa | grep oracleasm
oracleasmlib-3.0.0-13.el8.x86_64
oracleasm-support-3.0.0-6.el8.x86_64
# Rrror loading asmlib module.
[root@srv02 ~]# oracleasm init
Mounting ASMlib driver filesystem: Not applicable with kernel 5.15.0
#Check if the asm module has been loaded into the kernel:
[root@srv02 ~]# lsmod | grep oracleasm
Verifiquei no MOS que o último kernel compatível com asmlib é o UEKR6 (5.4.17), abaixo nota do MOS informando que ocorreu uma mudança no driver do ASM:
Oracle Linux: Loading oracleasm Kernel Module Under UEKR7 (5.15.0) Fails (Doc ID 2912147.1)
From UEKR7, the io_uring Asynchronous I/O Framework includes support for Oracle ASMLib v3 (pending) and oracleasm-support. For UEKR7,
Oracle ASMLib uses the io_uring in place of the traditional oracleasm driver interface, which has been removed from UEKR7.
Users wishing to continue using the traditional oracleasm kernel module, should do so by continuing to use UEKR6 (5.4.17) or
an earlier UEK release that continues to provide the kernel module.
Aqui confirmo que a versão do kernel 5.15.0-301.163.5.2.el8uek.x86_64 do servidor não é compartível com asmlib:
# Oracle Linux Version
[root@srv02 ~]# cat /etc/*-release | grep PRETTY
PRETTY_NAME="Oracle Linux Server 8.10"
#Default kernel version used
[root@srv02 ~]# uname -a
Linux srv02 5.15.0-301.163.5.2.el8uek.x86_64 #2 SMP Wed Oct 16 18:57:13 PDT 2024 x86_64 x86_64 x86_64 GNU/Linux
[root@srv02 ~]# dnf list installed kernel-uek
Installed Packages
kernel-uek.x86_64 5.15.0-200.131.27.el8uek @anaconda
kernel-uek.x86_64 5.15.0-301.163.5.2.el8uek @ol8_UEKR7
[root@srv02 ~]# ls -lat /boot/vmlinuz*
-rwxr-xr-x. 1 root root 13579568 Oct 25 13:39 /boot/vmlinuz-0-rescue-281bcc58a1774cdda00f7714cf6fcc6a
-rwxr-xr-x. 1 root root 13654248 Oct 16 23:02 /boot/vmlinuz-5.15.0-301.163.5.2.el8uek.x86_64
-rwxr-xr-x. 1 root root 10889392 Sep 24 17:05 /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
-rwxr-xr-x. 1 root root 10921472 Nov 15 2023 /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64
-rwxr-xr-x. 1 root root 13579568 Oct 5 2023 /boot/vmlinuz-5.15.0-200.131.27.el8uek.x86_64
Diante dessa limitação, verifiquei que esta versão do kernel indicada no MOS para o asmlib era suportado no Oracle Linux 8:
Com todas essas informações temos três opções: Usar o asmlib com o kernel suportado, Oracle ASMFD ou UDEV. O cliente estava acostumado a utilizar o asmlib, então irei utilizar esta opção:
Instalando o kernel compatível com asmlib:
#Disable ol8 KR7 repository
[root@srv02 ~]# dnf config-manager --disable ol8_UEKR7
#Enable ol8 UEK R6 repository
[root@srv02 ~]# dnf config-manager --enable ol8_UEKR6
#Search for compatible kernel in the ol8_UEKR6 repository
[root@srv02 ~]# dnf list available kernel-uek
Latest Unbreakable Enterprise Kernel Release 6 for Oracle Linux 8 (x86_64) 8.3 MB/s | 104 MB 00:12
Last metadata expiration check: 0:00:31 ago on Fri 15 Nov 2024 09:54:29 AM -03.
Available Packages
kernel-uek.src 5.4.17-2136.337.5.el8uek ol8_UEKR6
#Install compatible kernel
[root@srv02 ~]# dnf install kernel-uek-5.4.17-2136.337.5.el8uek
Last metadata expiration check: 0:01:32 ago on Fri 15 Nov 2024 09:54:29 AM -03.
Dependencies resolved.
======================================================================================================
Package Architecture Version Repository Size
======================================================================================================
Installing group/module packages:
kernel-uek x86_64 5.4.17-2136.337.5.el8uek ol8_UEKR6 119 M
Transaction Summary
======================================================================================================
Install 1 Package
Total download size: 119 M
Installed size: 141 M
Is this ok [y/N]: y
Downloading Packages:
kernel-uek-5.4.17-2136.337.5.el8uek.x86_64.rpm 9.1 MB/s | 119 MB 00:12
-----------------------------------------------------------------------------------------------------
Total 9.1 MB/s | 119 MB 00:12
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: kernel-uek-5.4.17-2136.337.5.el8uek.x86_64 1/1
Installing : kernel-uek-5.4.17-2136.337.5.el8uek.x86_64 1/1
Running scriptlet: kernel-uek-5.4.17-2136.337.5.el8uek.x86_64 1/1
Verifying : kernel-uek-5.4.17-2136.337.5.el8uek.x86_64 1/1
Installed:
kernel-uek-5.4.17-2136.337.5.el8uek.x86_64
Complete!
Verificar todas as versões de kernel instaladas:
[root@srv02 ~]# ls -lat /boot/vmlinuz*
-rwxr-xr-x. 1 root root 11264552 Nov 5 01:03 /boot/vmlinuz-5.4.17-2136.337.5.el8uek.x86_64 <=============================================
-rwxr-xr-x. 1 root root 13579568 Oct 25 13:39 /boot/vmlinuz-0-rescue-281bcc58a1774cdda00f7714cf6fcc6a
-rwxr-xr-x. 1 root root 13654248 Oct 16 23:02 /boot/vmlinuz-5.15.0-301.163.5.2.el8uek.x86_64
-rwxr-xr-x. 1 root root 10889392 Sep 24 17:05 /boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64
-rwxr-xr-x. 1 root root 10921472 Nov 15 2023 /boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64
-rwxr-xr-x. 1 root root 13579568 Oct 5 2023 /boot/vmlinuz-5.15.0-200.131.27.el8uek.x86_64
[root@srv02 ~]# grubby --info=ALL
index=0
kernel="/boot/vmlinuz-5.15.0-301.163.5.2.el8uek.x86_64"
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet $tuned_params"
root="/dev/mapper/ol-root"
initrd="/boot/initramfs-5.15.0-301.163.5.2.el8uek.x86_64.img $tuned_initrd"
title="Oracle Linux Server 8 (5.15.0-301.163.5.2.el8uek.x86_64) "
id="281bcc58a1774cdda00f7714cf6fcc6a-5.15.0-301.163.5.2.el8uek.x86_64"
index=1
kernel="/boot/vmlinuz-5.15.0-200.131.27.el8uek.x86_64"
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet $tuned_params"
root="/dev/mapper/ol-root"
initrd="/boot/initramfs-5.15.0-200.131.27.el8uek.x86_64.img $tuned_initrd"
title="Oracle Linux Server 8 (5.15.0-200.131.27.el8uek.x86_64) "
id="281bcc58a1774cdda00f7714cf6fcc6a-5.15.0-200.131.27.el8uek.x86_64"
index=2
kernel="/boot/vmlinuz-5.4.17-2136.337.5.el8uek.x86_64" <=============================================
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet $tuned_params"
root="/dev/mapper/ol-root"
initrd="/boot/initramfs-5.4.17-2136.337.5.el8uek.x86_64.img $tuned_initrd"
title="Oracle Linux Server 8 (5.4.17-2136.337.5.el8uek.x86_64) "
id="281bcc58a1774cdda00f7714cf6fcc6a-5.4.17-2136.337.5.el8uek.x86_64"
index=3
kernel="/boot/vmlinuz-4.18.0-553.22.1.el8_10.x86_64"
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet $tuned_params"
root="/dev/mapper/ol-root"
initrd="/boot/initramfs-4.18.0-553.22.1.el8_10.x86_64.img $tuned_initrd"
title="Oracle Linux Server (4.18.0-553.22.1.el8_10.x86_64) 8.10"
id="281bcc58a1774cdda00f7714cf6fcc6a-4.18.0-553.22.1.el8_10.x86_64"
index=4
kernel="/boot/vmlinuz-4.18.0-513.5.1.el8_9.x86_64"
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet $tuned_params"
root="/dev/mapper/ol-root"
initrd="/boot/initramfs-4.18.0-513.5.1.el8_9.x86_64.img $tuned_initrd"
title="Oracle Linux Server (4.18.0-513.5.1.el8_9.x86_64) 8.9"
id="281bcc58a1774cdda00f7714cf6fcc6a-4.18.0-513.5.1.el8_9.x86_64"
index=5
kernel="/boot/vmlinuz-0-rescue-281bcc58a1774cdda00f7714cf6fcc6a"
args="ro crashkernel=auto resume=/dev/mapper/ol-swap rd.lvm.lv=ol/root rd.lvm.lv=ol/swap rhgb quiet $tuned_params"
root="/dev/mapper/ol-root"
initrd="/boot/initramfs-0-rescue-281bcc58a1774cdda00f7714cf6fcc6a.img $tuned_initrd"
title="Oracle Linux Server 8 (0-rescue-281bcc58a1774cdda00f7714cf6fcc6a) "
id="281bcc58a1774cdda00f7714cf6fcc6a-0-rescue"
Configurar o kernel 5.4.17-2136.337.5.el8uek como default:
[root@srv02 ~]# grubby --set-default /boot/vmlinuz-5.4.17-2136.337.5.el8uek.x86_64
The default is /boot/loader/entries/281bcc58a1774cdda00f7714cf6fcc6a-5.4.17-2136.337.5.el8uek.x86_64.conf with index 2 and kernel /boot/vmlinuz-5.4.17-2136.337.5.el8uek.x86_64
[root@srv02 ~]# init 6
Restart do servidor e verificação do kernel default na inicialização:
[root@srv02 ~]# uname -a
Linux srv02 5.4.17-2136.337.5.el8uek.x86_64 #3 SMP Mon Nov 4 20:00:53 PST 2024 x86_64 x86_64 x86_64 GNU/Linux
Reinstalar o oracleasm-support e oracleasmlib:
[root@srv02 ~]# dnf remove oracleasmlib-3.0.0-13.el8.x86_64 oracleasm-support-3.0.0-6.el8.x86_64 -y
[root@srv02 ~]# dnf install oracleasm-support
Last metadata expiration check: 0:11:11 ago on Fri 15 Nov 2024 09:54:29 AM -03.
Dependencies resolved.
==============================================================================
Package Architecture Version Repository Size
==============================================================================
Installing:
oracleasm-support x86_64 3.0.0-6.el8 ol8_addons 108 k
Transaction Summary
==============================================================================
Install 1 Package
Total download size: 108 k
Installed size: 319 k
Is this ok [y/N]: y
Downloading Packages:
oracleasm-support-3.0.0-6.el8.x86_64.rpm 190 kB/s | 108 kB 00:00
----------------------------------------------------------------------------
Total 188 kB/s | 108 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : oracleasm-support-3.0.0-6.el8.x86_64 1/1
Running scriptlet: oracleasm-support-3.0.0-6.el8.x86_64 1/1
Note: Forwarding request to 'systemctl enable oracleasm.service'.
Synchronizing state of oracleasm.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable oracleasm
Verifying : oracleasm-support-3.0.0-6.el8.x86_64 1/1
Installed:
oracleasm-support-3.0.0-6.el8.x86_64
Complete!
[root@srv02 ~]# rpm -Uvh oracleasmlib-3.0.0-13.el8.x86_64.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:oracleasmlib-3.0.0-13.el8 ################################# [100%]
Habilitar o módulo do kernel e realizar validações:
#Check installed packages:
[root@srv02 ~]# rpm -qa | grep oracleasm
oracleasmlib-3.0.0-13.el8.x86_64
oracleasm-support-3.0.0-6.el8.x86_64
#Check oracleasm service is enabled
[root@srv02 ~]# systemctl is-enabled oracleasm.service
enabled
#Load module kernel asm
[root@srv02 ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
#Check if the asm kernel module is loaded
[root@srv02 ~]# lsmod | grep oracleasm
oracleasm 65536 1
Ajustar o kernel.io_uring_disabled para 0 se você utilizar Oracle Linux, e 1 para Red Hat no sysctl.conf:
[root@srv02 ~]# cat /etc/sysctl.conf| grep kernel.io_uring_disabled
kernel.io_uring_disabled = 0
[root@srv02 ~]# sysctl -p
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
kernel.io_uring_disabled = 0
Configurar o ASM:
[root@srv02 ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.
Default user to own the driver interface []: grid
Default group to own the driver interface []: asmadmin
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Maximum number of disks that may be used in ASM system [2048]:
Enable iofilter if kernel supports it (y/n) [y]: y
Writing Oracle ASM library driver configuration: done
[root@srv02 ~]# systemctl enable oracleasm
Synchronizing state of oracleasm.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable oracleasm
[root@srv02 ~]# systemctl start oracleasm
[root@srv02 ~]# systemctl status oracleasm
● oracleasm.service - Load oracleasm Modules
Loaded: loaded (/usr/lib/systemd/system/oracleasm.service; enabled; vendor preset: disabled)
Active: active (exited) since Fri 2024-11-15 10:12:08 -03; 5s ago
Process: 6517 ExecStart=/usr/sbin/oracleasm.init start_sysctl (code=exited, status=0/SUCCESS)
Process: 6515 ExecStartPre=/usr/bin/udevadm settle -t 120 (code=exited, status=0/SUCCESS)
Main PID: 6517 (code=exited, status=0/SUCCESS)
Nov 15 10:12:08 srv02 systemd[1]: Starting Load oracleasm Modules...
Nov 15 10:12:08 srv02 oracleasm.init[6517]: Initializing the Oracle ASMLib driver: OK
Nov 15 10:12:08 srv02 oracleasm.init[6517]: Scanning the system for Oracle ASMLib disks: OK
Nov 15 10:12:08 srv02 systemd[1]: Started Load oracleasm Modules.
Com esse post espero ajudar as pessoas que tiverem este mesmo problema ao utilizar Oracle Linux 8 com asmlib.
Links de referência:
Oracle Linux: Loading oracleasm Kernel Module Under UEKR7 (5.15.0) Fails (Doc ID 2912147.1)
https://blogs.oracle.com/scoter/post/oracle-linux-and-unbreakable-enterprise-kernel-uek-releases
https://www.oracle.com/linux/downloads/linux-asmlib-v8-downloads.html
https://docs.oracle.com/en/operating-systems/oracle-linux/asmlib/