Mounting NFS share with Systemd Automount

On my main workstation running Fedora 36, I use both autofs and Systemd automount to mount NFS on demand. Gradually, I’m leaning toward just to use Systemd automount. Here is just a brain dump with an example of mounting an NFS share with Systemd autmount. Though, I had done this before, I found this blog post, available at [1], provides details on how to do this. Assumption The NFS server and share: banan....

June 13, 2022 · 2 min · 359 words · kenno

Clean Up Systemd Journal Logs

On my Fedora 33 system, the systemd journal is persistently logged. Over time, the size of the log accumulate quite a lot. # du -shx journal/ 4.2G journal/ I already cleaned up the log twice in the past, but I already forgot how to do it. To fix my short-term memory, I’m going to document how I do this by following this blog post Clear systemd journal. The command for cleaning up old logs is journalctl with the option --vaccume-time=OLDER_THAN_TIME....

March 26, 2021 · 1 min · 166 words · kenno

Systemd List Failed Units and Services

This is a quick note to list failed services on systemd system. [root@zilla ~]# systemctl status ● zilla State: degraded Jobs: 0 queued Failed: 1 units Since: Fri 2020-09-04 02:20:47 AEST; 3 months 11 days ago CGroup: / ├─1 /usr/lib/systemd/systemd --system --deserialize 22 └─system.slice ├─httpd.service │ ├─21860 /usr/sbin/httpd -DFOREGROUND │ ├─21861 /usr/sbin/httpd -DFOREGROUND │ ├─21862 /usr/sbin/httpd -DFOREGROUND │ ├─21863 /usr/sbin/httpd -DFOREGROUND │ ├─21864 /usr/sbin/httpd -DFOREGROUND │ └─21865 /usr/sbin/httpd -DFOREGROUND ... [root@zilla ~]# systemctl list-units --failed UNIT LOAD ACTIVE SUB DESCRIPTION ● ipmi....

December 15, 2020 · 2 min · 233 words · kenno

Cleaning Up Systemd Journal Logs

“Bad boys, whatcha want. Watcha want, whatcha gonna do when the root is full?” Actually, what are you gonna do when the journald taking up lots of space? For example, during the operating system upgrade on my desktop, the free space on / is not sufficient. Error Summary ------------- Disk Requirements: At least 5643MB more space needed on the / filesystem. So, I check how much space the systemd-journald log was consuming:...

October 10, 2020 · 1 min · 142 words · Kenno

How to Enable Persistent Logging for Systemd Journal

On RHEL 7/8, CentOS 7/8 and even Ubuntu (??), by default the journal log data is stored only in memory (/run/log/journal/ directory). There are 2 ways to retain the journal log messages. The first one is to set the variable Storage to persistent in the /etc/systemd/journald.conf. [Journal] Storage=persistent Then restart the systemd-journald service. Another solution is simpler and it looks like it’s the recommended way of achieving this. All we have to do is to create a directory, /var/log/journal (with correct ownership and permission), and journald will automatically store the log messages there....

August 29, 2020 · 2 min · 418 words · kenno