ZFS installation on Raspberry Pi is problematic

Bug #1874519 reported by andrum99
This bug report is a duplicate of:  Bug #1884110: Enable ZFS for Raspberry Pi arm64. Edit Remove
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-raspi (Ubuntu)
Confirmed
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
zfs-linux (Ubuntu)
Won't Fix
High
Juerg Haefliger

Bug Description

Version: Ubuntu Server 20.04 - preinstalled 64-bit image for Raspberry Pi.

ZFS on the Pi under 20.04 is currently a bit problematic. Upon issuing the command 'zpool status', I'm helpfully directed to install zfsutils-linux. When I do this, it complains that it cannot find the ZFS module, then errors out. Worse than that, the zfsutils-linux package does not depend on the zfs-dkms package, so it doesn't attempt to build the ZFS kernel modules automatically.

The workaround is to install zfs-dkms, which builds the required kernel modules. (Once this has been done, the usual errors when installing the zfsutils-linux package, caused by there being no ZFS pools on the system, can be worked around by creating a zpool, then rerunning 'sudo apt install zfsutils-linux', as with previous versions of Ubuntu and Debian).

I have not tested on other hardware platforms - this problem may also exist on other platforms where the user has not selected to install to ZFS.

I have selected 'zfsutils' as the affected package, which is not the name of an actual current package, since launchpad won't let me submit the bug without selecting a package, however it's not clear to me that the problem is caused by that package.

Tags: focal
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Looks like `zfsutils-linux` is part of the source package `zfs-linux`

affects: zfsutils (Ubuntu) → zfs-linux (Ubuntu)
tags: added: focal
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Adding zfs to the pi kernel was discussed and rejected in the past: https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1852119

Revision history for this message
andrum99 (andrum99) wrote :

Just to clarify: I'm not suggesting ZFS be included by default on the Raspberry Pi. I'm saying that it should be possible to install ZFS on the Raspberry Pi without jumping through so many hoops. I appreciate this is a tricky one though, since presumably there are other arm64 platforms that have more RAM. Perhaps a note in the release notes about the required workaround, i.e. manually install zfs-dkms using apt? (In 19.10 it was a dependency of zfsutils-linux).

Revision history for this message
satmandu (satadru-umich) wrote :

Maybe it makes sense to create a virtual package dependency which can pull in zfs-dkms for the non-arm64 architectures which get zfsutils-linux installed?

For instance aufs-dkms is a virtual package which is satisfied by the official kernel packages.

Revision history for this message
Richard Laager (rlaager) wrote :

I think it used to be the case that zfsutils-linux depended on zfs-dkms which was then provided by the kernel packages. That seems like a way to solve this. Given that dkms is for dynamic kernel modules, it was always a bit weird to see the kernel providing that. It should probably be that zfsutils-linux depends on zfs-dkms | zfs-module, and then the kernel provides zfs-module.

Revision history for this message
andrum99 (andrum99) wrote :

If this can be fixed by tweaking package dependencies, without negatively affecting other platforms, then that would be ideal 👍

Revision history for this message
Colin Ian King (colin-king) wrote :

Just for the heads-up, I've evaluated ZFS on a range of raspberry Pis now and recommended we enable ZFS as part of the kernel package build. I can't promise when this will land but it will remove this problem in the long term.

Revision history for this message
andrum99 (andrum99) wrote :

Thanks for the heads up. The package dependencies should probably be fixed as well. Glad to hear you've now qualified zfs on Pi - it's worked fine for my limited use, so it gives me more confidence that I'm not going to run into trouble if I start stressing the box a bit more.

Revision history for this message
satmandu (satadru-umich) wrote :

This suggested policy change is welcome. As per https://bugs.launchpad.net/ubuntu/+source/linux-raspi2/+bug/1852119/comments/2 the argument was that the RPI4 only has 4Gb of ram.

"we do not support ZFS unless you have at least 4GB of memory free.

Today the 8Gb RPI4 was announced.

https://www.raspberrypi.org/blog/8gb-raspberry-pi-4-on-sale-now-at-75/

I'm no expert, but I suspect that this device will be able to handle 4GB of memory free with ease...

Revision history for this message
Colin Ian King (colin-king) wrote :

Indeed, I've already testing this on 8GB and 4GB devices, so it's on the TODO list for the raspi kernels.

Changed in zfs-linux (Ubuntu):
importance: Undecided → High
assignee: nobody → Juerg Haefliger (juergh)
status: New → Triaged
Revision history for this message
Stéphane Graber (stgraber) wrote :

Good to hear. I just ran into this today when working on a LXD appliance based on Ubuntu Core.
btrfs isn't exactly great as an alternative and the 8GB Pi is definitely ZFS capable so would be great to have :)

Revision history for this message
Juerg Haefliger (juergh) wrote :
Revision history for this message
Colin Ian King (colin-king) wrote :

Thanks Juerg. Can you close this bug once it lands?

Revision history for this message
Juerg Haefliger (juergh) wrote :

ZFS now comes pre-built for arm64 with kernel linux-raspi 5.4.0-1015.15 which is in -updates.

Changed in zfs-linux (Ubuntu):
status: Triaged → Won't Fix
no longer affects: zfs-linux (Ubuntu Focal)
Changed in linux-raspi (Ubuntu Focal):
status: New → Fix Released
Changed in linux-raspi (Ubuntu):
status: New → Confirmed
Revision history for this message
andrum99 (andrum99) wrote :

Thanks for adding the ZFS module for Pi 😁

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.