Root on ZFS - is it normal to not have a (ZFS) cachefile defined for the rpool?

ZPrime

New Member
Apr 29, 2021
12
5
3
44
Cleveland, Ohio, USA
My system is just a single node, running with a pair of SSDs in a ZFS mirror. It was setup as 100% ZFS using the Proxmox installer.

I wanted to run zdb to check on some info about the pool (specifically I was curious about the ashift / block size setting).

zdb comes back with this error:
cannot open '/etc/zfs/zpool.cache': No such file or directory

Now, I'm kind of thinking this might be expected behavior - presumably with root on ZFS, we're booting from a temporary ramdisk, and i don't know how it'd be possible to read in a cachefile from that scenario?

Or is there some way to set the cachefile and make everything work nicely... and if so, why wasn't this done by the installer?
 
Last edited:
you don't need a cache file for zdb to work - which command did you want to run?

a cache file mainly makes sense on systems with lots of (possibly irrelevant) storage attached, as without it, the system will scan *all block devices* on bootup, importing any found zpools, which can take a while ;)
 
I wanted to run zdb -C against the rpool. Eventually I found the -e flag which makes it work... I just found it odd that there was no cachefile configured by default.
 
Hey @ZPrime, would you mind sharing an example of the command(s) that works for you? :)
I have a couple pools and only one is recognized by zdb. Idk why. The pools were created with different versions of zfs but I don't see a clear reason.
 
you don't need a cache file for zdb to work - which command did you want to run?

a cache file mainly makes sense on systems with lots of (possibly irrelevant) storage attached, as without it, the system will scan *all block devices* on bootup, importing any found zpools, which can take a while ;)
I want to run
# zdb -b local-ZFS-SSD
zdb: can't open 'local-ZFS-SSD': No such file or directory
but it does not work. :(

upd:
zdb -b -e local-ZFS-SSD
works just fine.
 
Last edited:
I want to run
# zdb -b local-ZFS-SSD
zdb: can't open 'local-ZFS-SSD': No such file or directory
And this is a "cachefile" related problem? It is better to open a new thread for new topics ;-)

There is no pool named "local-ZFS-SSD".

What gives zpool import? Full output please. Please use [code]...[/code]-tags for this.

man zpool-import gives some additional information.