ZFS dkms build fail after updating kernel

fhc

Active Member
May 15, 2017
6
0
41
Hi,

Since many weeks, I have a problem when I update the Proxmox kernel : when rebuilding ZFS, DKMS fails. After some googling, I finally open a thread here and hope someone will be able to help me :)

First, during the update :

Code:
Setting up pve-kernel-4.13.8-2-pve (4.13.8-28) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.13.8-2-pve /boot/vmlinuz-4.13.8-2-pve
run-parts: executing /etc/kernel/postinst.d/dkms 4.13.8-2-pve /boot/vmlinuz-4.13.8-2-pve
Error! Bad return status for module build on kernel: 4.13.8-2-pve (x86_64)
Consult /var/lib/dkms/spl/0.6.5.11/build/make.log for more information.

configure: error:
    *** Please make sure the kmod spl devel <kernel> package for your
    *** distribution is installed then try again.  If that fails you
    *** can specify the location of the spl objects with the
    *** '--with-spl-obj=PATH' option.
Error! Bad return status for module build on kernel: 4.13.8-2-pve (x86_64)
Consult /var/lib/dkms/zfs/0.6.5.11/build/make.log for more information.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.13.8-2-pve /boot/vmlinuz-4.13.8-2-pve
update-initramfs: Generating /boot/initrd.img-4.13.8-2-pve
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.13.8-2-pve /boot/vmlinuz-4.13.8-2-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.13.8-2-pve
Found initrd image: /boot/initrd.img-4.13.8-2-pve
Found linux image: /boot/vmlinuz-4.13.4-1-pve
Found initrd image: /boot/initrd.img-4.13.4-1-pve
done

The log file :

Code:
root@lrdf-srv-proxmox1:~# cat /var/lib/dkms/zfs/0.6.5.11/build/make.log
DKMS make.log for zfs-0.6.5.11 for kernel 4.13.8-2-pve (x86_64)
Fri Dec  1 18:16:34 CET 2017
make: *** No targets specified and no makefile found.  Stop.

ZFS/DKMS/SPL packages versions :

Code:
root@lrdf-srv-proxmox1:~# apt-cache policy zfs-dkms
zfs-dkms:
  Installed: 0.6.5.11-1~bpo9+1
  Candidate: 0.6.5.11-1~bpo9+1
  Version table:
 *** 0.6.5.11-1~bpo9+1 100
        100 http ://ftp.debian.org/debian stretch-backports/contrib amd64 Packages
        100 /var/lib/dpkg/status
     0.6.5.9-5 500
        500 http ://ftp.debian.org/debian stretch/contrib amd64 Packages

root@lrdf-srv-proxmox1:~# apt-cache policy zfs-zed
zfs-zed:
  Installed: 0.7.3-pve1~bpo9
  Candidate: 0.7.3-pve1~bpo9
  Version table:
 *** 0.7.3-pve1~bpo9 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
        100 /var/lib/dpkg/status
     0.7.2-pve1~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-pve18~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-pve17~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-1~bpo9+1 100
        100 http ://ftp.debian.org/debian stretch-backports/contrib amd64 Packages
     0.6.5.9-pve16~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.9-5 500
        500 http ://ftp.debian.org/debian stretch/contrib amd64 Packages

root@lrdf-srv-proxmox1:~# apt-cache policy zfsutils
zfsutils:
  Installed: 0.6.5.9-pve15~bpo80
  Candidate: 0.6.5.9-pve15~bpo80
  Version table:
 *** 0.6.5.9-pve15~bpo80 100
        100 /var/lib/dpkg/status

root@lrdf-srv-proxmox1:~# apt-cache policy zfsutils-linux
zfsutils-linux:
  Installed: 0.7.3-pve1~bpo9
  Candidate: 0.7.3-pve1~bpo9
  Version table:
 *** 0.7.3-pve1~bpo9 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
        100 /var/lib/dpkg/status
     0.7.2-pve1~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-pve18~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-pve17~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-1~bpo9+1 100
        100 http ://ftp.debian.org/debian stretch-backports/contrib amd64 Packages
     0.6.5.9-pve16~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.9-5 500
        500 http ://ftp.debian.org/debian stretch/contrib amd64 Packages

root@lrdf-srv-proxmox1:~# apt-cache policy spl
spl:
  Installed: 0.7.3-pve1~bpo9
  Candidate: 0.7.3-pve1~bpo9
  Version table:
 *** 0.7.3-pve1~bpo9 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
        100 /var/lib/dpkg/status
     0.7.2-pve1~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-pve10~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.11-1~bpo9+1 100
        100 http ://ftp.debian.org/debian stretch-backports/main amd64 Packages
     0.6.5.9-pve9~bpo90 500
        500 http ://download.proxmox.com/debian stretch/pve-no-subscription amd64 Packages
     0.6.5.9-1 500
        500 http ://ftp.debian.org/debian stretch/main amd64 Packages

root@lrdf-srv-proxmox1:~# apt-cache policy spl-dkms
spl-dkms:
  Installed: 0.6.5.11-1~bpo9+1
  Candidate: 0.6.5.11-1~bpo9+1
  Version table:
 *** 0.6.5.11-1~bpo9+1 100
        100 http ://ftp.debian.org/debian stretch-backports/main amd64 Packages
        100 /var/lib/dpkg/status
     0.6.5.9-1 500
        500 http ://ftp.debian.org/debian stretch/main amd64 Packages

Proxmox version :

Code:
root@lrdf-srv-proxmox1:~# pveversion -v
proxmox-ve: 5.1-28 (running kernel: 4.13.4-1-pve)
pve-manager: 5.1-36 (running version: 5.1-36/131401db)
pve-kernel-4.13.4-1-pve: 4.13.4-26
pve-kernel-4.13.8-2-pve: 4.13.8-28
libpve-http-server-perl: 2.0-6
lvm2: 2.02.168-pve6
corosync: 2.4.2-pve3
libqb0: 1.0.1-1
pve-cluster: 5.0-15
qemu-server: 5.0-17
pve-firmware: 2.0-3
libpve-common-perl: 5.0-20
libpve-guest-common-perl: 2.0-13
libpve-access-control: 5.0-7
libpve-storage-perl: 5.0-16
pve-libspice-server1: 0.12.8-3
vncterm: 1.5-2
pve-docs: 5.1-12
pve-qemu-kvm: 2.9.1-2
pve-container: 2.0-17
pve-firewall: 3.0-3
pve-ha-manager: 2.0-3
ksm-control-daemon: 1.2-2
glusterfs-client: 3.8.8-1
lxc-pve: 2.1.0-2
lxcfs: 2.0.7-pve4
criu: 2.11.1-1~bpo90
novnc-pve: 0.6-4
smartmontools: 6.5+svn4324-1
zfsutils-linux: 0.7.3-pve1~bpo9
openvswitch-switch: 2.7.0-2
libpve-apiclient-perl: 2.0-2

I can see that there is a version mismatch between some packages : 0.6.5.11 vs 0.7.3. There is no 0.7.3 for these packages in the Stretch repo, and I don't know which packages are still mandatory (updated from Jessie a few months ago). My zpools still work, even after I reboot on the new kernel (keeping the old one as backup).

I found some posts giving manual fixes in dkms/spl conf files, re-compiling manually ZFS etc, but I'd rather prefer to stay Proxmox-compliant... The only one I tried is to add a post install hook to dkms to ensure I will work with the correct version, but it is not working :

Code:
root@lrdf-srv-proxmox1:~# cat /etc/dkms/spl.conf
POST_INSTALL="scripts/dkms.postbuild -a ${arch} -k ${kernelver} -v ${PACKAGE_VERSION} -n ${PACKAGE_NAME} -t ${dkms_tree}"

Any advice ? :'(
 
why do use zfs-dkms? as Proxmox VE got all zfs modules integrated, no need to compile.
 
I don't think you should have zfs-dkms installed

Code:
$ apt-cache policy zfs-dkms
zfs-dkms:
  Installed: (none)
  Candidate: 0.6.5.9-5
  Version table:
     0.6.5.9-5 500
        500 http://ftp.it.debian.org/debian stretch/contrib amd64 Packages
 
Thanks guys ! This server was a long time ago a NAS, not a Proxmox node. I removed zfs-dms, spl-dmks and zfsutils, seems to be ok :)
 
Long time ago? ZFS was integrated in Debian Stretch (an provided in Jessie backports), so it cannot be sooo long - or we have different ideas about time :-D

There was a ZFSonLinux repo before the packages arrive in Debian backports. This server (and 6 others at work) have been running ZFS on Debian Jessie for more than 2 years, that's prehistoric ! :D
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!