Re: Best place for per-daemon log files?

From: Colin Booth <colin_at_heliocat.net>
Date: Wed, 17 Sep 2025 17:53:24 +0000

On Wed, Sep 17, 2025 at 10:33:12PM +0500, zyxhere💭 wrote:
> On Wed, 2025-09-17 at 17:10 +0000, Colin Booth wrote:
> > On Wed, Sep 17, 2025 at 06:23:55PM +0300, Peter Pentchev wrote:
> > > There may be a bit of a misconception or miscommunication here.
> > > On Linux systems, /run is practically certaion to be mounted on
> > > a tmpfs of some kind: its explicit purpose is to be volatile,
> > > for this boot only. It is similar to /var/run, but one of its main
> > > advantages is that it will always be cleaned upon boot.
> > > See e.g. https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s15.html
> > On most modern systems /var/run is a symlink to /run (or ../run, which
> > is the same in practice) so they aren't similar but in fact identical.
> > Other than that everything you said is 100% spot on, using anything
> > run-related will result in data loss on reboot.
> I'm more interested in knowing what void linux is doing not mounting
> /run as a tmpfs
>
> Also I think some BSDs still mount /var/run as a normal directory (they
> don't have the /run symlink too).

I don't know about other people's Void installs, but my void install
aboslutely has /run as a tmpfs. It's managed by 00-pseudofs.sh, which
does the following after mounting proc and sys:
mountpoint -q /run || mount -o mode=0755,nosuid,nodev -t tmpfs run /run

If someone has a non-tmpfs /run on void it's because they've made some
changes in goofy places. Re-reading this thread though the thing that
Steve is confused about is that /run/user already exists and that's
because on void it's created by line 8 of the above script:
carbon:/etc/runit/core-services$ grep -n '/run/user' *
00-pseudofs.sh:8:mkdir -p -m0755 /run/runit /run/lvm /run/user /run/lock /run/log /dev/pts /dev/shm

No magic here, just mkdir.
-- 
Colin Booth
Received on Wed Sep 17 2025 - 19:53:24 CEST

This archive was generated by hypermail 2.4.0 : Wed Sep 17 2025 - 19:53:53 CEST