ZFS pool won’t import after switching from /dev/sdx to /dev/disk/by-id because the pool now has mixed vdev paths. Some devices are recorded as /dev/sdX, others as /dev/disk/by-id/whatever. ZFS sees that as two different disks and refuses to import. The fix is simple: export the pool cleanly, then import it using only the /dev/disk/by-id directory.

Why the import fails
When you create a pool, ZFS stores the device path for each vdev. If you originally used /dev/sda, /dev/sdb, etc., those paths are baked into the pool metadata. Later you decide to switch to /dev/disk/by-id for stability, so you run zpool export poolname and then try zpool import -d /dev/disk/by-id poolname. But if you didn’t export first, or if the export didn’t clear the old paths, the pool still references /dev/sda. Now you’ve got a mix: some vdevs point to /dev/sda, others to /dev/disk/by-id/ata-WDC_WD40EFAX-68JH4N1_XXXX. ZFS won’t import a pool with mixed path types because it can’t guarantee device uniqueness.
The fix: export, then import by-id
First, make sure the pool is exported. If it’s currently imported, export it:
zpool export tank
If the pool is already showing as unavailable or faulted, you might need to force the export:
zpool export -f tank
Now import using only the by-id directory:
zpool import -d /dev/disk/by-id tank
That tells ZFS to look for devices under /dev/disk/by-id and rebuild the vdev paths using those names. After this, the pool should import cleanly and all vdevs will show /dev/disk/by-id/… paths.

Check the current paths
To see what paths your pool is currently using, run:
zpool status tank
Look at the device names in the output. If you see a mix of /dev/sdX and /dev/disk/by-id, that’s the problem. After the export/import dance, they should all be by-id.
What if it still won’t import?
Sometimes the export doesn’t clear old paths because the pool was never properly exported (e.g., after a crash or unclean shutdown). In that case, you can use the -f flag on import to force it:
zpool import -d /dev/disk/by-id -f tank
But be careful: force import can bring in a pool with missing or out-of-sync devices. Make sure all disks are present and healthy first. Check ls -l /dev/disk/by-id/ to see which disks are actually there.
My take
This is one of those ZFS quirks that bites you when you try to do the right thing. Using /dev/disk/by-id is the correct approach for a homelab because device names like /dev/sda can change between reboots, especially if you add or remove disks. But the transition has to be done in the right order: export first, then import with the new path directory. If you skip the export or do it after a crash, you get mixed paths and a pool that won’t import. Annoying, but fixable. Just remember: always export before switching device naming schemes. And if you’re doing this on Proxmox, make sure the pool isn’t in use by any VMs or containers first—otherwise the export will fail. Check out Proxmox configuration validation for related tips on avoiding storage mishaps.