zfs-import@.service failing to import a zfs pool that no-longer exists

Feb 20, 2025
19
9
3
I am new to Proxmox. When I was testing I setup a zfs pool, but later wanted to remove it as I wanted to change the ashift value and zpool name.
I couldn't work out how to do it and was impatient, so I just deleted the partitions via CLI and rebooted. Thankfully, I now know the correct way of removing storage from Proxmox.

The problem is that now I have a systemd service that is still trying to import the name of the old zfs pool that no longer exists anywhere. It was called "tank" and was using ashift=9. The same mirrored pair of disks is now called "vmpool" with ashift=12.

Code:
root@gvpve01:/lib/systemd/system# systemctl status --failed
× zfs-import@tank.service - Import ZFS pool tank
     Loaded: loaded (/lib/systemd/system/zfs-import@.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Thu 2025-02-20 18:08:19 AEDT; 6h ago
       Docs: man:zpool(8)
    Process: 2515 ExecStart=/sbin/zpool import -N -d /dev/disk/by-id -o cachefile=none tank (code=exited, status=1/FAILURE)
   Main PID: 2515 (code=exited, status=1/FAILURE)
        CPU: 60ms

Feb 20 18:08:19 gvpve01 systemd[1]: Starting zfs-import@tank.service - Import ZFS pool tank...
Feb 20 18:08:19 gvpve01 zpool[2515]: cannot import 'tank': no such pool available
Feb 20 18:08:19 gvpve01 systemd[1]: zfs-import@tank.service: Main process exited, code=exited, status=1/FAILURE
Feb 20 18:08:19 gvpve01 systemd[1]: zfs-import@tank.service: Failed with result 'exit-code'.
Feb 20 18:08:19 gvpve01 systemd[1]: Failed to start zfs-import@tank.service - Import ZFS pool tank.
root@gvpve01:/lib/systemd/system# zpool status


How can I clean this up properly, without having to re-install, or affect my current pools? Thank you!!
 
Excellent that's done the trick thank you. For anyone else with the problem I did this...
Code:
root@gvpve01:~# systemctl disable --now zfs-import@tank.service
Removed "/etc/systemd/system/zfs-import.target.wants/zfs-import@tank.service".

After shutting down my VMs I did this:
Code:
mv /etc/zfs/zpool.cache /etc/zfs/zpool.cache.old

Then rebooted. After rebooting I saw there was a new zpool.cache file, so deleted the old one.
 
  • Like
Reactions: Oliv3 and jamesn