[systemd-devel] .journal~ files

Kay Sievers kay at vrfy.org
Thu Nov 29 03:54:44 PST 2012


On Thu, Nov 29, 2012 at 12:50 PM, Zbigniew Jędrzejewski-Szmek
<zbyszek at in.waw.pl> wrote:
> On Thu, Nov 29, 2012 at 12:44:08PM +0100, Zbigniew Jędrzejewski-Szmek wrote:
>> On Thu, Nov 29, 2012 at 10:24:48AM +0000, Colin Guthrie wrote:
>> > Hi,
>> >
>> > I have several .journal~ files in my journal dir... without me digging
>> > into the source, can someone explain what these are and if I can safely
>> > remove them (as they are quite large!) like most other ~ files.
>>
>> They are rotated journal files. Each time journald opens an uncleanly
>> closed journal file, it will rotate. Also if the index structures in
>> the journal file are too full, or the file is too big, it will be
>> rotated.
> Oh, I missed the tilde: it means that the file was unclean.

A possible option we thought about would be to fsync the open file at
a certain interval, make sure all data is on disk and let journal not
mark the file as unclean if nothing was written to it after the
sync(). Currently we require journald to properly close() the file to
leave it appendable and clean.

Kay


More information about the systemd-devel mailing list