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?

MadHatter
  • 81,580

3 Answers3

16

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

Pavel
  • 1,098
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.

sciurus
  • 12,958
  • 3
  • 33
  • 51
2

In Fedora, /var/run is a symbol link to /run, which is mounted as a tmpfs.

$ ls -l /var/run
lrwxrwxrwx. 1 root root 6 Oct 20  2020 /var/run -> ../run

$ df /run Filesystem 1K-blocks Used Available Use% Mounted on tmpfs 3143236 3180 3140056 1% /run

So it gets cleaned after shutdown.

thetaprime
  • 121
  • 2