-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
log2ram JOURNAL_AWARE=true feature is not able to preserve any journal logs across boot #233
Comments
Tested a few more times, removed --purged log2ram and reinstalled. Here is what is happening. After a boot log2ram saves the journal entries from the first boot before it was installed and the last previous boot only. All other journal entries are deleted. So if I boot 5 times 8n journalctl I would see -1 and 0: -1 = Boot 1 All entries for boot 2, 3, and 4 are missing. I can easily troubleshoot what log2ram is doing before the boot because of course all the logs are gone. Definately not working as expected. |
Looking deeper into this it appears that in the /var/log/journal directory the logs are still there but logs from the previous boot are corrupted with a ~ after the filename. So it looks like the problem is indeed this line: JOURNALD_AWARE=true log2ram is corrupting the journal when it tries to rotate. I think it is a similar issue to this which was marked as completed but I think the issue has not been fixed: I have tested on two systems ubuntu 22.04 and 24.04, same result. I believe the corrupted journal is why all logs are missing from before a reboot. |
Discussion of the specific issue is here: #200 |
Hi, The double The option Let's try to investigate in this ticket instead of spreading into multiple issue. |
I suspect systemd-journald.service starting before finishing the HDD->MEMORY sync. |
Can you check also the last commit 83774d4 , it's maybe link to your issue. |
Tested with systemd 255 on ubuntu 24.04 and 22.04 version 1.7.2
Journal logs are not saved and restored after a system reboot.
To test:
Journalctl -t log2ram showes rsync copy records from after the boot including /journal/* files but nothing before the boot as those logs are lost.
Is this by design? I can't see log2ram being useful if it wipes out the logs after every reboot. The only change to log2ram was to increase size to 2560M.
It looks like this could be a bug because the log2ram.conf that was installed has double entries for the JOURNAL_AWARE=true setting:
Was this part of the app modified recently? If so it does not work.
The text was updated successfully, but these errors were encountered: