[lug] Thoughts on upgrading to CentOS 7

Rob Nagler nagler at bivio.biz
Sun Mar 25 18:03:15 MDT 2018


On Sun, Mar 25, 2018 at 2:59 PM, Orion Poplawski wrote:
>
> One can configure journal storage usage with /etc/systemd/journald.conf,
> e.g.:
>
> [Journal]
> Storage=persistent
> #SystemMaxUse=
> SystemKeepFree=1G
>

I appreciate you trying to help. That actually wasn't the point of my
message: it's that it isn't easy, and you should be. The journald.conf file
is a case in point.

In order for that change to take effect, you also need to restart journald:

systemctl restart systemd-journald

Also, it's recommended that you create /etc/systemd/journald.conf.d and
plop a file in there. The directory isn't there by default.

Some people (https://unix.stackexchange.com/a/159390) recommend this
alternative for persisting the journal, which doesn't require a
modification to journald.conf:

mkdir -m 700 /var/log/journal
systemd-tmpfiles --create --prefix /var/log/journal

The reason for the second line is that the permissions need to be set
appropriately for user units which need to read the logs. This doesn't
happen if you just set Storage=persistent (see the stackexchange
discussion).

journald.conf is complicated. The defaults don't make sense. For example,
SystemMaxUse is 10% of whatever disk /var/log/journal is on. The journal is
slow to search through, and you usually don't want more than a few 100MB.
If you are running backups, you want the files broken up into reasonable
sizes so that you don't end up copying. After too much reading, here's our
journald.conf:

[Journal]
SplitMode=none
Storage=persistent
SystemMaxFileSize=20M
SystemMaxUse=500M

You don't want these things in terms of percentages, because it could be
far too small or too much.

Rob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20180325/03b8c653/attachment.html>


More information about the LUG mailing list