journalctl gets corrupted
When I type: sudo journalctl --verify
I always get: Data object's entry array not sorted
File corruption detected at by some of my logs.
Screenshot from terminal
How can I know what causes this in Ubuntu? I have Pop_Os! installation on my other drive with much larger log file and it never gets corrupted. I have tested my disk fdisc and it shows no errors. I have also installed Ubuntu in other partition and same corruption starts there too after a while.
It is not nice to see these corruptions in log files. In principle, the corrupt files can be rewritten, but according to a Redhat software engineer, for now, we best simply ignore these corruptions rather than clean them up. Quote:
There isn't really any point in deleting them. journalctl salvages automatically everything it can when reading them. Since the files are mostly append-only the corruptions usually only affect half-written entries at the end, and hence all earlier once should just work.
I am pretty sure we simply need to document this in more detail, and clarify that corrupted journal files are nothing to act on, and the journalctl recovers what it can on read, implicitly, with no fsck-like tool being necessary, and without requiring people to manually delete anything.