From 40e79a351f64635887264cd7ce187b895dd84d59 Mon Sep 17 00:00:00 2001 From: Rasmus Bondesson Date: Tue, 15 Jun 2021 21:02:27 +0200 Subject: [PATCH] README: Add Troubleshooting section with journal cleanup tips --- README.md | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 68b61f5..e04af40 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,8 @@ _____ 2. [Is it working?](#is-it-working) 3. [Upgrade](#upgrade) 4. [Customize](#customize) -5. [Uninstall](#uninstall-) +5. [Troubleshooting](#troubleshooting) +6. [Uninstall](#uninstall-) ## Install ### With APT (recommended) @@ -98,6 +99,35 @@ Compressor for zram. Usefull for the `COMP_ALG` of ZRAM on the config file. ###### Now, muffins for everyone! +## Troubleshooting + +### Existing content in `/var/log` too large for RAM + +One thing that stops Log2Ram from starting is if `/var/log` is to large before starting Log2Ram the first time. This can happen if logs had been collected for a long time before installing Log2Ram. Find the largest directories in `/var/log` (this commands only shows the 3 largest): + +``` +sudo du -hs /var/log/* | sort -h | tail -n 3 +``` + +If the `/var/log/journal` is very large, then there are a lot of system logs. Deletion of old "archived" logs can be fixed by adjusting a setting. Edit the `/etc/systemd/journald.conf` file and add the following option: + +``` +SystemMaxUse=20M +``` + +This should be set to a value smaller than the size of the RAM volume, for example half. Then apply the new setting: + +``` +sudo restart systemd-journal +``` + +This should shrink the size of "archived" logs to be below the limit. Reboot and check that Log2Ram succeds: + +``` +sudo reboot +… +systemctl status log2ram +``` ## Uninstall :( (Because sometime we need it)