/etc/default/tmpfs, tmpfs for /tmp etc. Howto in systemd?
U.Mutlu
for-gmane at mutluit.com
Sat Mar 30 21:08:32 GMT 2019
U.Mutlu wrote on 03/30/2019 08:34 PM:
> Hello,
>
> in /etc/default/tmpfs one can set /tmp to a tmpfs and give it a size from the
> avail RAM.
> But with systemd this no longer works :-(
> Is there an equivalent solution in systemd?
I found a better (generic; back-to-the-roots) solution for /tmp:
This is my raspi-like little router device with dual core ARMv7-a SoC
with u-boot, fresh linux kernel 5.0.5, and debootstrap'ed debian 8 (jessie):
# uname -a
Linux r1-3 5.0.5 #1 SMP Sat Mar 30 05:34:40 CET 2019 armv7l GNU/Linux
# cat /etc/fstab
tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=64M 0 0
...
But, I don't know where the other tmpfs-mounts below are defined.
They are not defined in my /etc/fstab, and in /etc/default/tmpfs everything is
explicitly disabled (not just commented with #),
but then the documentation (comments) in /etc/default/tmpfs
does not reflect reality: b/c /run/lock should not be mounted, instead be part
of /run (according to above Debian doc/comment):
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 1.4G 567M 725M 44% /
devtmpfs 453M 0 453M 0% /dev
tmpfs 501M 0 501M 0% /dev/shm
tmpfs 501M 14M 487M 3% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 501M 0 501M 0% /sys/fs/cgroup
tmpfs 64M 0 64M 0% /tmp
And as can be seen below:
oh boy, so much crap on such an innocent small device, all done by this huge
systemd sh*t!!! :
# mount
/dev/mmcblk0p2 on / type ext4 (rw,relatime)
devtmpfs on /dev type devtmpfs
(rw,relatime,size=463096k,nr_inodes=115774,mode=755)
sysfs on /sys type sysfs (rw,relatime)
proc on /proc type proc (rw,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup
(rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpuset type cgroup
(rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup
(rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/memory type cgroup
(rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/devices type cgroup
(rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup
(rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup
(rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/perf_event type cgroup
(rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs
(rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,noatime,size=65536k)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,relatime)
tracefs on /sys/kernel/debug/tracing type tracefs (rw,relatime)
> And: has Debian communicated this important change/break to its user base?
>
> Thx
More information about the Pkg-systemd-maintainers
mailing list