Skip to content
View in the app

A better way to browse. Learn more.

Learn more

journalctl reports truncated files after logrotate.service runs

Featured Replies

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.

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...

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.