summaryrefslogtreecommitdiff
path: root/units/tmp.mount
Commit message (Collapse)AuthorAgeFilesLines
* unit: escape %Yu Watanabe2022-02-231-1/+1
| | | | Fixes #22601.
* Bump the max number of inodes for /tmp to a million tooZbigniew Jędrzejewski-Szmek2021-12-091-1/+1
| | | | | | Fixes #21626. (The bug report talks about /run, but the issue is actually with /tmp.) People use /tmp for various things that fit in memory, e.g. unpacking packages, and 400k is not much. Let's raise is a bit.
* units: adjust Descriptions of various unitsZbigniew Jędrzejewski-Szmek2021-06-301-1/+1
| | | | | | | | | | In general, it's not very usuful to repeat the unit name as the description. Especially when the word is a common name and if somebody doesn't understand the meaning immediately, they are not going to gain anything from the repeat either, e.g. "halt", "swap". In the status-unit-format=combined output parentheses are used around Description, so avoid using parenthesis in the Description itself.
* license: LGPL-2.1+ -> LGPL-2.1-or-laterYu Watanabe2020-11-091-1/+1
|
* Bump /tmp size back to 50% of RAMZbigniew Jędrzejewski-Szmek2020-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This should be enough to fix https://bugzilla.redhat.com/show_bug.cgi?id=1856514. But the limit should be significantly higher than 10% anyway. By setting a limit on /tmp at 10% we'll break many reasonable use cases, even though the machine would deal fine with a much larger fraction devoted to /tmp. (In the first version of this patch I made it 25% with the comment that "Even 25% might be too low.". The kernel default is 50%, and we have been using that seemingly without trouble since https://fedoraproject.org/wiki/Features/tmp-on-tmpfs. So let's just make it 50% again.) See 7d85383edbab73274dc81cc888d884bb01070bc2. (Another consideration is that we learned from from the whole initiative with zram in Fedora that a reasonable size for zram is 0.5-1.5 of RAM, and that pretty much all systems benefit from having zram or zswap enabled. Thus it is reasonable to assume that it'll become widely used. Taking the usual compression effectiveness of 0.2 into account, machines have effective memory available of between 1.0 - 0.2*0.5 + 0.5 = 1.4 (for zram sized to 0.5 of RAM) and 1.0 - 0.2*1.5 + 1.5 = 2.2 (for zram 1.5 sized to 1.5 of RAM) times RAM size. This means that the 10% was really like 7-4% of effective memory.) A comment is added to mount-util.h to clarify that tmp.mount is separate.
* tree-wide: add size limits for tmpfs mountsTopi Miettinen2020-05-131-1/+1
| | | | | | | | | | | | | | | | | Limit size of various tmpfs mounts to 10% of RAM, except volatile root and /var to 25%. Another exception is made for /dev (also /devs for PrivateDevices) and /sys/fs/cgroup since no (or very few) regular files are expected to be used. In addition, since directories, symbolic links, device specials and xattrs are not counted towards the size= limit, number of inodes is also limited correspondingly: 4MB size translates to 1k of inodes (assuming 4k each), 10% of RAM (using 16GB of RAM as baseline) translates to 400k and 25% to 1M inodes. Because nr_inodes option can't use ratios like size option, there's an unfortunate side effect that with small memory systems the limit may be on the too large side. Also, on an extremely small device with only 256MB of RAM, 10% of RAM for /run may not be enough for re-exec of PID1 because 16MB of free space is required.
* man,units: link up new documentation about temporary directoriesLennart Poettering2019-02-201-1/+2
|
* Add SPDX license headers to unit filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+2
|
* core: make "tmpfs" dependencies on swapfs a "default" dep, not an "implicit"Lennart Poettering2017-11-101-0/+1
| | | | | | | | | | | | There should be a way to turn this logic of, and DefaultDependencies= appears to be the right option for that, hence let's downgrade this dependency type from "implicit" to "default, and thus honour DefaultDependencies=. This also drops mount_get_fstype() as we only have a single user needing this now. A follow-up for #7076.
* mount: make sure we unmount tmpfs mounts before we deactivate swaps (#7076)Michal Sekletar2017-10-161-1/+0
| | | | | | | | In the past we introduced this property just for tmp.mount. However on todays systems usually there are many more tmpfs mounts. Most notably mounts backing XDG_RUNTIME_DIR for each user. Let's generalize what we already have for tmp.mount and implement the ordering After=swap.target for all tmpfs based mounts.
* units: do not perform m4 if not necessary (#6575)Yu Watanabe2017-08-091-0/+22
|
* units: add 'SmackFileSystemRoot=*' option into tmp.mountSangjung Woo2015-10-241-21/+0
| | | | | | | | | | If SMACK is enabled, 'smackfsroot=*' option should be specified when /tmp is mounted since many non-root processes use /tmp for temporary usage. If not, /tmp is labeled as '_' and smack denial occurs when writing. In order to do that, 'SmackFileSystemRoot=*' is newly added into tmp.mount.
* Revert "units: add 'smackfsroot=*' option into tmp.mount when SMACK is enabled"Kay Sievers2015-10-181-0/+21
| | | | | | | This reverts commit 409c2a13fd65692c611b7bcaba12e908ef7cf1e5. It breaks the bootup of systems which enable smack at compile time, but have no smack enabled in the kernel. This needs a different solution.
* units: add 'smackfsroot=*' option into tmp.mount when SMACK is enabledSangjung Woo2015-10-151-21/+0
| | | | | | | If SMACK is enabled, 'smackfsroot=*' option should be specified in tmp.mount file since many non-root processes use /tmp for temporary usage. If not, /tmp is labeled as '_' and smack denial occurs when writing.
* units: skip mounting /tmp if it is a symlinkLennart Poettering2014-06-301-0/+1
| | | | | We shouldn't get confused if people have symlinked /tmp somewhere, so let's simply skip the mount then.
* units: add reference to new wiki page to all api mount unitsLennart Poettering2013-01-151-0/+1
|
* units: don't order tmp.monut after local-fs-pre.targetTom Gundersen2012-10-231-1/+3
| | | | Since tmp.mount is a tmpfs this is not necesary, and should speed up boot marginally.
* man: add Documentation= tag to tmp.mountLennart Poettering2012-06-271-0/+1
|
* relicense to LGPLv2.1 (with exceptions)Lennart Poettering2012-04-121-2/+2
| | | | | | | | | | | | | | We finally got the OK from all contributors with non-trivial commits to relicense systemd from GPL2+ to LGPL2.1+. Some udev bits continue to be GPL2+ for now, but we are looking into relicensing them too, to allow free copy/paste of all code within systemd. The bits that used to be MIT continue to be MIT. The big benefit of the relicensing is that closed source code may now link against libsystemd-login.so and friends.
* enable proper access timestamps on all tmpfs mountsKay Sievers2012-04-111-1/+1
|
* units: mount /tmp as tmpfsKay Sievers2012-03-271-0/+16
| | | | | | | | | | | | | The default setups should be a stateless as possible. /tmp as tmpfs is the intended default for general purpose systems. Small temporary files should not be stored on disk; lager files, or files which should potentially survive a reboot, belong into /var/tmp. Also catch up with some good old UNIX history. More details are here: https://fedoraproject.org/wiki/Features/tmp-on-tmpfs
* delete tmp.mount which may conflict with an unrelated fstab entryKay Sievers2010-11-151-16/+0
|
* units: add optional tmp.serviceKay Sievers2010-09-221-3/+0
|
* units: add tmp.mountKay Sievers2010-08-171-0/+19