Jump to content

ZFS "just works" now on Armbian (2 step instructions if you are thick like me)!


Recommended Posts

EDIT: Solution in next post (this started as a question; yeah maybe I should have split it, but whatever).

 

Apologies if this is dumb question.  I finally got my hands on some appropriate (64-bit) hardware, and ready to install software now.

 

I have read so many threads (in Kobol Club and elsewhere), Issues (at GitHub as well as Atlassian) and I think this is solved by now (on Armbian) but cannot confirm?

 

Official install instructions (on OpenZFS website) don't really seem applicable to Armbian (kernel headers will be different, etc.).

 

I guess what I am asking is, do I just do something like the following:

 

$ sudo apt install zfs-dkms zfsutils-linux

 

And it should "just work"?  Or is there more to it than that?

 

Looks like I should make sure backports are set up beforehand, as ZFS version is significantly newer there (2.0.3 vs 0.7.12).

 

Target device is ROCKPro64, on latest Armbian 21.02.3 Buster Current, which is kernel 5.10.21.

Edited by TRS-80
add note at top to save people time
Link to comment
Share on other sites

Armbian & Khadas are rewarding contributors

  • TRS-80 changed the title to ZFS "just works" now on Armbian (2 step instructions if you are thick like me)!
15 hours ago, TRS-80 said:

I have read so many threads (in Kobol Club and elsewhere), Issues (at GitHub as well as Atlassian) and I think this is solved by now (on Armbian) but cannot confirm?

 

Issues are (were) with upstream Debian and Ubuntu, while now they obviously fixed ... ZFS on Armbian and kernel 5.10. works OOB since January. On Debian backport repo you now have slightly more recent ZFS version which could be good, could also be bad :) 

 

 

Link to comment
Share on other sites

16 hours ago, Igor said:

slightly more recent ZFS version which could be good, could also be bad :)

 

I get the sense I will be much better off with the newer version (in the case of ZFS).  However, as I am now become a "ZFS system administrator" I have gone back to more actively monitoring their mailing list.

Link to comment
Share on other sites

 

This works for me.

 

# BRANCH=$(cat /.armbian-release.host | grep BRANCH | cut -d'=' -f2)

# [ "$BRANCH" == "" ] && exit 1

# . /.armbian-release.host

# . /etc/armbian-release

# INSTALL_PKG="linux-headers-${BRANCH}-${LINUXFAMILY}"

# apt install ${INSTALL_PKG}

# apt install dkms fakeroot linux-libc-dev menu debhelper

# apt install zfsutils-linux zfs-initramfs zfs-auto-snapshot zfs-zed zfs-dkms

# apt remove zfs-auto-snapshot

# apt install --reinstall zfs-initramfs zfs-dkms zfs-zed

# apt-mark hold linux-image*

 

For some reason, I found it necessary to install, uninstall, and reinstall a couple of the packages. I've no earthly idea why. Anyway, it works for me.

 

I put a hold on upgrades of the kernel because I'm paranoid like that.

 

Link to comment
Share on other sites

I've just set up Armbian 22.05.3 bullseye on an Odroid HC4 and am trying to enable ZFS, however the modules won't compile.

 

This is using zfs-dkms from bullseye-backports:

 

Setting up zfs-dkms (2.1.5-1~bpo11+1) ...
Removing old zfs-2.1.5 DKMS files...

------------------------------
Deleting module version: 2.1.5
completely from the DKMS tree.
------------------------------
Done.
Loading new zfs-2.1.5 DKMS files...
Building for 5.10.123-meson64
Building initial module for 5.10.123-meson64
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.123-meson64 (aarch64)
Consult /var/lib/dkms/zfs/2.1.5/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

 

make.log simply says

 

DKMS make.log for zfs-2.1.5 for kernel 5.10.123-meson64 (aarch64)
Mon 18 Jul 2022 16:04:48 AEST
make: *** No targets specified and no makefile found.  Stop.

 

The config.log refers to build/build.log which says the following, which seems to be the real error:

 

make: Entering directory '/usr/src/linux-headers-5.10.123-meson64'
  MODPOST /var/lib/dkms/zfs/2.1.5/build/build/Module.symvers
make[2]: *** No rule to make target 'scripts/module.lds', needed by '/var/lib/dkms/zfs/2.1.5/build/build/config_block/config_block.ko'.
make[2]: Target '__modfinal' not remade because of errors.
make[1]: *** [scripts/Makefile.modpost:130: __modpost] Error 2
make: *** [Makefile:1726: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.10.123-meson64'

 

Seems to be the same bug as this https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=975571

 

is there a fix on Armbian?

 

thanks

Link to comment
Share on other sites

On 7/18/2022 at 6:37 PM, Igor said:

Yes it is - use Jammy user land. It works there perfectly. Debian user land usually needs more debugging and fixing. If you insist going Debian route - when you find where the problem is https://docs.armbian.com/Process_Contribute/ 

 

So I have this working on bullseye by using the Armbian edge kernel (linux-image-edge-meson64, 5.17.5-meson64 in my case) with zfs from bullseye-backports. The important part was the new kernel headers I think, as the previous kernel (linux-image-current-meson64, 5.10.123-meson64) appears to be missing module.lds needed to build any out of tree module. I think the same problem would occur with jammy because the kernel package is the same.

 

This looks like it was fixed in January 2021 in https://github.com/armbian/build/pull/2545, but meson64 still has an unfixed 5.10 kernel as current in 22.05.3, while some other boards have 5.15 (and some have earlier versions) which has the fix, and so does the meson64 edge kernel 5.17.5.

Link to comment
Share on other sites

3 hours ago, hmof said:

So I have this working on bullseye by using the Armbian edge kernel (linux-image-edge-meson64, 5.17.5-meson64 in my case) with zfs from bullseye-backports. The important part was the new kernel headers I think, as the previous kernel (linux-image-current-meson64, 5.10.123-meson64) appears to be missing module.lds needed to build any out of tree module. I think the same problem would occur with jammy because the kernel package is the same.

 

This looks like it was fixed in January 2021 in https://github.com/armbian/build/pull/2545, but meson64 still has an unfixed 5.10 kernel as current in 22.05.3

 

Good catch. I had in my mind we fixed this lds related bug ... well, 5.10.y is going out soon, so this is not getting fixes unless someone has a desire to do that.

 

3 hours ago, hmof said:

while some other boards have 5.15


This is needed as it is very difficult to secure good stability and functionality across all hardware by using one kernel. If we would go simple way, it would be a lot worse. So we kept meson64 on 5.10.y and bump others to next LTS. ATM not sure what will happen with current branch but EDGE is being prepared for 5.19.y. If things will work well, its possible to bump current directly to 5.19.y

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines