Journald: Re-use /var/log/journal hash entry after system upgrade

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



#### [ System Environment ] ####
On an embedded x86-64 Linux system, I’m running systemd v241. I have Systemd-Journald logging set to persistent with SystemMaxUse and RuntimeMaxUse both set to 512MB.

The Linux system mount loops /var/log on start-up from a var-log.ext4 file. The /var/log mount is given a fixed size of the disk (976MB). Systemd creates a journal entry directory given a hash name in /var/log/journal/<hash1>.

 

#### [ System Information ] ####

Linux 4.19.0-6-2-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux


#### [ Problem ] ####

When the system firmware is upgraded, Systemd creates a new journal entry directory with a different hash name and no longer recognizes the previous hash directory.

The old logs from the previous journal entry can no longer be managed. The old logs are never rotated and cannot be manually rotated using the journaldctl cli. The disk usage calculator by Journald does not account for the previous journal entry meaning if there are two previous entries in /var/log that consume 900MB of space; then the new journal entry only has 76MB of space to work with. Eventually, disk space will be full. Journald cannot automatically flush, vacuum, clean, rotate previous logs because it does not recognize the previous journal entries.

There must be a systemd journald check that occurs where it determines these other entries are not for it to manage.


#### [ Problem Output ] ####
Disk usage of /var/log by Journald:

~$ du -m --max-depth=1 /var/log/journal

115     /var/log/journal/990cf742bf724548b6eb3e7479b715b8

82      /var/log/journal/f1ab90ffe26f453a880194dd1de999a2

51      /var/log/journal/c3eb2c473e08407cb6ee04d3d1ebe989

 

Journald disk usage (Note: Does not recognize previous journal entries.)

~$ sudo journalctl --disk-usage

Archived and active journals take up 114.7M in the file system.

Journald not finding previous journal entry hashes:

~$ journalctl --verify

PASS: /var/log/journal/990cf742bf724548b6eb3e7479b715b8/user-1000.journal

PASS: /var/log/journal/990cf742bf724548b6eb3e7479b715b8/user-1000@13f6f398cdda4e8f9952ebea46e6b6b4-000000000000161c-0005d91af94b8136.journal

PASS: /var/log/journal/990cf742bf724548b6eb3e7479b715b8/user-1000@49e1241c0f3c497a888c8fb4d74c2c00-00000000000006b1-0005d91aeeccea06.journal

#### [ Question ] ####

Is there a way to define or set a re-usable Systemd-Journald entry under /var/log/journal that can be used after system upgrades?

 

I can provide any additional system details or logs.

Thank you for any feedback or support.

 

 

-Eric Z

 

CONFIDENTIALITY NOTICE: This e-mail and any files transmitted with it are intended solely for the use of the individual or entity to whom they are addressed and may contain confidential and privileged information protected by law. If you received this e-mail in error, any review, use, dissemination, distribution, or copying of the e-mail is strictly prohibited. Please notify the sender immediately by return e-mail and delete all copies from your system.

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux