2

I installed Ubuntu 20.10 on a new machine with the ZFS option, i. e. both /boot and the root file system are on ZFS. However, I need the newer kernel version 5.9 for hardware support, which I installed using the mainline kernel PPA. Unfortunately, the version of ZFS included in Ubuntu 20.10 (v0.8.4) doesn’t work with Linux v5.9 kernels (building the kernel module fails).

This leads to quite the predicament: How can I use both the required newer kernel version and ZFS (of course, including full functionality, such as ZSys)?

So, now I’m stuck. What is the most robust way of running a mainline kernel which also requires upgrading ZFS? I did consider building a custom 5.9 kernel with built-in ZFS support, but wouldn’t the ZFS version in my kernel then conflict with the installed Ubuntu packages, which use an older version of ZFS?

2

I noticed that, while the version of the ZFS packages in the Ubuntu development version (hirsute) is currently 0.8.4-1ubuntu13, the changelog shows the following:

Changelog

zfs-linux (0.8.4-1ubuntu13) hirsute; urgency=medium

  * Add Linux 5.9 compat fixes (LP: #1899826)
    - 4800-Linux-5.9-compat-add-linux-blkdev.h-include.patch
      include blkdev.h in various sources
    - 4801-Linux-5.9-compat-NR_SLAB_RECLAIMABLE.patch
      deprecate some older page free stats for arc free page calculation
    - 4802-Linux-5.9-compat-make_request_fn-replaced-with-submi.patch
      API change for block allocation
    - 4805-Increase-Supported-Linux-Kernel-to-5.9.patch
      allows driver to be built against 5.9
  * Add Linux 5.10 compat fixes
    - 4710-Use-percpu_counter-for-obj_alloc-counter-of-Linux-ba.patch
      prerequisite for 4804-Linux-5.10-compat-frame.h-renamed-objtool.h.patch
    - 4720-Linux-5.7-compat-Include-linux-sched.h-in-spl-sys-mu.patch
      prerequisite for next set of patches
    - 4804-Linux-5.10-compat-frame.h-renamed-objtool.h.patch
      rename check of linux/frame.h to linux/frame.h
    - 4805-Linux-5.10-compat-percpu_ref-added-data-member.patch
      API check to the percpu_ref structure
    - 4806-Linux-5.10-compat-check_disk_change-removed.patch
      check_disk_change removed, functionality moved to zfs_check_media_change
    - 4807-Linux-5.10-compat-revalidate_disk_size-added.patch
      use revalidate_disk_size where necessary

 -- Colin Ian King <colin.king@canonical.com>  Tue, 3 Nov 2020 12:22:22 +0000

which indicates that the required changes for compatibility with newer Linux kernels have been backported to these packages. So I installed the zfs-dkms package from the hirsute repositories, which gave me a working DKMS ZFS module with my mainline kernel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.