log2ram
log2ram copied to clipboard
log2ram failed to update writes to disk at reboot
I have seen this a couple of times on different debian bookworm instances where log2ram is installed; When I do a reboot (shutdown -r now, or reboot), I see in syslog that the log2ram service indeed stops, but after having returned and checking the hdd.* dir contents, they are not updated to the latest versions that were there, and the current version at that boot is an older one. Pretty bad actually. I've lost some work due to not expecting this. Something's not correctly running rsync back to disk properly around shutting down. I have not been able to pinpoint the cause.
I have installed log2ram via apt, and not changed service timers or anything, only the dirs that should be in RAM.
I am encountering this issue too. In journal logs, I see :
Apr 13 21:00:11 swizzin log2ram[85]: mount: /var/hdd.log: cannot mount none read-only.
Apr 13 21:00:11 swizzin log2ram[109]: building file list ... done
Apr 13 21:00:11 swizzin log2ram[109]: log2ram.log
Apr 13 21:00:11 swizzin log2ram[109]: sent 123 bytes received 36 bytes 318.00 bytes/sec
Apr 13 21:00:11 swizzin log2ram[109]: total size is 23 speedup is 0.14
Apr 13 21:00:11 swizzin log2ram[113]: mount: /var/lib/hdd.vnstat: cannot mount none read-only.
Apr 13 21:00:11 swizzin log2ram[171]: building file list ... done
Apr 13 21:00:11 swizzin log2ram[171]: log2ram.log
Apr 13 21:00:11 swizzin log2ram[171]: sent 123 bytes received 36 bytes 318.00 bytes/sec
Apr 13 21:00:11 swizzin log2ram[171]: total size is 23 speedup is 0.14
This does not happen on debian 12 hosts. It has happened on Ubuntu 22.04 so far.
In my case, the data is lost and the /var/log folder is recreated.
Which distro ? I think it's mostly an issue with ubuntu. It works fine on debian.
From: p1r473 @.> Sent: Saturday, April 13, 2024 9:35:52 PM To: azlux/log2ram @.> Cc: SiddharthManthan @.>; Comment @.> Subject: Re: [azlux/log2ram] log2ram failed to update writes to disk at reboot (Issue #219)
I'm having a similar problem If I do logger mytest and then log2ram write then reboot and then cat /var/log/syslog | grep mytest I can't find my log entry after reboot
— Reply to this email directly, view it on GitHubhttps://github.com/azlux/log2ram/issues/219#issuecomment-2053688627, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AV3RWIR2OMFAVJ4JUBB6VSLY5FJWBAVCNFSM6AAAAABBUR2652VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJTGY4DQNRSG4. You are receiving this because you commented.Message ID: @.***>
Which distro ? I think it's mostly an issue with ubuntu. It works fine on debian.
Thanks for your reply: there is a more specific follow-up here: #222.
HTH, Matteo
I am having the issues on Debian, so Im not sure its working for all Debian. I am on Raspbian Bookworm 12
same here on Raspberry Debian Bookworm
@jult can you look in /var/journal/ after a reboot and see if you have any files with ~ at the end of their name indicating a corrupted journal?