Score:0

How to stop a run away filling of a HDD?

cn flag

Ubuntu 22.10; AMD 64-bit; 6 core; 1 TB HDD

Somehow I got one of those run away 'fill the HDD' problems. I didn't even know I had that until I got an error message on screen that the HDD would soon be filled. And sure enough, before I could figure out how to stop it, it was full and I couldn't do anything. Rebooted it several times, but it would hang before the log in splash screen and eventually wouldn't even boot.

Spent hours trying to find the right words to say online to convey the issue and try to find some help, but without success. Made several attempts to make a backup of important recently changed files but kept being blocked by the 'no room' issue.

Eventually, I pulled out the handy Boot Repair USB stick and ran that. Even that said there wasn't any room for it to operate. Attempted deleting some folders to give more room but the drop downs only said 'Move to trash' but doesn't offer delete. I tried doing that anyway. Still, afterwards, Boot Repair reported not enough room to run the repair.

Gave up, rebooted, ran boot repair again, and this time it said it had completed the repairs, I have no idea how. The drive finally booted from BIOS, even showed the Grub menu. Eventually I was back to the desktop. When I checked gparted it was back to 500 GB of unused space (on a 1 TB HDD).

Spent 12 hours working on this issue over two days. Very frustrating. Biggest problem was that there wasn't/isn't a thread where this apparent issue I guess caused by some software still running and filling up the drive with log or error messages is written up, recently. Most similar problems I saw were many years old and didn't apply to my situation.

Sorry for the wall of text...I'd like to ask if anyone has a link to a recent article that covers this issue. Example: What to do when a Linux HDD suddenly starts to fill up by itself. Or how to set Ubuntu to only fill up so much and then auto-stop? Or if anyone knows what caused it, and the trick of stopping it while it's ongoing before it's a crisis?

Thanks.

ec flag
What was the application/process that you couldn't stop that that filled up your HDD? What file(s) did it create? Couldn't you just remove the files that this runaway process created? Thanks for the clarification.
us flag
It may be due to journalctl logs. Check `journalctl --disk-usage`. You can free them with something like `sudo journalctl --vacuum-size=20M`
in flag
If there is some hardware misconfiguration or failure, the `/var/log/syslog` file(s) can become incredibly large
hr flag
Related: [Very large log files, what should I do?](https://askubuntu.com/questions/515146/very-large-log-files-what-should-i-do)
Jim_HiTek avatar
cn flag
@richbl: I don't often check how much room I have on my HDD so this snuck up on me. First a message onscreen on my desktop about not having enough room, I didn't parse what it meant so sorta ignored it. Mistake. Soon it was too full to do anything. So, I have NO IDEA what the runaway process was. Every trick I tried to use with the disk as a slave so I could copy my current file changes wouldn't work because I couldn't mount it. All the pages I read about mounting a disk left me groaning because of the complexity. Only Boot Repair helped this time.
Score:0
cn flag

There is no "recent article" because nothing has changed:

  1. Boot a LiveUSB
  2. Mount the full disk
  3. Read the error messages that are being logged
  4. Fix the actual cause(s) of the problem that is being logged
  5. Delete the massive log (or, better yet, yesterday's massive log) to eliminate the disk-full condition.
  • Deleting a log should not be your first choice. It should be about fourth or fifth down the list. Never delete logs every day as an ongoing "cure". That's not a cure. That's how you lose data.
Jim_HiTek avatar
cn flag
How/where/using what app do I read the error messages being logged. Thanks.
user535733 avatar
cn flag
"How do I read the log?" is a very different question. Try the Search box at the top of the page. If you cannot find an answer, then open a new question for it.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.