Proxmox tries to import ZFS Pool belonging to TrueNAS VM?

JackSpidy

New Member
Apr 14, 2023
3
0
1
So I've got Proxmox running with a TrueNAS VM, I've followed the Proxmox Wiki page for passing disks through, and then set those disks up in TrueNAS, and works great, but when the node is rebooted, Proxmox seems to try and fail to grab the ZFS pool that TrueNAS has created, and on the TrueNAS VMs first autostart it doesn't seem to launch correctly, on a second bootup of the VM however, it seems fine, the VM picks up the drives and the pool is available over network with no problems.

Is there any way to stop Proxmox from seeing and trying to grab these drives? It's not like the node gets shut off too often, but I do occasionally turn it off when I'm out for weekends or know I won't be accessing any of it's services, and it just concerns me a bit with the drives getting dragged around like that and all. Thanks in advance!
 
I am in the same situation after a power failure. The difference is, that my Proxmox doesn't start anymore (it starts, but I have no zfs or VMs)
 
So I've got Proxmox running with a TrueNAS VM, I've followed the Proxmox Wiki page for passing disks through, and then set those disks up in TrueNAS, and works great, but when the node is rebooted, Proxmox seems to try and fail to grab the ZFS pool that TrueNAS has created, and on the TrueNAS VMs first autostart it doesn't seem to launch correctly, on a second bootup of the VM however, it seems fine, the VM picks up the drives and the pool is available over network with no problems.

Is there any way to stop Proxmox from seeing and trying to grab these drives? It's not like the node gets shut off too often, but I do occasionally turn it off when I'm out for weekends or know I won't be accessing any of it's services, and it just concerns me a bit with the drives getting dragged around like that and all. Thanks in advance!
could you be more specific what proxmox seems to do here?

what's the name of the truenas pool?

any output from the logs/console with the appropriate error?

afaik, proxmox does not automatically import zfs pools on boot which are in use by different system. zfs also has some mechanism inside to avoid this
 
hey guys, did you resolve this issue ? i probabliy have similar one.. i get this on my proxmox:

zfs-import-cache.service - Import ZFS pools by cache file
Loaded: loaded (/lib/systemd/system/zfs-import-cache.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Fri 2024-01-12 14:37:13 CET; 1h 31min ago
Docs: man:zpool(8)
Main PID: 127694 (code=exited, status=1/FAILURE)
CPU: 33ms

Jan 12 14:37:02 proxmox zpool[127694]: cannot import 'nas': pool was previously in use from another system.
Jan 12 14:37:02 proxmox zpool[127694]: Last accessed by (hostid=263e26e7) at Fri Jan 12 14:36:32 2024
Jan 12 14:37:02 proxmox zpool[127694]: The pool can be imported, use 'zpool import -f' to import the pool.
Jan 12 14:37:13 proxmox zpool[127694]: cannot import 'nas': pool was previously in use from another system.
Jan 12 14:37:13 proxmox zpool[127694]: Last accessed by (hostid=263e26e7) at Fri Jan 12 14:37:00 2024
Jan 12 14:37:13 proxmox zpool[127694]: The pool can be imported, use 'zpool import -f' to import the pool.
Jan 12 14:37:13 proxmox zpool[127694]: cachefile import failed, retrying
Jan 12 14:37:13 proxmox systemd[1]: zfs-import-cache.service: Main process exited, code=exited, status=1/FAILURE
Jan 12 14:37:13 proxmox systemd[1]: zfs-import-cache.service: Failed with result 'exit-code'.
Jan 12 14:37:13 proxmox systemd[1]: Failed to start zfs-import-cache.service - Import ZFS pools by cache file.

'nas' is my pool in truenas VM.. dont know where it reads from..

i dont want to import any pool to proxmox at all..
 
Last edited:
I have disabled the service
root@proxmox:~# systemctl list-unit-files --all|grep scan
zfs-import-scan.service disabled disabled

but still systamctl say its enabled:

root@proxmox:~# systemctl status zfs-import-cache
× zfs-import-cache.service - Import ZFS pools by cache file
Loaded: loaded (/lib/systemd/system/zfs-import-cache.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-01-15 07:43:26 CET; 1min 29s ago
Docs: man:zpool(8)
Process: 683 ExecStart=/sbin/zpool import -c /etc/zfs/zpool.cache -aN $ZPOOL_IMPORT_OPTS (code=exited, status=1/FAILURE)
Main PID: 683 (code=exited, status=1/FAILURE)
CPU: 29ms

anything else i can do ?
 
zfs-import-cache and zfs-import-scan are two different services...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!