Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(a)kmods, dkms, and rpm-ostree #12641

Open
andrewgdunn opened this issue Oct 13, 2021 · 12 comments
Open

(a)kmods, dkms, and rpm-ostree #12641

andrewgdunn opened this issue Oct 13, 2021 · 12 comments
Labels
Type: Feature Feature request or new feature

Comments

@andrewgdunn
Copy link

Realizing that this is a distribution specific ask, the answer may easily be no in the sense that dkms works across multiple distros and this enhancement would be specific to the Fedora rpm-ostree install base. This might be a small community, but I'd wanted to make a sort of tombstone here for others to peep at (in case there are more of us).

Use of OpenZFS with rpm-ostree would be an extremely nice feature. There is difficulty with the dkms approach to packaging with rpm-ostree.

Would it be possible to consider use of akmods to allow OpenZFS to chart against faster moving Kernels and immutable installs? This would allow for the package to be rebuilt as people try out new/different kernel compositions.

It seems like the groundwork is in place for kmod builds with zfs-kmod and srpm-kmod build targets but I'm unsure of how to take it further to utilize with ostree.

There are some discussions in other areas online, referencing them here:

@andrewgdunn andrewgdunn added the Type: Feature Feature request or new feature label Oct 13, 2021
@gdevenyi
Copy link
Contributor

#10333

@jmpolom
Copy link

jmpolom commented Oct 13, 2021

@gdevenyi I noticed in that thread several mentions generally about some things not being supported because of a lack of effort to maintain them. I think in the case of an akmod package for fedora, my organization could justify contributing effort to maintain such a package. However right now it looks like the build system lacks support for generating an akmod package, so there would be some development necessary.

I want to add a link to a comment in closed issue #9891 where someone showed a patch that appears to enable building an akmod package. It seems like most of the bits and pieces are here to do this, but it just hasn't been done (for one reason or another).

@xrishox
Copy link

xrishox commented Oct 22, 2021

would really appreciate the ability to use zfs inside of silverblue.

@jmpolom
Copy link

jmpolom commented Oct 28, 2021

It is possible to use zfs on OS's that use ostree/rpm-ostree but it requires building the zfs kmod package for the particular kernel the system is on.

However in my testing (using Fedora IoT's ostree and manifests) I've found that these packages don't seem to function correct if they're layered onto the ostree -- they must be included when the ostree is built. I don't fully understand why that is because as a logged in user you can clearly navigate to the kernel modules and observe their presence on the filesystem.

A pre-requisite for any akmod support is to understand why layering on a kmod package doesn't seem to work. The akmod process builds kmod packages and installs them. The reason this issue is asking for akmod support is because it enables automatically rebuilding kmod packages when kernels change. This is contrast to dkms which just builds the raw module files and sticks them somewhere.

I'd really appreciate some thoughts as to why layering on the kmod rpm using rpm-ostree results in modprobe not being able to find the module. I'm not an expert on how ostree actually works and suspect it may have to do with the details of how the final layered filesystem is composed.

@mcheshkov
Copy link

I managed to get working ZFS kmod on Fedora CoreOS. Here is gist I use to build kmod package for specific kernel version
https://gist.github.com/mcheshkov/69dfc70fd1ec5bdb875105979c20b75b

Beware, this is not well-tested packages by any means, but I use them for my personal NAS.

Main issue I encountered was System.map placement - on CoreOS it is located elsewhere, default %post script generate it in /boot. IIRC, script couldn't write there during install on rpm-ostree system, but otherwise package installed normally. After reboot system use old modules map, which is why zfs.ko itself is there, but modprobe failed to find new module.
https://gist.github.com/mcheshkov/69dfc70fd1ec5bdb875105979c20b75b#file-patches___0001-zfs-kmodtool-system-map-path-patch

@jmpolom
Copy link

jmpolom commented Nov 3, 2021

@mcheshkov that's some really great info there. Your build script is very clean. Completely forgot to check if System.map was getting updated when I loaded the module.

I took a look at the current kmodtool source and I see there's some conditional logic where your patch made changes. Looks like this change was added in April of 2021. Have you attempted without your patch since?

@mcheshkov
Copy link

#11836 didn't make it to release, and I haven't tried yet to build master.

@jmpolom
Copy link

jmpolom commented Nov 3, 2021

I see now that it wasn't included in 2.0.6 which is what I tested building. Looks like the tag 2.1.1 contains the change so perhaps I will try building at that point or from master. Great info either way.

This does not specifically address akmod support though which would require adding support to openzfs for building another package type for Red Hat/Fedora type systems. That was the original genesis of this issue. However this is absolutely some great work that would be needed to get that working on ostree-based systems.

@i2
Copy link

i2 commented Apr 5, 2022

Is there any update on this? Any prospect of it being implemented?

@anthr76
Copy link

anthr76 commented May 11, 2022

Just a friendly ping on this issue. Anywhere I can pitch in?

@BlauerHunger
Copy link

BlauerHunger commented Oct 8, 2022

Any progress on this? I'd really like to use zfs on new systems, but no akmod available is a showstopper for me since dkms does not work (and probably never will due to its design) with rpm-ostree. This 2 years old patch seems to go into the right direction, but I don't want to be required to patch and rebuild zfs on production systems.

Especially since Fedora IoT, which is rpm-ostree based, is an official Fedora Edition by now, this is a growing problem for admins who'd like to use zfs but can't.

@francoism90
Copy link

I'm running Silverblue, any update on this?

Would be great if ZFS could be supported somehow. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

9 participants