You are not logged in.

#1 2023-11-19 15:59:32

Urd
Member
Registered: 2023-11-19
Posts: 3

Journald logging isn't persistent between reboots

Fresh minimal installation, systemd-boot. Machine is Lenovo ThinkCentre M700 Tiny.
On every reboot system.journal is rotated, instead of flushing events to existing one.

[    2.918896] systemd-journald[182]: Received client request to flush runtime journal.
[    2.921755] Adding 2097148k swap on /SWAP.  Priority:-2 extents:17 across:2359296k SS
[    2.939794] systemd-journald[182]: /var/log/journal/7c132dd08cab4ea6943c7ee146f4ba65/system.journal: Journal file uses a different sequence number ID, rotating.
[    2.939800] systemd-journald[182]: Rotating system journal.

journald.conf

[Journal]
Storage=persistent
SystemMaxUse=512M
SystemKeepFree=128G
SystemMaxFileSize=32M
SystemMaxFiles=16
RuntimeMaxUse=768M
RuntimeKeepFree=128G
RuntimeMaxFileSize=48M
RuntimeMaxFiles=16

Is this an issue? My thought such a behavior isn't expected. Is there a way to fix or prevent it?

Offline

#2 2023-11-26 00:09:05

Ketrel
Member
Registered: 2022-11-14
Posts: 30

Re: Journald logging isn't persistent between reboots

This looks very similiar to https://github.com/systemd/systemd/issues/30092 and https://github.com/systemd/systemd/issues/28250 any shot that's your scenario too?

Offline

#3 2023-11-26 19:36:44

Urd
Member
Registered: 2023-11-19
Posts: 3

Re: Journald logging isn't persistent between reboots

Yes, it's same as Journal file rotation because of different sequence number ID. But it was reported after my post here (~1 hour later), so I had no chance of finding it when I searched. Anyway, it seems it's marked as bug and added to 256 milestone, so probably we'll see it fixed someday...

Offline

#4 2023-11-27 10:47:29

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: Journald logging isn't persistent between reboots

May you allocate too little space for the journals to be stored.

SystemMaxFileSize=32M
SystemMaxUse=512M

And about this

SystemKeepFree=128G

can you post

sudo df -h 

Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#5 2023-11-27 15:49:38

seth
Member
Registered: 2012-09-03
Posts: 52,428

Re: Journald logging isn't persistent between reboots

@Khere did you see the linked bugs?
It seems more like a new bug feature in systemd, or rather an undesired side-effect of such.

Offline

#6 2023-11-28 07:01:21

Khere
Member
From: Italy
Registered: 2020-03-04
Posts: 170

Re: Journald logging isn't persistent between reboots

seth wrote:

@Khere did you see the linked bugs?

My bad, i had similar problem some years ago and i solved by doing that, so i thought it would ve helped


Fan of Giorgio Moroder & Mohammad Ammax enemy

Offline

#7 2023-11-29 11:36:36

Urd
Member
Registered: 2023-11-19
Posts: 3

Re: Journald logging isn't persistent between reboots

Khere wrote:

May you allocate too little space for the journals to be stored.

SystemMaxFileSize=32M
SystemMaxUse=512M

By default SystemMaxUse is 4 GB, I don't intend to waste disk space storing logs, which I newer will use. Same error raise even with default journald config, as seth mentioned it's undesired side effect from merging new feature into systemd.

Khere wrote:

And about this

SystemKeepFree=128G

can you post

sudo df -h 

Sure.

Filesystem      Size  Used Avail Use% Mounted on
dev             7.8G     0  7.8G   0% /dev
run             7.8G  860K  7.8G   1% /run
efivarfs        128K   71K   53K  58% /sys/firmware/efi/efivars
/dev/sda2       232G  4.0G  216G   2% /
tmpfs           7.8G     0  7.8G   0% /dev/shm
tmpfs           7.8G     0  7.8G   0% /tmp
/dev/sda1       2.0G  103M  1.9G   6% /boot
tmpfs           1.6G  4.0K  1.6G   1% /run/user/0

Offline

Board footer

Powered by FluxBB