0

This is occurring while backing up whole drive with rsync. I'm trying to sync two large hard drives as a backup and I'm doing so exactly as described here using the Grsync GUI. While doing so I get this KDE notification:

Low Disk Space
Your Root partition is running out of disk space, you have 0 MiB remaining (0%). 

This problem seems to be connected to running backups since I only rarely have had issues with too large log files.

-> How can one prevent logfiles becoming so large that they make the root partition run full? At least during times when backups are run.

For example, how to prevent it logging the very same message over and over instead of just iterating a counter or registering a repetitive message in a more meaningful, useful and systematic way?


You probably don't need to read the details below.

I solved this problem by:

  • running the app "Graphical Disk Map" to find out what's taking up all this disk space
  • found it was these three files in /var/log/: syslog, kern.log, and messages
  • backed up the log files like so: sudo cp /var/log/syslog /externalBackupFolder/syslog
  • emptying the huge log files like so: sudo truncate -s 0 /var/log/syslog

Maybe this is too detailed or should be a separate question but the errors showing up over and over were mainly these (maybe it has to do with my problems to simply have a working clock on Debian):

kernel: [id] usb 1-11: 1:1: cannot get freq (v2/v3): err -71
kernel: [id] usb 1-11: 1:1: cannot set freq 48000 (v2/v3): err -71
kernel: [id] usb 1-11: uac_clock_source_is_valid(): cannot get clock validity for id 40
kernel: [id] usb 1-11: clock source 40 is not valid, cannot use
kernel: [id] usb 1-11: 1:1: cannot get freq (v2/v3): err -71
...

in between there were a few blocks of many repetitive messages

pulseaudio[id]: Failed to set hardware parameters: Protocol error

and in the newer parts of the log files the main file contents turned to these errors:

postfix/pickup[id]: id1: uid=0 from=<root>
postfix/cleanup[id]: id1: message-id=<id0.id1@hostname>
postfix/cleanup[id]: warning: id1: write queue file: No space left on device
postfix/pickup[id]: warning: maildrop/id3: error writing id1: queue file write error

2 Answers 2

0

Do you maintain/delete your logs with logrotate? If not, suggest you try that to keep the disk space problem files managed.

1
  • Forgot about that. I think I'm using it and I have compressed log files in the directory. How to easily check if I'm using it and how it's configured? The problem seems to come from sudden bursts of many error messages so logrotate may not solve that since for example the logrotation is only occurring at long intervals and not when there disk space issues or logfiles exceeding certain file-size thresholds. Commented Jan 10, 2024 at 19:02
0

Another suggestion is to change the syslog configuration file so that:

  1. change the log messages that are error level and above are logged
  2. find the category of the specific flowing messages up that specific level

You'll have to restart the syslog service if you make changes.

One other suggestion: How long has it been since you have done a FULL fsck on the system disk. Assumming ext3/4 (sudo touch /forcefsck) there are ways on other filesystem to force fsck on next reboot. Sometimes hidden fragments sit out there and can consume considerable space.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.