On 2/23/23 09:19, Jonathan Billings wrote:
On Feb 23, 2023, at 08:45, Robert Nichols
<rnicholsNOSPAM(a)comcast.net> wrote:
>
> If I want to use a tmpfs for /tmp, I can just enable the systemd tmp.mount unit and
get the default size limit of 1/2 of memory. If I want to reduce that limit, I either have
to fiddle with a systemd override or else put a line in /etc/fstab just as in the days
before systemd, and the systemd unit will respect the size option there.
>
> But, that line in /etc/fstab can do the job on its own, so what's the point of
enabling the tmp.mount unit?
Putting a line in /etc/fstab is a functional equivalent of creating a tmp.mount that
overrides the packaged one.
When you have a line in fstab, on boot the systemd fstab generator creates a tmp.mount
file in /run/systemd/ that overrides the OS tmp.mount. Any x-systemd mount options get
translated into proper systemd options.
Thanks for the explanation. Separately enabling tmp.mount would be superfluous, and I just
discovered that systemctl doesn't even _let_ you do that if you have booted with an
fstab /tmp on tmpfs:
# systemctl enable tmp.mount
Failed to enable unit: Unit /run/systemd/generator/tmp.mount is transient or
generated.
--
Bob Nichols "NOSPAM" is really part of my email address.
Do NOT delete it.