ZFS pool import fails on boot, but appears to be imported after

i have also come across this issue today

- fresh install of pve 8.1 inside a VM
- zfs rootfs (rpool)
- added a single disk and put zfs on that via pve gui (name testzfs)
- reboot

getting several of these on reboot

Feb 13 21:48:27 pve systemd[1]: Starting zfs-import-cache.service - Import ZFS pools by cache file...
Feb 13 21:48:27 pve systemd[1]: zfs-import-scan.service - Import ZFS pools by device scanning was skipped because of an unmet conditi>
Feb 13 21:48:27 pve systemd[1]: Starting zfs-import@testzfs.service - Import ZFS pool testzfs...
Feb 13 21:48:27 pve zpool[521]: cannot import 'testzfs': pool already exists
Feb 13 21:48:27 pve systemd[1]: zfs-import@testzfs.service: Main process exited, code=exited, status=1/FAILURE
Feb 13 21:48:27 pve systemd[1]: zfs-import@testzfs.service: Failed with result 'exit-code'.
Feb 13 21:48:27 pve systemd[1]: Failed to start zfs-import@testzfs.service - Import ZFS pool testzfs.
Feb 13 21:48:27 pve systemd[1]: Finished zfs-import-cache.service - Import ZFS pools by cache file.
Feb 13 21:48:27 pve systemd[1]: Reached target zfs-import.target - ZFS pool import target.


did some "zpool export testzfs" and the pool reappeared automatically.

after that, the error was gone and not reproducable any more.

then i deleted testzfs pool and wipefs'd /dev/sdb - and recreated zpool via gui with new name "testzfs2"

on reboot, the error is back, but not with "pool already exists" but with "no such pool available". but it's there after boot - and mounted

Feb 13 22:41:53 pve systemd[1]: Starting zfs-import@testzfs2.service - Import ZFS pool testzfs2...
Feb 13 22:41:53 pve systemd[1]: Finished ifupdown2-pre.service - Helper to synchronize boot up for ifupdown.
Feb 13 22:41:53 pve zpool[514]: cannot import 'testzfs2': no such pool available
Feb 13 22:41:53 pve systemd[1]: zfs-import@testzfs2.service: Main process exited, code=exited, status=1/FAILURE
Feb 13 22:41:53 pve systemd[1]: zfs-import@testzfs2.service: Failed with result 'exit-code'.
Feb 13 22:41:53 pve systemd[1]: Failed to start zfs-import@testzfs2.service - Import ZFS pool testzfs2.
Feb 13 22:41:53 pve systemd[1]: Finished zfs-import-cache.service - Import ZFS pools by cache file.

another "zpool export testzfs2" and - voila - the error is gone again.

@Stoiko Ivanov

also see

https://forum.proxmox.com/threads/gelöst-problem-mit-zfs-zpool-cache.122980/
 

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!