ZFS on ubuntu build

Hello,

Seems the ZFS modules are not built into the release and attempting to build it with zfs-dkms fails

------------------------------
Deleting module version: 0.8.3
completely from the DKMS tree.
------------------------------
Done.
Configuring zfs-dkms
--------------------

Licenses of ZFS and Linux are incompatible

ZFS is licensed under the Common Development and Distribution License (CDDL), and the Linux kernel is licensed under the GNU General Public License Version 2 (GPL-2). While both are free open source licenses they are restrictive licenses. The combination of them causes
problems because it prevents using pieces of code exclusively available under one license with pieces of code exclusively available under the other in the same binary.

You are going to build ZFS using DKMS in such a way that they are not going to be built into one monolithic binary. Please be aware that distributing both of the binaries in the same media (disk images, virtual appliances, etc) may lead to infringing.

Loading new zfs-0.8.3 DKMS files...
Building for 5.10.66-27-rockchip-gea60d388902d
Building initial module for 5.10.66-27-rockchip-gea60d388902d
Error!  The /var/lib/dkms/zfs/0.8.3/5.10.66-27-rockchip-gea60d388902d/aarch64/dkms.conf for module zfs includes a BUILD_EXCLUSIVE directive which
does not match this kernel/arch.  This indicates that it should not be built.
Skipped.

On armbian I couldn’t figure out how to get the kernel headers installed because using armbian-config to do so failed

apt install linux-headers-legacy-rockchip-rk3588

But are broken too … forget about ZFS on this kernel.

Hrm, I supposedly have the kernel headers installed:

sudo apt install linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-5.10.66-27-rockchip-gea60d388902d is already the newest version (5.10.66-27-rockchip).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

you mean the headers package is broken? Or you meant for armbian. :expressionless:

Legacy kernel is utter low quality / broken, yes.

ZFS works on Armbian, I am using it on my production NAS. Just not with this kernel. And kernel is something that was spitted out by Rockchip. You can try to fix the code. With stock image or Armbian. Its the same.

Got it, so until (if) it’s supported on the official armbian stable, things will be broken. Shame :frowning:

For reference, error on armbian:

Removing old zfs-2.1.6 DKMS files...
Deleting module zfs-2.1.6 completely from the DKMS tree.
Loading new zfs-2.1.6 DKMS files...
Deprecated feature: REMAKE_INITRD (/usr/src/zfs-2.1.6/dkms.conf)
Building for 5.10.72-rockchip-rk3588
Building initial module for 5.10.72-rockchip-rk3588
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/zfs/2.1.6/source/dkms.conf)
configure: error:
		*** This kernel does not include the required loadable module
		*** support!
		***
		*** To build OpenZFS as a loadable Linux kernel module
		*** enable loadable module support by setting
		*** `CONFIG_MODULES=y` in the kernel configuration and run
		*** `make modules_prepare` in the Linux source tree.
		***
		*** If you don't intend to enable loadable kernel module
		*** support, please compile OpenZFS as a Linux kernel built-in.
		***
		*** Prepare the Linux source tree by running `make prepare`,
		*** use the OpenZFS `--enable-linux-builtin` configure option,
		*** copy the OpenZFS sources into the Linux source tree using
		*** `./copy-builtin <linux source directory>`,
		*** set `CONFIG_ZFS=y` in the kernel configuration and compile
		*** kernel as usual.

Error! Bad return status for module build on kernel: 5.10.72-rockchip-rk3588 (aarch64)
Consult /var/lib/dkms/zfs/2.1.6/build/make.log for more information.
dpkg: error processing package zfs-dkms (--configure):
 installed zfs-dkms package post-installation script subprocess returned error exit status 10
Processing triggers for initramfs-tools (0.140ubuntu17) ...
Errors were encountered while processing:
 zfs-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)