Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


About /var/run, /run and tmpfs
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

About /var/run, /run and tmpfs

In Ubuntu 12.04 it seems that /var/run points to /run and is mounted as tmpfs, i.e. It does not persist across restarts. However, in CentOS 6.5 /var/run just resides on the regular filesystem and is not wiped upon reboot. My question: is there an advantage mounting /var/run as tmpfs? And how does the system determine its maximum size? What if it becomes full?

Comments

  • The main benefit I can think of for the Ubuntu way is that /var/run is meant for transient files such as PID and lock files, and should be cleared out upon boot. This happens for free with the Ubuntu way, being in memory, while CentOS either clears files manually, expects processes to remove their own files, or just doesn't worry about it. I'm not at a computer to check, but it's no biggie anyway.

    Thanked by 1howardsl2
  • derpderp Member
    edited January 2014

    ^ What they said. Additionally, on Debian at least, the default size is determined by the values specified in /etc/default/tmpfs. On my Debian install it uses 10% of real memory by default. Ubuntu may be different.

    If it becomes full, nothing else will be able to be written to it until you free up space. Unless you've purposefully made a decision to store a lot of data in a directory under /var/ the chances of it filling up are low.

    Thanked by 1howardsl2
Sign In or Register to comment.