Linking /var/log to a nfs mount or another disk

bly

Member
Mar 15, 2024
54
13
8
I'd like the writes in /var/log go to a disk dedicated to the scope, on a test node I tried both a nfs mount and another physical disk inside the node as link targets and both ways it "seems" are working.

I am a bit vary about the NFS, because at boot until the share is up I cannot have logs and I don't know if this can break things or "just" have no logs until the path is working.

Third option, is to mount the nfs directly over /var/log so until the nfs path is up the server is using the regular file system.

Someone has any hint about it?
 
Last edited:
What is the end goal or what problem are you trying to solve for?

I'd recommend you keep the logs on a dedicated local disk or at the very least dedicated local partition, never seen anything great come from a remote share hosted /var/log.

Perhaps you could look into log shipping or hosting an rsyslog server to keep things in a different place instead?
 
Yep I did think at a rsyslog too, will give it a try.

I just want to figure out how to minimize the writes on the mmc/sd boot disk (it's a test machine I am torturing daily) and logs feels they are the main activity there.