-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
journalctl --vacuum-* --directory… does not remove anything in remote journal storage #2376
Copy link
Copy link
Closed
Labels
RFE 🎁Request for Enhancement, i.e. a feature requestRequest for Enhancement, i.e. a feature requestjournal
Description
I'm running systemd-journal-remote and let it write to the default location, /var/log/journal/remote. There are currently 589 files in that directory occupying ~17.6 GB:
[0 root@belgarath /var/log/journal/remote] ls | tail
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ac95b5-0005281c99bd5dab.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ad6fd5-000527de525eda3f.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae247d-00052810e90ba858.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae49db-00052822978bb591.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae522e-00052822b1f39c2d.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae5d6d-0005281c99bd5dab.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000b03901-000528b8640a16c4.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000b0fa3b-000528f7b0b38f00.journal
remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000b310c5-000529ab4ae84568.journal
remote-belgarath.journal
[0 root@belgarath /var/log/journal/remote] journalctl --directory=/var/log/journal/remote --disk-usage
Archived and active journals take up 17.6G on disk.
[0 root@belgarath /var/log/journal/remote]
I would very much like to use the various --vacuum-* options to journalctl but they don't do anything at all with those files:
[0 root@belgarath /var/log/journal/remote] journalctl --directory=/var/log/journal/remote --vacuum-size=1G
[0 root@belgarath /var/log/journal/remote] ls | wc -l
589
[0 root@belgarath /var/log/journal/remote] journalctl --directory=/var/log/journal/remote --disk-usage
Archived and active journals take up 17.6G on disk.
[0 root@belgarath /var/log/journal/remote] journalctl --directory=/var/log/journal/remote --vacuum-time='1 day'
[0 root@belgarath /var/log/journal/remote] journalctl --directory=/var/log/journal/remote --disk-usage
Archived and active journals take up 17.6G on disk.
[0 root@belgarath /var/log/journal/remote]
I can see journalctl accessing all those archived files if I strace it, so it does seem to work on the right directory at least:
[0 root@belgarath /var/log/journal/remote] strace -e trace=open journalctl --directory=/var/log/journal/remote --vacuum-size=1G |& tail
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ad6fd5-000527de525eda3f.journal", O_RDONLY|O_CLOEXEC) = 584
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae247d-00052810e90ba858.journal", O_RDONLY|O_CLOEXEC) = 585
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae49db-00052822978bb591.journal", O_RDONLY|O_CLOEXEC) = 586
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae522e-00052822b1f39c2d.journal", O_RDONLY|O_CLOEXEC) = 587
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000ae5d6d-0005281c99bd5dab.journal", O_RDONLY|O_CLOEXEC) = 588
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000b03901-000528b8640a16c4.journal", O_RDONLY|O_CLOEXEC) = 589
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000b0fa3b-000528f7b0b38f00.journal", O_RDONLY|O_CLOEXEC) = 590
open("/var/log/journal/remote/remote-belgarath@ff20107109a142fd886d3a7c8c475e99-0000000000b310c5-000529ab4ae84568.journal", O_RDONLY|O_CLOEXEC) = 591
open("/var/log/journal/remote/remote-belgarath.journal", O_RDONLY|O_CLOEXEC) = 592
+++ exited with 0 +++
[0 root@belgarath /var/log/journal/remote]
Is this supposed to work? Is the only way to actually remove entries from a remote journal storage the manual rm remote-belgarath@*.journal or something like that?
Thanks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
RFE 🎁Request for Enhancement, i.e. a feature requestRequest for Enhancement, i.e. a feature requestjournal