Based on my experience here ( TrueNAS and MikroTik RDS2216: TrueNAS in Qemu vs. TrueNAS as NVMEoF Initiator ) :
I am exporting my NVME drives from the RDS2216 to my TrueNAS VMs via NVME over TCP. TrueNAS picks up the drives and it works rather well. Except when I reboot.
I’m trying to figure out a way to get TrueNAS to import my NVMEoF-backed ZFS pools properly on boot-up. Every time it boots, I have to export them from the GUI, then reimport them. As long as TrueNAS stays up, they stay connected just fine.
I’ve experimented with changing some systemd orders so that zfs import waits for nvmf-autoconnect to finish, but that’s not working (probably didn’t do it right). I see some other services want to get ZFS started before the network comes up, so it seems we have a chicken-and-egg problem.
Is there a simple way to have the zfs import service run again after nvmf-autoconnect?