Troubleshooting steps for RTF degraded state due to systemd-tmpfiles-clean.service.
gravity enter
$ systemctl status systemd-tmpfiles-clean.service
● systemd-tmpfiles-clean.service - Cleanup of Temporary Directories
Loaded: loaded (/lib/systemd/system/systemd-tmpfiles-clean.service; static; vendor preset: enabled)
Active: inactive (dead) since Thu 2021-12-02 00:49:08 UTC; 4h 28min ago
Docs: man:tmpfiles.d(5)
man:systemd-tmpfiles(8)
Process: 64118 ExecStart=/bin/systemd-tmpfiles --clean (code=exited, status=0/SUCCESS)
Main PID: 64118 (code=exited, status=0/SUCCESS)
Dec 02 00:49:08 ip-172-31-0-9.ap-northeast-2.compute.internal systemd[1]: Starting Cleanup of Temporary Directories...
Dec 02 00:49:08 ip-172-31-0-9.ap-northeast-2.compute.internal systemd[1]: systemd-tmpfiles-clean.service: Succeeded.
Dec 02 00:49:08 ip-172-31-0-9.ap-northeast-2.compute.internal systemd[1]: Started Cleanup of Temporary Directories.
3. If the last execution failed, trigger the service again manually (by starting it) and confirm (check status again) if it is still failing.
systemctl start systemd-tmpfiles-clean.service systemctl status systemd-tmpfiles-clean.service4. If the service/job is still failing, run the below command to execute it manually with debug logging.
SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --cleanSample output:
$ SYSTEMD_LOG_LEVEL=debug systemd-tmpfiles --clean Looking for configuration files in (higher priority first): /etc/tmpfiles.d /run/tmpfiles.d /usr/local/lib/tmpfiles.d /usr/lib/tmpfiles.d /lib/tmpfiles.d Reading config file "/usr/lib/tmpfiles.d/dbus.conf"… Reading config file "/usr/lib/tmpfiles.d/debian.conf"… Reading config file "/usr/lib/tmpfiles.d/home.conf"… Reading config file "/usr/lib/tmpfiles.d/journal-nocow.conf"… Reading config file "/usr/lib/tmpfiles.d/legacy.conf"… Ignoring entry r! "/forcefsck" because --boot is not specified. Ignoring entry r! "/fastboot" because --boot is not specified. Ignoring entry r! "/forcequotacheck" because --boot is not specified. Reading config file "/usr/lib/tmpfiles.d/lvm2.conf"… ... Running clean action for entry d /run/sendsigs.omit.d Running clean action for entry L /etc/mtab Running clean action for entry Q /home Running clean action for entry q /srv Running clean action for entry L /var/lock ... etc.Analyse the output to determine why the job is failing.
vi /lib/systemd/system/systemd-tmpfiles-clean.service7. Add (Environment="SYSTEMD_LOG_LEVEL=debug") to the [Service] section of the file.
[Unit] Description=Cleanup of Temporary Directories Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8) DefaultDependencies=no Conflicts=shutdown.target After=local-fs.target time-sync.target Before=shutdown.target [Service] Type=oneshot ExecStart=/bin/systemd-tmpfiles --clean SuccessExitStatus=65 IOSchedulingClass=idle Environment="SYSTEMD_LOG_LEVEL=debug"8. Reload the daemon and start the service to make sure debug is working. In the output of the status command, there should be more details.
systemctl daemon-reload systemctl start systemd-tmpfiles-clean systemctl status systemd-tmpfiles-cleanThe additional debug logs can be viewed in full using journalctl.
> journalctl -u systemd-tmpfiles-clean.service ... Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry z /var/log/journal Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry d /var/log Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry d /var/spool Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry d /var/cache Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Failed to determine whether '/var/tmp/systemd-private-18308ee298584729b5ae914296 Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry X /var/tmp/systemd-private-18308ee298584729b5ae91 Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Failed to determine whether '/var/tmp/systemd-private-18308ee298584729b5ae914296 Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry x /var/tmp/systemd-private-18308ee298584729b5ae91 Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry d /var/lib Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry L /var/run Dec 03 06:04:40 ip-172-31-0-9.ap-northeast-2.compute.internal systemd-tmpfiles[36897]: Running clean action for entry q /var ...
/bin/systemd-tmpfiles --cat-configSample output:
$ /bin/systemd-tmpfiles --cat-config | grep -iv "^#\|^$" L /var/lib/dbus/machine-id - - - - /etc/machine-id L /run/shm - - - - /dev/shm d /run/sendsigs.omit.d 0755 root root - L+ /etc/mtab - - - - ../proc/self/mounts Q /home 0755 - - - q /srv 0755 - - - h /var/log/journal - - - - +C h /var/log/journal/%m - - - - +C h /var/log/journal/remote - - - - +C L /var/lock - - - - ../run/lock d /run/lock/subsys 0755 root root - r! /forcefsck r! /fastboot r! /forcequotacheck d /run/lock/lvm 0700 root root - d /run/lvm 0700 root root - r! /etc/gshadow.lock r! /etc/shadow.lock ... etc.b) There are many different types of tasks executed. More details about the types of tasks can be found in the tmpfiles.d man page (e.g. https://man.archlinux.org/man/tmpfiles.d.5.en).
L, L+
Create a symlink if it does not exist yet.
d
Create a directory.
Q
Create the subvolume or directory the same as v, but assign the new subvolume to a new leaf quota group.
q
Create a subvolume or directory the same as v, but assign the subvolume to the same higher-level quota groups as the parent.
h
Set Linux file/directory attributes. Lines of this type accept shell-style globs in place of normal path names.
c, c+
Create a character device node if it does not exist yet.
d
Create a directory.
r
Remove a file or directory if it exists.
a, a+
Set POSIX ACLs (access control lists), see acl(5).
z
Adjust the access mode, user and group ownership, and restore the SELinux security context of a file or directory, if it exists.
x
Ignore a path during cleaning.
If the exclamation mark ("!") is used, this line is only safe to execute during boot, and can break a running system.
$ ls -ltr /run/tmpfiles.d/ total 4 -rw-r--r--. 1 root root 564 Nov 9 01:03 kmod.conf $ ls -ltr /usr/lib/tmpfiles.d/ total 52 -rw-r--r--. 1 planet planet 61 Mar 17 2017 lvm2.conf -rw-r--r--. 1 planet planet 77 May 5 2017 rpcbind.conf -rw-r--r--. 1 planet planet 239 May 17 2017 passwd.conf -rw-r--r--. 1 planet planet 655 Feb 14 2019 x11.conf -rw-r--r--. 1 planet planet 596 Feb 14 2019 systemd-nologin.conf -rw-r--r--. 1 planet planet 1096 Feb 14 2019 journal-nocow.conf -rw-r--r--. 1 planet planet 362 Feb 14 2019 home.conf -rw-r--r--. 1 planet planet 568 Jun 7 2019 var.conf -rw-r--r--. 1 planet planet 756 Jun 7 2019 tmp.conf -rw-r--r--. 1 planet planet 1735 Jun 7 2019 systemd.conf -rw-r--r--. 1 planet planet 812 Jun 7 2019 legacy.conf -rw-r--r--. 1 planet planet 517 Jun 7 2019 debian.conf -rw-r--r--. 1 planet planet 153 Jul 2 2020 dbus.conf
cd /usr/lib/tmpfiles.d/ mkdir /var/lib/gravity/planet/share/my_backup mv * /var/lib/gravity/planet/share/my_backup/ ls -ltr /usr/lib/tmpfiles.d/ cd /run/tmpfiles.d/ mkdir /var/lib/gravity/planet/share/my_backup2 mv * /var/lib/gravity/planet/share/my_backup2/ ls -ltr /run/tmpfiles.d/Copy 1-2 files back at a time.
cp /var/lib/gravity/planet/share/my_backup/tmp.conf /usr/lib/tmpfiles.d/ ls -ltr /usr/lib/tmpfiles.d/
001116648

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.