[systemd-devel] journald uncleanly closed files
Lennart Poettering
lennart at poettering.net
Wed Jun 24 13:10:22 PDT 2015
On Wed, 24.06.15 08:55, Ernast Sevo (ersevs at gmail.com) wrote:
> Hello!
>
>
> I have a small issue that I am facing on my system when journal files
> aren't cleanly closed. I have seen online that many other people have
> encountered this online but haven't actually come close to finding a
> solution or figuring out what the issue is. Essentially on my system
> journal files that aren't cleanly closed seem to build up in
> persistent storage regardless of my options in journald.conf . If I
> attempt to look at the disk usage journald is well aware of that it
> has exceeded the size but does nothing to fix this. However, forcing a
> journal rotation reduces the size of the journal to the limits set in
> journald.conf . I am trying to keep this from happening and at the
> same time understand how systemd handles this case. My questions are
> as follows:
>
> 1. Since the limits set in journald.conf are all size based, at what
> point after a fresh boot will journal rotation occur?
It happens before each write actually, to make this as reliable as possible.
> 2. Is this journal rotation size based or time based?
SystemMaxUse= and SystemKeepFree= are size-based.
MaxRetentionSec= is time-based.
> 3. Is the answer to question 2 configurable in some way?
Yes, see above.
Note that there was a bug in the clean-up code a while back, that
ignored all files that were detected as unclean. This was fixed in
v220 iirc. Make sure to run at least v220 hence, or some distro that
backported that.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list