Jump to content

journalctl reports truncated files after logrotate.service runs


Recommended Posts

Hi,

 

My journald logs are limited to last midnight. I figured out it's related to logrotate.service. When I run it with couple of logs present in /var/log/journal (and passing all tests) they become 0-sized. Then:

$ journalctl --verify
Journal file /var/log/journal/xxx/system.journal is truncated, ignoring file.
PASS: /run/log/journal/xxx/system.journal      
$ ls  /var/log/journal/xxx -lsh          
total 0
0 -rw-r-----+ 1 root systemd-journal 0 Feb 26 12:10 system@141d4d3509d94af8aeecc18c6e8eec9a-0000000000000001-0005f58e34f3a6c8.journal
0 -rw-r-----+ 1 root systemd-journal 0 Feb 26 12:10 system.journal

 

I've discovered that /var/log/journal is a symlink to /var/log.hdd/journal. How can I stop this from happening to my logs? I love the convenience of journalctl command.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines