Storagenode logs to RAM

Hi guys,

I’m running a storagenode on Unraid. My dockerfile is on a SSD, and I’m trying to reduce the writes from my docker logs to that SSD. I’m planning on placing the storagenode logs to /tmp (on the RAM). Is this advisable?


You may redirect your logs to the file on data storage or reduce a log level with log.level: error in your config.yaml

I assume you, @pietjebell, won’t be able to run the success rate script or the alerting monitoring then or at least they won’t fully work. If you don’t care, that’s fine. Personally I strongly recommend to monitor your node(s) in order to be able to react quickly, especially with the new auditing rules implemented recently.

I am storing the logs on an old HDD (non-NAS) and it’s working well.


Thanks for the answers! I’m not using any monitoring, so that won’t be a problem.

Can I just manually edit the config file when using dockers? Or should I use a docker environment variable?

This seems to have answered itself. I have edited the config.yaml, and it remained persistant after a docker update

Can you direct the logs to both stderr and an output file? I use dozzle and it doesnt show the logs when i output to a file.

yes, but externally. You do not redirect logs to the file in the storagenode’s configuration and tail logs to the file, i.e.

while true; do docker logs --tail 20 -f storagenode 2>> /mnt/storj/storagenode/storagenode.log; done

however this method is less reliable and requires some scripting.
You may also use a different log driver, include syslog and journald, see Configure logging drivers | Docker Documentation

1 Like