4 ms·
WTF, it's 2024. systemd uses tmpfs for /tmp
by ciupicri 2y ago
WTF, it's 2024. systemd uses tmpfs for /tmp
- Arnavion 2y agoIt's the default, but TFA might've masked it since they're dealing with an old laptop where they can upgrade the drive but not the RAM.
- ciupicri 2y agoYou're right, but this was introduced around 2012 [1] when that old laptop was manufactured. Also no one is forcing you to store GBs of data on it and indeed in practice most programs use only a couple of MBs. [1]: https://fedoraproject.org/wiki/Features/tmp-on-tmpfs https://fedoraproject.org/wiki/Features/tmp-on-tmpfs
- NekkoDroid 2y agoAnd if programs use GBs of data, it should usually be in /var/tmp/ as that is backed usually by an actual storage device.
- ojbyrne 2y agoI’m confused. The article talks about a Mac Mini, which is not a laptop. And an old enough one that the RAM is probably user-replaceable.
- Arnavion 2y agoApparently I'm illiterate. Indeed, not only is the Mac Mini a desktop, but also the author says in that same paragraph how they did in fact upgrade its RAM once in the past.
- KyleSanderson 2y agosame reaction, and the author not using ddrescue just makes this a tale about not following any sort of documentation when installing their distribution. There's really nothing in there that anyone should take away besides making sure they didn't hack up fstab and remove tmpfs.
- mst 2y agoHaving a "real" /tmp is not an uncommon preferences amongst sysadmins who've been at this for a while. Too many things that can wedge a system only leave evidence of why/how they did that in /tmp so still having it around post-reboot can be a huge aid to root cause analysis. It's a non-trivial trade-off but calling deliberately choosing that trade-off "hacking up fstab" doesn't strike me as a remotely fair description thereof.
- ciupicri 2y agoOut of curiosity, what are those things that might crash the system while leaving evidence in /tmp, but not logging something useful? For what it's worth, OpenBSD which could be considered conservative says this about /tmp [1]: > Temporary files that are not preserved between system reboots. Periodically cleaned by daily(8). So no one should expect those files to be stored permanently. [1]: http://man.openbsd.org/hier http://man.openbsd.org/hier
- mst 2y agoGenerally, things that write tempfiles while processing data in /tmp and manage not to log enough because they wedge the system before it occurs to the code that anything's gone wrong enough to log. Yes, absolutely, "bad software, no cookie," but the usual culprit is some sort of vendor binary where the poor sod running the system has no control over that. BSD systems generally clean out an on-disk /tmp during the normal boot process, yes. There are ways around this, but when I've been responsible for babysitting craptastic vendorware it's always been on Linux or Solaris. Personally I've (after quite some grumbling about it) accepted /tmp being on tmpfs and just live with it; my current source of crankiness is "people who don't configure their systems to write to syslog" since if the box gets wedged by an I/O storm systemd will shoot systemd-journald in the head and then journald sometimes deletes all of your previous logs as it starts up.
- ciupicri 2y agoI was hoping for some concrete examples. If I'm not mistaking journald periodically deletes old entries to keep its disk usage under control.
- mhitza 2y agoDebian doesn't seem to use tmpfs for /tmp by default.