14

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?

3
  • Can you paste the output of df -k on that machine into your question?
    – MadHatter
    Oct 18, 2013 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, 2013 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. Oct 18, 2013 at 13:16

2 Answers 2

16

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.

14

/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.

1
  • 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. Oct 18, 2013 at 13:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .