ZFS in-tree kernel builder (to avoid missing dependencies on boot)

AveryFreeman

Active Member
Feb 22, 2017
17
2
43
43
Seattle
unixgreybeard.org
Dear Proxmox Community,

I have a project I wrote back in 2021 I'm re-writing with Proxmox in mind. I met a local business owner who hosts his servers on Proxmox, and he sounded interested when I mentioned I had compiled ZFS modules inside a kernel, so it sparked some interest in me to modernize my old script.

If you've ever been missing dependencies with a ZFS-on-root system, and been unable to boot, perhaps spending hours to fix your setup, you can probably imagine that a kernel with built-in modules could be a life saver if you need it. A ZFS built-in kernel avoids any chance of failing to boot because the system is without ZFS dependencies, as long as you're booting the `.zfs` kernel, so it's added peace of mind for those with a mission-critical setup (or traumatized from experiencing broken, obscure-setup boot processes).

I re-wrote my script of mine for v6+ kernels. They're mainline, but you can add any patches you want - the ncurses `make menuconfig` infrastructure is still fully usable. As a bit of a twist, I set it up to build inside a container (OCI/Docker), so the build environment could be standardized across the userbase, making debugging a lot more manageable, and also reducing the amount of dependencies one would need to build it. If anyone's familiar, you know kernel build deps can really clutter up your FS.

The first new version is on Ubuntu, but can also build RPMs: https://github.com/averyfreeman/ubuntu-zfs-kernel
I have another one I'm releasing soon that will be an RPM-vendor, it's branded `redhat` but running Alma Linux 9.4: https://github.com/averyfreeman/redhat-zfs-kernel
(if the RedHat link is dead, it's because I haven't finished it quite yet - check back in a few days)

The original is here, if you need a version ~5-6 kernel, or are curious about the genesis: https://github.com/averyfreeman/zfs-kernel-builder

Not sure if there's any performance benefit to having _these particular_ `.ko`'s built-in, but if someone would like to benchmark their system with it, I'd love to know if it's an improvement! :D

Have a great day ,
Avery
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!