We are looking to minimize wear on our SD card because currently we are logging to a shared persistent volume. Ideally we would like to keep logging these messages, but some of them are not important to survive after the device reboots. Sending the unimportant logs to a file in a
tmpfs location seems like a good solution to my knowledge. The only downside I can see is that this cannot be shared between the services.
I’ve seen some posts on using a
tmpfs volume in our
docker-compose.yml file, here, but wasn’t sure if this is the best option after seeing the existing
tmpfs mounts in the container. Is it better to create our own
tmpfs volume or can I use an existing one? Also wanted to see if there is any more information about the inconsistent behavior of the
/tmp directory mentioned here. This behavior seems to still apply with the small amount of testing I have done on balenaOS 2.43.0.