My embedded box is running Linux 5.15 with systemd 251 (251.2+). I have configured persistent logging for journal.
/etc/systemd/journald.conf
[Journal]
Storage=persistent
Created folder /var/log/journal. This is mounted on mtd flash partition.
ls -alt /var/log/journal/
drwxr-sr-x 2 root systemd- 0 Jan 1 00:03 2b4305f670484d1fa6b9c4deee336b91
Jouranld creates a folder under /var/log/journal but I dont see anything getting stored here ever. I don't see journal being persistent across reboots.
Journal logs are kept only in /run/log/journal and this is tmpfs in the system and gets erased on each reboot.
I have tried journalctl --flush
to see if anything gets pushed to inside /var/log/journal but nothing is stored apart form the folder name.
journalctl --rotate
also has no impact.
I seem to be doing everything as per the journalctl documentation but still its not working. Any help?
machine-id
. Maybe the Maluvel's answer is more useful./var/log/journal
is mounted on mtd flash partition, right? What is its filesystem? I'm not really sure if the filesystem type is relevant for this but it should be useful to check that.