I have an DIY Ubuntu NAS (one of the first few linux installs), and I was having aggravations with the zfs-dkms package that I had setup a couple of years ago to host raided pools for my NAS setup. However, recently during an update I noticed the kernel was updated on the machine to 6.2.0-39-generic which now caused the zfs-dkms to throw errors when apt would run mkinitcpio as the zfs-dkms-2.1.5 module only supported up to kernel 5.19.
</p>
<p>
While it didn't exactly cause any issues with the zfs installation there was currently (it still functioned fine even with the new kernel). I got tired of it so I decided to compile openzfs from source and install it on my system.
<divid="ZFS Upgrade Issue-Other issues-Zpools not importing"><h3id="Zpools not importing"class="header"><ahref="#ZFS Upgrade Issue-Other issues-Zpools not importing">Zpools not importing</a></h3></div>
<hr/>
<p>
Upon finishing installation and reboot I noticed that when the server rebooted it didn't mount the pools on boot. I always had to import them manually <code>zpool import data && zpool import media</code>
</p>
<p>
I was confused because the configs setup by my dkms installation were still valid <code>/etc/defaults/zfs</code>.
</p>
<p>
While it took me an hour to figure it out, I eventually figured out what was wrong and why zfs wasn't importing my pools.
</p>
<p>
the services configured in /usr/lib/systemd/system were setup with the path that bsd/unix would use for the zpool.cache file (<code>/usr/local/etc/zfs/zpool.cache</code>) instead of what zfs was configured with on my zfs-dkms installation (<code>/etc/zfs/zpool.cache</code>).
All I ended up needing to do was change the path's that the service files from <code>/usr/local/etc/zfs/zpool.cache</code> to <code>/etc/zfs/zpool.cache</code> (wherever applicable).
</p>
<p>
After doing that and rebooting the pools were imported and mounted as they previously had.