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
--allensures 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 |