[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian 13, tmpfs and /tmp, /var/tmp



On Tue, Aug 19, 2025 at 16:20:39 +0200, fred.kite.dml@mailo.com wrote:
> Indeed, /tmp is already on tmpfs. Isn't /var/tmp supposed to be as well now?

Nope.  It has never been special in that way.

> Is this tutorial still accurate?
> 
> <https://forums.debian.net/viewtopic.php?t=16450>

I'd say it's rather questionable.  It's from 2007, it explicitly says
it's "not for the beginner", and it boldly states that Debian "boots
using sys v" (this is no longer the default, though it probably was when
this was written, 18 years ago).

I also find it interesting that it does *not* include /var/tmp in the
list of directories that it's choosing to convert to tmpfs.  Instead,
it talks about converting /var/log, /var/run and /var/lock to tmpfs
file systems.  But:

 * /var/log is basically opt-in now.  You only get log files written
   there if you install the (now optional) rsyslog package.  The default
   for system logging (for some time now) is systemd's journal.  A couple
   releases ago, this was done in memory only by default, but in more
   recent releases, it was switched to write to disk by default.  If you
   really want logging to be in memory only, not on disk, it should be
   pretty easy to find out how to revert systemd-journald(8) to volatile
   logging.

 * /var/run is already a (symlink to a) tmpfs.

 * /var/lock is also a symlink to a tmpfs.

So, there's nothing in this "tutorial" that's even relevant to a current
Debian release, even if it still works, which it may or may not.

If I wanted to change /var/tmp to a tmpfs, I would start with the Trixie
release notes, at
<https://www.debian.org/releases/trixie/release-notes/issues.en.html#the-temporary-files-directory-tmp-is-now-stored-in-a-tmpfs>.

That section refers me to tmpfs(5) and systemd.mount(5), and the tmp.mount
unit.  That's where I would begin.


Reply to: