I am running a FC18 machine on which I am testing a piece of software (smf-sav, a milter) keeping part of its working files under /var/run/smf-sav/.

That directory keeps disappearing after reboots. Hence the question: what is removing it? Is there a way to mark it permanent?

  • Can you paste the output of df -k on that machine into your question? – MadHatter Oct 18 '13 at 11:30
  • 1
    If you software is keeping part in /var/run subdirectory, then repair your system. /var/run is supposed to be clear, period. Refer to refspecs.linuxfoundation.org/FHS_2.3/… – jirib Oct 18 '13 at 11:40
  • The software is by no means "mine". Also keeping sockets under /var/run/<milter-name>/milter-name.sock appears to be somewhat of a standard for milters (see clmav-milter, spamass-milter, etc.) I just noticed their lates startup scripts recreate the dir at boot time. – Alien Life Form Oct 18 '13 at 13:16
up vote 12 down vote accepted

The software should define what directories it needs in /run (which replaced /var/run in Fedora 15) by placing a configuration file in /usr/lib/tmpfiles.d. During the boot process, systemd-tmpfiles populates /run based on that confguration.

/var/run is usually mounted as tmpfs, which is a partition mapped into your RAM. Obviously RAM gets cleared on reboot, so do all tmpfs file systems.

http://fedoraproject.org/wiki/Features/var-run-tmpfs

You should consider storing your application data on a persistent file system e.g. mounted on a hard disk.

  • The app is not mine. Also keeping sockets under /var/run/<milter-name>/milter-name.sock appears to be somewhat of a standard for milters (see clmav-milter, spamass-milter, etc.) I just noticed their latest startup scripts recreate the dir at boot time. – Alien Life Form Oct 18 '13 at 13:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.