Zfs: How to fix wrong KMOD version on Ubuntu?

Created on 26 Jan 2020  路  6Comments  路  Source: openzfs/zfs

Hey there,

I updated my Ubuntu 19.10 from ZoL 0.8.2 to ZoL 0.8.3 today.
I used the install guide provided here.
After I installed all the *.deb packages that were created by make deb I checked the version of ZFS with zfs version.

The output is:

root@ubuntu:/nfs/zfs-0.8.3# zfs version
zfs-0.8.3-1
zfs-kmod-0.8.1-1ubuntu14.2

I never did an install of the original ZFS that is provided by Ubuntu itself. I did a fresh start 2 weeks ago with ZoL 0.8.2. I assume that zfs-kmod should be 0.8.3 as well.

If I take a look at the dpkg list I can't even find this package beeing installed.

Then I tryed installing the fresh compiled *.deb package for zfs-kmod with version 0.8.3 and was hoping that this will be installed over version 0.8.1. The output looks like this:

root@ubuntu:/nfs/zfs-0.8.3# dpkg -i kmod-zfs-devel_0.8.3-1_amd64.deb
(Reading database ... 81943 files and directories currently installed.)
Preparing to unpack kmod-zfs-devel_0.8.3-1_amd64.deb ...
Unpacking kmod-zfs-devel (0.8.3-1) over (0.8.3-1) ...
Setting up kmod-zfs-devel (0.8.3-1) ...

So 0.8.3 is already installed but won't be recognized by zfs version. What am I doing wrong?

Question

All 6 comments

As I use an Ubuntu liveCD and want to use a newer version of ZFS than what is in the kernel (pretty close to what you are trying to do), I do the following:

add-apt-repository -y ppa:<your choice of repository>
apt install -y zfs-dkms
systemctl stop zfs-zed.service
modprobe -r zfs
modprobe zfs

what repo do you install for it? Ubuntu 19.10 comes with ZFS 0.8.1, but I have to install it to use it.
I did a complete install with the ZoL package provided from this github repo and with the offical guide.

I did this with 18.04 LiveCDs to use 0.8.x repos. I used ppa:jonathonf/zfs, but that is not endorsed by the ZOL project. Currently, it allows 0.8.2 installs on Bionic (18.04). This is not what you are trying to accomplish. Recently, I've just relied on Focal (20.04) daily cd images for 0.8.2.

But.... the principle is the same. Install appropriate Deb package. Make sure you have installed the DKMS support so a kernel module will be built. systemctl stop zfs-zed.service (and export any pools) to allow for a clean modprobe -r zfs. After it has been cleared, modprobe zfs will pick up the dkms created kernel module.

What source did you use? Your

I used the install guide provided here.

didn't contain a link.

Here are the steps I did to achieve my actual situation :)

apt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev linux-headers-$(uname -r) python3 python3-dev python3-setuptools python3-cffi libffi-dev
wget https://github.com/zfsonlinux/zfs/releases/download/zfs-0.8.3/zfs-0.8.3.tar.gz
tar xvfz zfs-0.8.3.tar.gz
cd zfs-0.8.3/
./autogen.sh
./configure
make -s -j$(nproc)
make deb
dpkg -i *.deb

forgot the link I was using as the guide, sry:

Link

Mhhh I guess I found what was missing. Didn't do it because that was the section for the devs :)

There are a few helper scripts provided in the top-level scripts directory designed to aid developers working with in-tree builds.
...
zfs.sh: The freshly built kernel modules can be loaded using zfs.sh. This script can latter be used to unload the kernel modules with the -u option.
sudo ./scripts/zfs.sh

here we go

root@ubuntu:/mnt/zfs-0.8.3# zfs version
zfs-0.8.3-1
zfs-kmod-0.8.3-1

Thank you :D

Was this page helpful?
0 / 5 - 0 ratings