0

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?

4
  • Check this. Not sure if it will be helpful. According to the thread the problem is about machine-id. Maybe the Maluvel's answer is more useful. Commented Nov 30, 2022 at 21:47
  • the machine-id remains the same in my case. I came cross the thread.
    – Rohit Pai
    Commented Dec 1, 2022 at 5:28
  • You said that /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. Commented Dec 2, 2022 at 4:13
  • Its jffs2. It could be file system limitation. I have requested confirmation here
    – Rohit Pai
    Commented Dec 14, 2022 at 4:34

1 Answer 1

2

The file system in our case is jffs2. Persistent journal would not work on jffs2. More details are in my Github systemd issue #2571.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .