[root@hoge ~]# df -hT /tmp ファイルシス タイプ サイズ 使用 残り 使用% マウント位置 /dev/nvme0n1p6 ext4 40G 9.4G 28G 26% / [root@hoge ~]# systemctl enable tmp.mount The unit files have no installation config (WantedBy, RequiredBy, Also, Alias settings in the [Install] section, and DefaultInstance for template units). This means they are not meant to be enabled using systemctl. Possible reasons for having this kind of units are: 1) A unit may be statically enabled by being symlinked from another unit's .wants/ or .requires/ directory. 2) A unit's purpose may be to act as a helper for some other unit which has a requirement dependency on it. 3) A unit may be started when needed via activation (socket, path, timer, D-Bus, udev, scripted systemctl call, ...). 4) In case of template units, the unit is meant to be enabled with some instance name specified. [root@hoge ~]# rpm -q systemd systemd-239-13.el8_0.5.x86_64調べてみると、バグという話しです。RHEL8.1 では既に直っている模様。
https://bugzilla.redhat.com/show_bug.cgi?id=1667065
修正イメージは次の通りです。https://github.com/lnykryn/systemd-rhel/pull/275/
@@ -22,3 +22,7 @@ What=tmpfs Where=/tmp Type=tmpfs Options=mode=1777,strictatime,nosuid,nodev + +# Make 'systemctl enable tmp.mount' work: +[Install] +WantedBy=local-fs.targetということなので、systemctl edit で差分を追加すれば、応急処置できます。
[root@hoge ~]# EDITOR=vim systemctl edit tmp.mount [root@hoge ~]# systemctl cat tmp.mount # /usr/lib/systemd/system/tmp.mount # SPDX-License-Identifier: LGPL-2.1+ # # This file is part of systemd. # # systemd is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2.1 of the License, or # (at your option) any later version. [Unit] Description=Temporary Directory (/tmp) Documentation=man:hier(7) Documentation=https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems ConditionPathIsSymbolicLink=!/tmp DefaultDependencies=no Conflicts=umount.target Before=local-fs.target umount.target After=swap.target [Mount] What=tmpfs Where=/tmp Type=tmpfs Options=mode=1777,strictatime,nosuid,nodev # /etc/systemd/system/tmp.mount.d/override.conf # Make 'systemctl enable tmp.mount' work: [Install] WantedBy=local-fs.target [root@hoge ~]# systemctl enable tmp.mount Created symlink /etc/systemd/system/local-fs.target.wants/tmp.mount → /usr/lib/systemd/system/tmp.mount. [root@hoge ~]#上記はたいした内容ではないですが、やはり RHEL8.0/CentOS8.0 は、まだまだ こなれていない 印象です。業務用サーバとして使うのなら、やはり RHEL8.2 あたりからではないでしょうかね。