Hello Ulrich :-)

On 02/10/2025 20.32, Ulrich Wisser via knot-resolver-users wrote:

I run my knot-resolver on a raspberry pi with pxe boot and the root file system on nfs.

I realize that this is not recommended operations.

Therefore I try to run my cache on an tmpfs file system.

Good.


> tmpfs on /var/cache/knot-resolver type tmpfs (rw,relatime,size=102400k)

But now my knot-resolver refuses to start

Oct  2 20:14:39 pi-hole1 systemd[1]: Starting Knot Resolver daemon...
Oct  2 20:14:40 pi-hole1 kresd[1052]: [system] error while loading config: /etc/knot-resolver/kresd.conf:69: can't open cache path '/var/cache/knot-resolver'; working directory '/var/lib/knot-resolver'; No space left on device (workdir '/var/lib/knot-resolver')
Oct  2 20:14:40 pi-hole1 systemd[1]: kresd@1.service: Main process exited, code=exited, status=1/FAILURE
Oct  2 20:14:40 pi-hole1 systemd[1]: kresd@1.service: Failed with result 'exit-code'.
Oct  2 20:14:40 pi-hole1 systemd[1]: Failed to start Knot Resolver daemon.

Besides the fact that this message makes no sense (why wouldn't the cache be opened in /var/cache when /var/lib is full?), the cache gets actually opened and a database created. The kres-cache-gc process runs without problems. 

The /var/lib/knot-resolver directory exists and is writeable. 


It says  cache path '/var/cache/knot-resolver'; - i.e. it attempts to open in the location you wanted.  You get confused by workdir which we add into some class of error messages as additional information - because it's relevant in particular if you used relative paths in your configuration - but that's not the case here.


Are you sure that size=102400k tmpfs will fit a file of size 100 MiB (+ there's a helper lockfile of several kilobytes)?

I don't think it will fit.  100*MB == 104857600 == 102400*1024.  And I see that "No space left on device" anyway.


--Vladimir