Step 8 of 9 · lab · 25 min
Bound training journal retention
A separate systemd journal namespace has grown too large. Save the records you need, set a persistent limit and clean old archives of this namespace only.
Situation
The training service lab-retention-seed writes to a separate systemd journal namespace,
lab-retention. The namespace has its own instance, systemd-journald@lab-retention.service,
and its own configuration, /etc/systemd/journald@lab-retention.conf. Its archives already take
more than 24 MiB. Among the old records are three needed for an incident review: their text
starts with lab-evidence:. The main system journal is outside this task.
Task
- The three
lab-evidence:records of thelab-retention-seedservice are saved to/home/student/journal-evidence.txtinshort-isoformat (with date and time): exactly those three lines, in a file you own. /etc/systemd/journald@lab-retention.confsets a persistent limitSystemMaxUse=16M; the other settings stay as they were, and there are no extra settings files.- The namespace's archived files take at most 16 MiB (the current active file doesn't count).
- The namespace's journal instance runs with the new setting and accepts new records.
- The main journal and its settings, the
lab-retention-seedservice and its program are untouched.
Constraints
- Don't delete or truncate journal files by hand — use
journalctlonly. - Don't reconfigure or clean the main
systemd-journald. - Don't disable logging or redirect it to
/dev/null.
The tools you need are already installed. There's no internet on this machine.
Lab · on your own
No commands are given in this lab: type them in the terminal yourself. Goals are checked on the machine after every command.
Goals
0 of 5-
The three timestamped lab-evidence records are saved in journal-evidence.txt — not done yet
-
Only SystemMaxUse changed in the namespace configuration — to 16M — not done yet
-
Archives of the lab-retention namespace take at most 16 MiB — not done yet
-
The journal instance was restarted with the new setting and accepts new records — not done yet
-
The main journal, its settings and the task files are untouched — not done yet
The machine is starting
Hints
0 of 3Lab goals
0 of 5-
The three timestamped lab-evidence records are saved in journal-evidence.txt — not done yet
-
Only SystemMaxUse changed in the namespace configuration — to 16M — not done yet
-
Archives of the lab-retention namespace take at most 16 MiB — not done yet
-
The journal instance was restarted with the new setting and accepts new records — not done yet
-
The main journal, its settings and the task files are untouched — not done yet
Goals are checked on the machine after every command.