exclude a specific zfs pool from boot

esaul

New Member
May 24, 2023
6
0
1
In a node I have three hdd. I use these passthrough hdd in a vm with truenas with fs zfs raidz.
When the node starts, the service zfs-import-scan.service fails because it tries to import the zfs pool used in the three hdd from truenas.
How can I exclude this poll from the scan?
 
Last edited:
Pure guess: just disable it: systemctl disable zfs-import@poolname2ignore.service


Disclaimer: not tested/verified
 
Sorry, I wrote it wrong.
The problem is given on the following service: zfs-import-scan.service
 
Hello, i have the same question, i have 2 block devices containing a ZFS pool that i want to export over iscsi and exclude from zfs.import-scan.service.

systemctl disable zfs-import@poolname2ignore.service does nothing, infact just typing anything random for poolname just gives:

Code:
# systemctl status zfs-import@test.service
○ zfs-import@test.service - Import ZFS pool test
     Loaded: loaded (/lib/systemd/system/zfs-import@.service; disabled; preset: enabled)
     Active: inactive (dead)
       Docs: man:zpool(8)

Code:
# systemctl status zfs-import@dfsfdsf
○ zfs-import@dfsfdsf.service - Import ZFS pool dfsfdsf
     Loaded: loaded (/lib/systemd/system/zfs-import@.service; disabled; preset: enabled)
     Active: inactive (dead)
       Docs: man:zpool(8)

in my case. i guess i could disable the zfs-import-scan.service, but the correct way would be to find the way to exclude a specific pool from being imported, rather than disabling the whole function.

there are settings in /etc/default/zfs, but like that file says, it's only for grub/sysv or something, and does not affect systemd.

Thanks.