:: Re: [DNG] Tmpfs
Forside
Slet denne besked
Besvar denne besked
Skribent: Martin Steigerwald
Dato:  
Til: dng
Emne: Re: [DNG] Tmpfs
Hi!

Kevin Chadwick via Dng - 05.06.24, 16:15:43 CEST:
> What do people think of this
>
> https://news.itsfoss.com/debian-13-tmp-mounting/
>
> Personally I have had timed cleanup cause issues with Flutter
> development before (probably fixed).


I disagree with automatic cleaning after several days. Not strongly,
but I disagree.

I have /tmp on tmpfs in /etc/fstab as follows:

tmpfs           /tmp            tmpfs   size=40%        0       0


(this laptop has a silly 32 GiB of RAM :)

No need for cleaning up files there.

I expect files in /var/tmp to stay where they are. It has been that way
for me for ages and I expect this to be this way in the future. I do not
put any important files there, so it would not be a great loss, but I
still for example have a fio job file there to test fio when I upgrade
the package for example. Of course I could put this into a different
dir.

So it is not a very strong preference for me however.

However… I still dislike the amount of implicit policy. Of course the
directory is named "tmp" and you should be cautious. And yeah,
I also could not resist grinning a bit as I read in debian-user-german
mailing list that a user lost some data they moved from $HOME to
tmp directory cause $HOME was running full. However… "/var/tmp"
has never been cleaned before on the Debians and Devuans I use(d)…
and no one is really explicitly telling Linux desktop users that their
files my get deleted if they store them there. Sure the directory has
"tmp" in its name, but "tmp" does not automatically mean "autodelete".
It means temporary, but does not declare whether it would be the user
or the system or both being responsible for the temporary bit. The
name "tmp" does not really yell "we delete your files" to the user.

On AmigaOS it was clear in the sense that they called the ram disk well
"Ram Disk"¹. If you understand what RAM means, you get that its lost on
switching off and possibly a reboot. (AmigaOS also has a (non default)
RAM disk driver that does survive a soft reset.)

But why do I even argue about usability here. :) Linux is still a system
that is based on UNIX concepts (not code, concepts). And I bet the
inventors of UNIX did not have the typical desktop user of the current
times in their mind. You bolt a desktop environment on top of Linux
all the way you want… below the surface Linux will not really be as
user friendly as AmigaOS :)

Sometimes I would love to start a new OS out of the lessons learned…
but that is a huge and big undertaking. And it reminds me a bit of:

https://xkcd.com/927/

As I saw in a systemd related NEWS entry, this is implemented through
systemd. So I do not even think this applies to Devuan. So I think for
Devuan Excalibur there is no change about tmp directories so far.

"systemd (256~rc3-3) unstable; urgency=medium" in:

https://salsa.debian.org/systemd-team/systemd/-/blob/debian/master/debian/NEWS


[1] They really had the space in there to deliberately break any and
all Installer scripts that break with spaces in path names. They managed
to annoy users much more than developers I bet. A usual workflow for
Amiga users is to unpack some software archive into "Ram Disk" and click
on the installation icon :). Of course a broken Installer script usually
did not fail right at the beginning of the installation procedure but after
the user invested a little work already to configure the installation.

Best,
--
Martin