Phantom pool imports at boot - should I recreate /boot/zfs/zpool.cache as a symlink to /data/zfs/zpool.cache?

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
My server insists on trying to install non-existant pools at boot. I came across this old post from 2013. The last 2 posts in that thread say that /boot/zfs/zpool.cache should be a symlink to /data/zfs/zpool.cache. But in my case it isn't. It looks like corrective action is needed, but I'm not 100% sure of the implications of doing that, to dive in without checking.

Relevant dmesg:

Beginning ZFS volume imports
Importing 13905614667333621281
cannot import '13905614667333621281': no such pool available
cannot import '13905614667333621281': no such pool available
Importing **********
Relevant command output:

# ls -la /boot/zfs/zpool.cache
-rw-r--r-- 1 root wheel 1,792 2019-01-10 17:19:48 /boot/zfs/zpool.cache
# ls -la /data/zfs/zpool.cache
-rw-r--r-- 1 root www 11,456 2019-01-10 17:26:09 /data/zfs/zpool.cache
# zpool get cachefile
NAME PROPERTY VALUE SOURCE
********* cachefile /data/zfs/zpool.cache local
******** cachefile /data/zfs/zpool.cache local
freenas-boot cachefile - default
# sqlite3 /data/freenas-v1.db "select * from storage_volume"
<lists just the correct 2 pools that should exist>
What's needed to fix this? Delete the boot cache and recreate as a smylink to the /data one, as in that thread?

Is that still safe (we're now 2019 not 2013), and do I need to do more?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Have you run zpool export pool_id for the relevant pool IDs?
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
I'm doing a send/rcv so I cant test by rebooting for a couple of days. Ill try that then.

But it sounds odd, looking for a pool in an unspecified zfs cache, and potential for it to desync again if I move the pool to another system, when I'm wondering, should the system really have 2 separate cache files on the boot/system pool, with apparently inconsistent contents?

What should I actually be seeing? 2 cache files in /boot and /data, or just one?
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
What should I actually be seeing? 2 cache files in /boot and /data, or just one?
It's a good question, and I have the feeling this might need a bug report so the devs can fix it and chime in.
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
Top