Score:0

Hard drive out of space in ubuntu 20.04?

in flag

I have a server installed with ubuntu 20.04, it is not partitioned, it was installed as the default configuration comes, I have basic Apache and MySQL services installed because I have a web system that uses those services, but there is a problem with this server that fills up very quickly the hard disk until it ran out of space completely, there was an alert that showed that the root folder was running out of space, the root partition has 200GB, it stopped the apache and mysql services and it was automatically freeing up space again, this may be an attack to the server or internal system errors.

I have tried installing tools like fail2ban to further protect the system and have monitored the server but the disk will fill up anytime soon. What do you recommend for this case, I appreciate the information that you can share with me about it.

in flag
If a system is running out of disk space very quickly, then you’ll want to check the logs (located in `/var/log`) to see why you are running out of space. There is likely a very large file in there telling you about a problem that needs addressing
cn flag
specifically /var/log/apache/error.log and ./access.log "it stopped the apache and mysql services and it was automatically freeing up space again" I would assume it IS indeed a log file since those get compressed every so often (and as a result creating space for a short time)
Desarrollador  avatar
in flag
If I have deleted those log files and even so the space fills up very fast, when I restart the apache service the disk space is freed and it returns to normal, I recreated the log files and created a routine with crontab that empties them every two hours
vn flag
You could cleanup a bit with something like `sudo journalctl --vacuum-size 10M` and then check periodically where is the increase of space usage with `sudo ncdu -xr`
Desarrollador  avatar
in flag
Ready, I will apply those recommendations, thank you very much
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.