snapapi26 commands

cat /proc/version

This command displays information about the currently running Linux kernel β€” including the version, who compiled it, and when.

dkms status | grep snapapi

This checks if a kernel module called snapapi is registered and built using DKMS (Dynamic Kernel Module Support).

dnf search kernel-devel

This command searches the DNF package database for packages whose names or descriptions match kernel-devel.

Why use it?

To see which version of kernel-devel is installed and whether the version matches your running kernel (uname -r).

dnf list kernel-uek-devel-<kernel version>

Lists that specific version of the UEK (Unbreakable Enterprise Kernel) development package.

Why use it?

To:

  • Check if headers for your exact UEK kernel version are available (important for Acronis/dkms).

  • Match the module you’re building with the running UEK kernel (uname -r).

dnf install kernel-uek-devel-<kernel version>

This installs the kernel development files (headers + Makefiles) for a specific version of the Unbreakable Enterprise Kernel (UEK).

🧠 Use case:

You must install headers that exactly match your running kernel (from uname -r) so DKMS or manual compiles work correctly.

dnf install gcc-toolset-11

Installs the GCC 11 compiler toolset, which includes:

  • gcc (the actual compiler)

  • g++

  • make, binutils, and other tools

🧠 Use case:

Kernel modules must be compiled with the same compiler version (or close to it) as the kernel itself β€” this toolset ensures that.

Some systems use older GCC versions by default. This lets you use GCC 11 without affecting system-wide defaults.

Great set of commands β€” you’re diving deep into DKMS and how it’s used to manage kernel modules like snapapi, which is important for tools like Acronis. Let’s explain each of these one-by-one in a clear, beginner-friendly way.


dkms status | grep snapapi

βœ… What it does:

Checks whether the snapapi26 kernel module is registered and built for any kernels.

πŸ“₯ Output example:

snapapi26, 0.8.5.2, 5.15.0-209.161.7.el8uek.x86_64, x86_64: installed

Means: snapapi26 version 0.8.5.2 was successfully compiled and installed for that specific kernel.


πŸ”§ 2. dkms build -m snapapi26 -v <version> --config /boot/config-<version> --arch x86_64 --kernelsourcedir /usr/src/kernels/<version>

βœ… What it does:

Builds (compiles) the snapapi kernel module for the specified kernel version.

πŸ” Command breakdown:

  • -m snapapi26: the module name.
  • -v <version>: the module version (e.g., 0.8.5.2).
  • --config /boot/config-<version>: tells DKMS where the kernel config file is.
  • --arch x86_64: target architecture.
  • --kernelsourcedir: where the kernel headers/source are located (needed to compile).

πŸ’‘ Example:

dkms build -m snapapi26 -v 0.8.5.2 --config /boot/config-5.15.0-209.161.7.el8uek.x86_64 \
--arch x86_64 --kernelsourcedir /usr/src/kernels/5.15.0-209.161.7.el8uek.x86_64

πŸ” 3. dkms status | grep snapapi (again)

Same as before β€” you’re just verifying if the module was built successfully after the manual dkms build.


πŸ“¦ 4. dkms mktarball -m snapapi26 -v 0.8.5.2 --archive snapapi-0.8.5.2.tar.gz .

βœ… What it does:

Creates a tarball archive (compressed file) of the DKMS module, which you can:

  • Move to another server
  • Back up
  • Share internally

πŸ” Why this is useful:

If you’re deploying Acronis to multiple servers, you can build the module once, and then just install the .tar.gz on the others without recompiling.

πŸ’‘ The . at the end:

Means the tarball will be created in the current directory.


Β Workflow Summary

Step Command What It Does
1 `dkms status grep snapapi`
2 dkms build ... Manually compile the snapapi module
3 dkms status again Confirm it built correctly
4 dkms mktarball Package it for use elsewhere

πŸ”₯ You’re now walking through a full deployment of a DKMS module (like Acronis snapapi26) from one system to another β€” love it! Let’s break this down step-by-step with clear explanations, especially useful for DR teams or automation setups.


🧱 Step-by-Step Breakdown


πŸ“€ 1. Transfer the DKMS tarball to another machine

scp snapapi-0.8.5.2.tar.gz admin1@remote-host:/home/admin1

βœ… scp securely copies the tarball to the other system.
You could also use rsync, sftp, or even shared drives.


πŸ“₯ 2. Move or copy the archive locally (if needed)

cp snapapi-0.8.5.2.tar.gz /home/admin1
cd /home/admin1

This ensures you’re in the correct working directory.


πŸ‘€ 3. Set ownership to the correct user

chown admin1:admin1 snapapi-0.8.5.2.tar.gz

πŸ§‘β€πŸ’» Important for permissions, especially if you’re about to run commands as a non-root user.


🧹 4. Remove previous versions of the module

dkms remove -m snapapi26 -v 0.8.5.2
dkms remove -m snapapi26 -v 0.8.5.2 --all

πŸ”§ Why both?

  • The first one removes just the version from the currently running kernel.
  • The --all ensures you clean up that version from all kernels, in case it was compiled for multiple.

πŸ“¦ 5. Install the new module from the tarball

dkms install -m snapapi26 -v 0.8.5.2

Make sure you extract the tarball first if you haven’t already:

tar -xvzf snapapi-0.8.5.2.tar.gz -C /usr/src/

🧠 DKMS expects the folder structure like:

/usr/src/snapapi26-0.8.5.2/

Then dkms install will pick it up and compile it against the current kernel.


πŸ” 6. Restart Acronis services

systemctl restart acronis_mms.service

βœ… This loads the newly installed snapapi module so Acronis can function properly.

You might also restart:

systemctl restart acronis_mgmtsvc.service

if needed.


βœ… Summary Flow

Step Command Purpose
1 scp Transfer tarball to another server
2 cp, cd Prepare working directory
3 chown Set proper ownership
4 dkms remove Clean old builds
5 dkms install Compile + install new module
6 systemctl restart Reload Acronis with new module

 

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top