Notes on ZFS with Fedora

- 1 min

So, just upgraded from Fedora 26 to 27 on one of our servers. Fedora has done this very easy now a days by adding a plugin to the default package manager called dnf-plugin-system-upgrade. In this case I had a ZFS pool mounted on the server. Something one might expect to still be there after a system upgrade.

   
$ zfs list
The ZFS modules are not loaded.
Try running '/sbin/modprobe zfs' as root to load them.
   
$ sudo /sbin/modprobe zfs
modprobe: FATAL: Module zfs not found in directory /lib/modules/4.14.13-300.fc27.x86_64

Doh. Both surprising and not. ZFS always needs to be matched with the kernel version running, so with a new kernel, an update of ZFS is always necessary. This goes for all kernel modules. BUT this should be taken care of automatically by dkms. However, taking a look at the currently active modules on the server I found that there is not a single one running.
Dark times.

   
$ dkms status
nothing

Whether or not this is the product of the “new” dnf plugin or not I don’t really have the energy to find out. So, I started with removing the lingering ZFS package for Fedora 26 and then downloaded and installed the latest and greatest.

   
$ dnf remove zfs-release-1-5.fc26.noarch
$ dnf install http://download.zfsonlinux.org/fedora/zfs-release$(rpm -E %dist).noarch.rpm
$ dnf install kernel-devel zfs

And then to the punch line – manually install the kernel modules. Yay.

   
$ dkms add -m spl -v 0.7.5
$ dkms install -m spl -v 0.7.5
$ dkms add -m zfs -v 0.7.5
$ dkms install -m zfs -v 0.7.5

The version specified here is the newly installed ZFS package version. Just to make it extra super clear to dkms that it’s time to stop fucking around.
Last step: REBOOT

Petter Hultin Gustafsson

Petter Hultin Gustafsson

Stockholm based data engineer/scientist

rss facebook twitter github gitlab youtube mail spotify lastfm instagram linkedin google google-plus pinterest medium vimeo stackoverflow reddit quora quora