There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Issue loading OpenZFS kernel modules in Fedora Silverblue

Hello good people,

Hoping this is an appropriate place for troubleshooting questions, I’m learning Linux & OpenZFS in preparation of a server + NAS build, currently working in VMware Workstation. I have successfully setup OpenZFS on Fedora 39 and have configured my zpool using virtual disks.

Now I am looking to replicate the setup on Fedora Silverblue: setup OpenZFS, import the existing disks, then attach the zpool.

1. Import the OpenZFS repository

rpm-ostree install -y https://zfsonlinux.org/fedora/zfs-release-2-4$(rpm --eval “%{dist}”).noarch.rpm

2. Confirmed zfs-fuse is not used

rpm-ostree override remove zfs-fuse


<span style="color:#323232;">error: Package "zfs-fuse" not found
</span>
3. Layer the kernel headers

rpm-ostree install kernel-devel

4. Layer OpenZFS

rpm-ostree install zfs

5. Confirmed status

rpm-ostree status


<span style="color:#323232;">State: idle
</span><span style="color:#323232;">Deployments:
</span><span style="color:#323232;">● fedora:fedora/39/x86_64/kinoite
</span><span style="color:#323232;">                  Version: 39.20240304.0 (2024-03-04T00:39:42Z)
</span><span style="color:#323232;">               BaseCommit: b30269aa0e2604e24fd74596a75ee79ef77e6bc2b20f87b49d02f2796ccd3da2
</span><span style="color:#323232;">             GPGSignature: Valid signature by E8F23996F23218640CB44CBE75CF5AC418B8E74C
</span><span style="color:#323232;">          LayeredPackages: kernel-devel zfs
</span><span style="color:#323232;">            LocalPackages: zfs-release-2-4.fc39.noarch
</span>
6. I was expecting the next step to fail

modprobe zfs


<span style="color:#323232;">modprobe: FATAL: Module zfs not found in directory /lib/modules/6.7.7-200.fc39.x86_64
</span>

Nevertheless, I went ahead and created the 2 zfs.conf files as described in the OpenZFS documentation.

cat /etc/modules-load.d/zfs.conf
zfs
cat /etc/dnf/protected.d/zfs.conf
zfs

7. This is where I am now stuck

I have tired a number of things such as:

i. Adding modprobe as a kernel argument similar to Silverblue using nVidia drivers

rpm-ostree kargs --append=modprobe=zfs


<span style="color:#323232;">rpm-ostree kargs
</span><span style="color:#323232;">rhgb quiet root=UUID=cbaf12f4-d5b4-4d24-83d6-83ad53730f2a rootflags=subvol=root rw ostree=/ostree/boot.1/fedora/5d2cc07d31373ad2a64ab4ed610ce5a45625bd317c1447d2947a489056a5c077/0 modprobe=zfs
</span><span style="color:#323232;">
</span>
ii. Installed, then disabled, rpm-ostree initramfs, continuing instead with initramfs-etc as described here

rpm-ostree initramfs-etc --track=/etc/modules-load.d/zfs.conf
rpm-ostree initramfs-etc --track=/etc/dnf/protected.d/zfs.conf


<span style="color:#323232;">rpm-ostree status
</span><span style="color:#323232;">State: idle
</span><span style="color:#323232;">Deployments:
</span><span style="color:#323232;">● fedora:fedora/39/x86_64/kinoite
</span><span style="color:#323232;">                  Version: 39.20240304.0 (2024-03-04T00:39:42Z)
</span><span style="color:#323232;">               BaseCommit: b30269aa0e2604e24fd74596a75ee79ef77e6bc2b20f87b49d02f2796ccd3da2
</span><span style="color:#323232;">             GPGSignature: Valid signature by E8F23996F23218640CB44CBE75CF5AC418B8E74C
</span><span style="color:#323232;">          LayeredPackages: kernel-devel zfs
</span><span style="color:#323232;">            LocalPackages: zfs-release-2-4.fc39.noarch
</span><span style="color:#323232;">             InitramfsEtc: /etc/dnf/protected.d/zfs.conf /etc/modules-load.d/zfs.conf
</span>
8. zfs, zpool seem ok as I can get the help output or read the man pages, however:

zpool status
The ZFS modules cannot be auto-loaded.
Try running ‘modprobe zfs’ as root to manually load them.

zfs get all
The ZFS modules cannot be auto-loaded.
Try running ‘modprobe zfs’ as root to manually load them.

Obviously, I’m missing something due to my gaps in experience with Linux. I see that Universal Blue has incorporated OpenZFS as described on the GitHub page, so it should be possible for me to achieve this as well, I suppose.

Any pointers, documentation or advice is appreciated!

The_Zen_Cow_Says_Mu ,

DKMS isn’t supported on Silverblue. Only Kmods. So there’s your problem.

docs.fedoraproject.org/en-US/…/troubleshooting/

Even if you can get it to work, running ZFS on fedora generally is an exercise in frustration because the kernels update to newer versions than what ZFS supports anyway.

iotzan OP ,

Thank you! This is the page where I discovered that I can try rpm-ostree kargs --append=modprobe=zfs, which didn’t work.
Still, as far as I understand it, ublue managed to overcome this, as they do offer a Fedora version with zfs included.
What am I missing?

The_Zen_Cow_Says_Mu ,

ublue built zfs as a kmod.

ScottE ,

I don’t use Fedora, but I have ZFS on all my Arch systems for everything (including root fs). So, I’ll make a guess - is the package you installed for ZFS a DKMS kernel module, or a binary one? That’s the first thing. If it’s a DKMS module, I don’t see anything on your output showing it was compiled, which would explain the module not loading. If it’s a binary module in that package, it must be for the exact same version of the kernel that is installed - exact same. If it mismatches then you need either a different kennel or different ZFS package. In either case, you’ll probably need to wire in a hook for your initramfs, but it looks that part might be ok from your output. Hope that helps, good luck. ZFS is incredibly good.

iotzan OP ,

This is where my knowledge of Linux falls short.

is the package you installed for ZFS a DKMS kernel module, or a binary one?

In both Fedora and Silverblue I find the same, ZFS-related files, under /usr/sbin/


<span style="color:#323232;"> Jan  1  1970 blkzone
</span><span style="color:#323232;">lrwxrwxrwx. 43 root root      11 Feb 28 13:59 cache_metadata_size -> pdata_tools
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   24176 Jan  1  1970 fatresize
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root     756 Jan  1  1970 fsck.zfs
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   15960 Jan  1  1970 fsfreeze
</span><span style="color:#323232;">lrwxrwxrwx. 91 root root       3 Feb 28 13:59 lvresize -> lvm
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   24104 Jan  1  1970 mount.zfs
</span><span style="color:#323232;">lrwxrwxrwx.  3 root root      22 Feb 28 13:59 named-checkzone -> ../bin/named-checkzone
</span><span style="color:#323232;">lrwxrwxrwx.  3 root root      24 Feb 28 13:59 named-compilezone -> ../bin/named-compilezone
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   32568 Jan  1  1970 nilfs-resize
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   69672 Jan  1  1970 ntfsresize
</span><span style="color:#323232;">lrwxrwxrwx. 91 root root       3 Feb 28 13:59 pvresize -> lvm
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   73784 Jan  1  1970 resize2fs
</span><span style="color:#323232;">lrwxrwxrwx. 11 root root       9 Feb 28 13:59 resize.f2fs -> fsck.f2fs
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   24408 Jan  1  1970 resizepart
</span><span style="color:#323232;">lrwxrwxrwx. 43 root root      11 Feb 28 13:59 thin_metadata_size -> pdata_tools
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root     804 Jan  1  1970 xfs_freeze
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root  212440 Jan  1  1970 zdb
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root  107736 Jan  1  1970 zed
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root  149984 Jan  1  1970 zfs
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   15920 Jan  1  1970 zfs_ids_to_path
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   15920 Jan  1  1970 zgenhostid
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   32472 Jan  1  1970 zhack
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   65400 Jan  1  1970 zic
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   36536 Jan  1  1970 zinject
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root  264288 Jan  1  1970 zpool
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   57688 Jan  1  1970 zramctl
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   40720 Jan  1  1970 zstream
</span><span style="color:#323232;">lrwxrwxrwx.  3 root root       7 Mar  4 10:20 zstreamdump -> zstream
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root  162208 Jan  1  1970 ztest
</span><span style="color:#323232;">-rwxr-xr-x.  3 root root   53384 Jan  1  1970 zvbid
</span>

Also, ztest does something


<span style="color:#323232;">verifying concrete vdev 0, metaslab 11 of 12 ...
</span><span style="color:#323232;">loading concrete vdev 0, metaslab 11 of 12 ...
</span><span style="color:#323232;">verifying concrete vdev 0, metaslab 11 of 12 ...
</span>

I assume, therefor, that OpenZFS exists, however the kernel is not loading the related module.
Binary, library or something else - how can I tell?

bdonvr ,

It’s worth noting OP is on Fedora Silverblue - an “immutable” distro in which the system files are typically not editable.

biribiri11 ,

You wouldn’t use Silverblue on a server, you’d use Fedora CoreOS (FCOS) or CentOS Stream CoreOS (COSS). The ublue project has a FCOS derivative called ucore with options for ZFS OOTB. I use it on my server.

There’s some examples on how you’d use dockerfiles to build a ZFS module (as well as other things) from Fedora as well.

In any case, building bootable container images containing stuff like kernel modules is currently how this type of thing is done on atomic Fedora variants.

MrSpandex ,

Unfortunately this is why I chose to run Ubuntu server. As far as I know, it’s the only distro with ZFS set up by default. I wish you luck, as I run Silverblue as my desktop and would love to run it for my server too!

iotzan OP ,

I chose Fedora since I’m most familiar with RedHat from my professional activities.

catloaf ,

I would recommend AlmaLinux in that case. It takes the place of CentOS, which was the free edition of Red Hat. Fedora is targeted at the desktop, not servers.

You could do it, but I haven’t heard about people using Silverblue as a server yet.

biribiri11 ,

Fedora has another immutable variant for servers called CoreOS. It’s the default distro on any OKD cluster, though I run a derivative of it from ublue called ucore, which has a variant for zfs.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines