[Mageia-dev] /run vs /var/run in configuration files

Colin Guthrie mageia at colin.guthr.ie
Tue Sep 11 13:44:28 CEST 2012


'Twas brillig, and Guillaume Rousse at 11/09/12 11:47 did gyre and gimble:
> Le 11/09/2012 12:23, Sander Lepik a écrit :
>> 11.09.2012 13:15, Guillaume Rousse kirjutas:
>>> [...]
>>>
>>> The /run - /var/run merge (/usrmove) is supposed to make the change
>>> transparent for applications. Manually converting applications to
>>> explicitely refers to the new location doesn't change its usefulness.
>>>
>> Well, if your system can't mount /var for some reason then keeping
>> things on /run might make recovery easier.

> Then we probably should not refer to systemd directory as
> /usr/lib/systemd, but as /lib/systemd for exactly the same reason.

I don't really see the comparison here.

systemd is build to use /usr/lib/systemd these days, so it's technically
incorrect to refer to it as anything else (of course technically
incorrect != practically incorrect!)

> Also, the usefulness of an available /run when /var is quite discutable,
> whereas its main purpose is to store pid files for backgroud processes,
> most of them using /var/lib for storing their data.

Well, not just pid files. It also stores socket files which are critical
for IPC and such like and is an important bridge between initrd and the
real rootfs.

Personally I'm more in favour of using /run directly and adding lint
rules that cause a build failure if files are packaged in either
/var/run or /run.

If nothing else it's marginally more efficient to use /run. No spinning
media stat required to dereference the index. In extreme cases, it will
help extend battery life. The benefits are tiny I'm sure, but it does
depend on context/setup and if there is no other tangible reasons, maybe
even this small advantage is enough to sway in one direction rather than
the other!

Col




-- 

Colin Guthrie
colin(at)mageia.org
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/


More information about the Mageia-dev mailing list