I recently moved to Fedora from Ubuntu on my personal desktop system (which has a small root filesystem on btrfs, and a larger partition dedicated to a zpool).
I ended up having to build the most recent 2.3.0 RC3 from source because the current release doesn’t support kernel 6.11.
This was all working fine with the exception of auto-mount.
I suppose I’ve been a bit spoiled with this, having mostly been on Ubuntu for most of my zfs needs.
I found it a bit of a pain digging through the openzfs documentation, the Ubuntu forums, and the Arch wiki to figure out how to do this, so I figured I’d post what worked for me here.
First, go through and enable the following services:
sudo systemctl enable zfs.target zfs-mount.target zfs-import.target zfs-import-cache.service
There are plenty of posts online telling you that you should create your cache file in /etc/zfs/zfs-list-cache/, but this is wrong (or at least outdated. I’m not sure if that location is Ubuntu specific?)
The ACTUAL location of the cache file (which you can see if you actually read through the systemd unit file for zfs-import-cache.service
) is /usr/local/etc/zfs.
if the file doesn’t exist, create it.
sudo touch /usr/local/etc/zfs/zpool.cache
.
Import your pool.
If you print out the cache file now it should no longer be empty.
cat /usr/local/etc/zfs/zpool.cache
.
Next time you reboot your pools should automatically mount and mount all filesystems.
Feel free to correct me anywhere I’ve gone wrong here.