• ZFS recommendation regarding ZFS 7.3 + 4.13 or newer kernel


    Hello,

    I wasn’t sure if this was better to go into the Kernel or Pacman forum so please feel free to move this post to the better of the two

    I have a ZFS root system, but this topic applies to any system using ZFS, whether root or not

    Certain call methods for creating DKMS with kernels 4.13.3 and newer have been updated, which are incompatible with ZFS on Linux 7.3 and SPL 7.3 packages - DKMS will not build when upgrading using Pacman or manually – you will get errors such as:

    spl.ko needs unknown symbol vfs_write
    spl.ko needs unknown symbol vfs_read
    

    when DKMS attempts to build the kernel extensions because these flags have been depreciated in the newest kernel.

    This bug is known and addressed in the newest version, ZFS + SPL 7.4, and a patch is also available. The problem is described on github here: https://github.com/zfsonlinux/spl/issues/656

    In the meantime, if you haven’t already, make sure to get the LTS kernel and headers:

    $ sudo pacman  -S linux-lts linux-lts-headers
    

    Note: Always install LTS when using ZFS on root, otherwise you might find yourself with a non-bootable system if the upgrade of the primary kernel doesn’t work properly!

    Tip: It’s prudent to add linux-lts to your IgnorePkg line and remove it only once you know you have a working mainline kernel and headers (IgnorePkg explained below) – or even more cautious to ignore it indefinitely to make sure you always have a non-moving kernel to fall back on.

    Note: Holding back your kernel and kernel headers is not the same as holding back other packges in an Arch-based system. They can be held back for as long as current packages still support them, which is likely to be several years.

    To fix your non-LTS kernel, hold it back for the meantime until the ZFS + SPL packages in the Antergos repo get upgraded to 7.4

    The easiest way to do this is get the downgrade package from the AUR:

    $ yaourt downgrade
    

    Once it’s installed, run downgrade as sudo for both linux and linux-headers. You have to run it separately for each one:

    $ sudo downgrade linux
    

    and

    $ sudo downgrade linux-headers
    

    When choosing a kernel, I’d recommend 4.12.13-1 as the newest kernel one would want to use with ZFS 7.3. Make sure to get the same linux-headers version you chose as linux kernel!

    After the older kernel and headers are installed, downgrade will ask you if you want to add the package to IgnorePkg in /etc/pacman.conf - e.g. :

    add linux-headers to IgnorePkg? [y/n]
    

    Choose y for each one and the kernel and headers will be ignored when upgrading your system until you remove the IgnorePkg line in /etc/pacman.conffor each one.

    When you’re ready to upgrade your kernel after the ZFS and SPL in the Antergos repo have been upgraded to version 7.4, simply edit /etc/pacman.conf and delete or comment out the IgnorePkg line:

    $ sudo nano /etc/pacman.conf
    

    add a # to the beginning of the line to comment it out and it will upgrade as normal:

    #IgnorePkg = linux linux-headers
    

    Note: CTRL-X will exit you from nano, asking if you want to save the file before you leave.

    Now reboot your system and it should work. If not, use your LTS kernel to boot or use a fallback in the advanced options menu in GRUB.

    Once you get back inside your booting system, type:

    $ uname -r 
    

    To show your kernel version. If there was a problem booting your new kernel (if you get an error regarding your pool or ZFS not functioning), reboot into your LTS kernel and update your grub. I like to use the update-grub wrapper from Ubuntu because it’s dead simple. Install it by invoking:

    $ yaourt update-grub
    

    Then run update-grub:

    $ sudo update-grub
    

    Or you can do it the old-fashioned way without installing anything:

    $ sudo grub-mkconfig -o /boot/grub/grub.cfg
    

    Note: If you’ve booted into a working mainline kernel as shown with uname -r (4.12.13, for example) and your /etc/pacman.conf has an IgnorePkg for linux-lts, now is a good time to remove linux-lts from IgnorePkg, update linux-lts, and then put linux-lts back in your IgnorePkg line.

    Good luck!

    Thinkpad / Antergos / ZFS / Cinnamon / KVM enthusiast

    "Linux … is more a phenomenon than an OS" - Joekamprad

  • Would it be OK if I put the previous post in the Wiki?

    If so, how would I go about doing that?

    Thinkpad / Antergos / ZFS / Cinnamon / KVM enthusiast

    "Linux … is more a phenomenon than an OS" - Joekamprad

Posts 3Views 154
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.