When booting back up, I noticed that I cannot import my ZFS pools automatically unless I use the -f flag. I get the warning saying that the pool was previously used ...
Now, when I boot up to funtoo/gentoo (and reboot), part of that reboot process includes exporting the ZFS pools.
I don't see any configuration options in /etc/default/zfs (nor any other file in /etc).
How can I ensure that these pools are automatically exported prior to reboot?
I believe this works as my pools are now automatically imported on startup whereas before they were complaining about not being exported.
I created a service to export the pools calling a helper which determines the online pools and exports them.
I would expect this to be part of the ZFS package on Ubuntu, so I'm surprised as to why this is needed.
Please correct me if I'm wrong. I'd prefer to use an off-the-shelf setup as opposed to develop what seems like infrastructure to me.
/usr/lib/systemd/system/zfs-export.service
/usr/sbin/zfs-export-all-pools #!/bin/bash
Lastly, I enable the service.