I've been having an issue since 2019. I found some others on these forums with the same issues but none of the fixes worked for me.
ZFS doesn't mount my datasets on boot, and in fact it "forgets" about my second pool.
I have 2 pools:
* rpool -> SSD / boot
* tank -> HDD / data
My fix for the past 2 years has been to add "zpool import tank; zfs mount -O -a" to `/etc/rc.local` and also add startup delays to any service which depends on ZFS, including my containers. But this fix is very fragile. I want to get away from this fix and do it the right way.
What I found was to enable `zfs-mount` and `zfs-import-cache` services. I enabled them but they are not starting on boot. What have I done wrong?
~ systemctl status zfs-mount.service
● zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/lib/systemd/system/zfs-mount.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:zfs(8)
~ systemctl status zfs-import-scan.service
● zfs-import-scan.service - Import ZFS pools by device scanning
Loaded: loaded (/lib/systemd/system/zfs-import-scan.service; enabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:zpool(8)
If I manually start the services they work but they do not load on boot.
ZFS doesn't mount my datasets on boot, and in fact it "forgets" about my second pool.
I have 2 pools:
* rpool -> SSD / boot
* tank -> HDD / data
My fix for the past 2 years has been to add "zpool import tank; zfs mount -O -a" to `/etc/rc.local` and also add startup delays to any service which depends on ZFS, including my containers. But this fix is very fragile. I want to get away from this fix and do it the right way.
What I found was to enable `zfs-mount` and `zfs-import-cache` services. I enabled them but they are not starting on boot. What have I done wrong?
~ systemctl status zfs-mount.service
● zfs-mount.service - Mount ZFS filesystems
Loaded: loaded (/lib/systemd/system/zfs-mount.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:zfs(8)
~ systemctl status zfs-import-scan.service
● zfs-import-scan.service - Import ZFS pools by device scanning
Loaded: loaded (/lib/systemd/system/zfs-import-scan.service; enabled; vendor preset: disabled)
Active: inactive (dead)
Docs: man:zpool(8)
If I manually start the services they work but they do not load on boot.