Issue
The problem can occur when the Acronis backup runs, this is happening after the conversion to Cloudlinux.
modprobe snapapi26
modprobe: FATAL: Module snapapi26 not found in directory /lib/modules/4.18.0-425.19.2.lve.el7h.x86_64
Environment
- Acronis
- CL7 (Hybrid kernel)
Solution
1. First of all, check the DKMS version, for example:
# rpm -qa | grep dkms
dkms-3.0.3.3-99.noarch
- If the Hybrid kernel is in use, install the DKMS from CloudLinux as per article: https://kb.acronis.com/content/69434
- If DKMS is already installed, consider downgrading it:
# yum downgrade dkms --enablerepo=cl7h_beta
- Try rebuilding the SnapAPI kernel module as per the instructions provided in the link: https://cloudlinux.zendesk.com/hc/en-us/articles/360019828720-The-SnapAPI-kernel-module-is-not-loaded-for-the-kernel
2. In case the issue still persists and it shows something like this:
# dkms build -m snapapi26 -v 0.8.18 --config /boot/config-$(uname -r) --arch $(uname -p) --kernelsourcedir /usr/src/kernels/$(uname -r)
Preparing kernel 4.18.0-425.19.2.lve.el7h.x86_64 for module build:
(This is not compiling a kernel, just preparing kernel symbols)
Storing current .config to be restored when complete
Running Generic preparation routine
make mrproper...(bad exit status: 2)
using /boot/config-4.18.0-425.19.2.lve.el7h.x86_64
make oldconfig...
make prepare-all...(bad exit status: 2)
Running the pre_build script:
Generate "kernel_config.h" for kernel "4.18.0-425.19.2.lve.el7h.x86_64" and system map "/lib/modules/4.18.0-425.19.2.lve.el7h.x86_64//System.map".
Address of the function "printk" was defined
Function "blk_mq_submit_bio" not found
Function "_printk" not found
Building module:
cleaning build area...
make -j8 KERNELRELEASE=4.18.0-425.19.2.lve.el7h.x86_64 -C /usr/src/kernels/4.18.0-425.19.2.lve.el7h.x86_64 M=/var/lib/dkms/snapapi26/0.8.18/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 4.18.0-425.19.2.lve.el7h.x86_64 (x86_64)
Consult /var/lib/dkms/snapapi26/0.8.18/build/make.log for more information.
It`s necessary to install GCC8 + Devtoolset-7 and configure them.
2.1. Install cloudlinux-scl-release and devtoolset-7 packages.
# yum install cloudlinux-scl-release
# yum install devtoolset-7
2.2. Modify the framework.conf file in /etc/dkms/ to use GCC from devtoolset-7:
# nano /etc/dkms/framework.conf
## use GCC from devtoolset-7
PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH
# scl enable devtoolset-7 'bash -l'
3. Rebuild and Install the Module. Remove the existing SnapAPI26 module, load the appropriate tarball, build, and install the SnapAPI26 module:
# dkms remove snapapi26 -v 0.8.xx --all (insert correct version instead xx)
# dkms ldtarball /usr/lib/Acronis/kernel_modules/snapapi26-0.8.xx-all.tar.gz
# dkms build -m snapapi26 -v 0.8.xx --config /boot/config-$(uname -r) --arch $(uname -p) --kernelsourcedir /usr/src/kernels/$(uname -r)
4. Load the module using `modprobe` and check its status using `lsmod` and `dkms` commands:
# dkms install -m snapapi26 -v 0.8.xx
# modprobe snapapi26
# lsmod | grep snapapi26
# dkms status snapapi26 |grep installed
5. Finally, restart the acronis_mms service:
# systemctl restart acronis_mms
6. Ensure that the backup works as expected.
Useful links
- https://cloudlinux.zendesk.com/hc/en-us/articles/360019828720-The-SnapAPI-kernel-module-is-not-loaded-for-the-kernel
- https://kb.acronis.com/content/69434
Comments
0 comments
Please sign in to leave a comment.