Answer the question
In order to leave comments, you need to log in
Nice disk space calculation?
Good afternoon!
On the notorious klodo I keep the server in the cloud. From time to time, he has a bathurt and somehow he eats up all the space on the hard drive. Moreover, df shows full filling, and du says that the root does not take up all the required 8 GB. Suggest a remedy, please!
Answer the question
In order to leave comments, you need to log in
Recently I encountered a similar phenomenon on one of the servers running CentOS. I had a certain process running there, running under nohup, which, in turn, poured all its output into the text nohup.out. The programmer forgot to remove the debug print from the code, so the output was very massive and after a couple of hours I had a 350 MB text file available. To fix the situation without resorting to restarting the application, I simply deleted the nohup.out file, checked that it was not looming in the FS and calmed down. And a few hours later my server went down safely for lack of space on one of the partitions. In short, I climbed to understand and discovered a curious phenomenon. The file that I allegedly erased perfectly existed in some hypostasis invisible to the ls command and continued to grow until it ate all the space on the volume. The phenomenon is explained by that if a process writes (or reads) to a file, then it clings to it and until either the writing process is completed, or the writing process itself is killed, or the OS is rebooted. Moreover, the df and du commands show completely different results (see here for details ), exactly as you described. Therefore, it makes sense to check what is happening on your server, for example, using the lsof command, it will show all files opened by any processes, even invisible to ls.
And the thesis that this is such a marketing ploy of your cloud provider is more like a joke of humor :)
df, du show different things - maybe 5% of the reserve for root remains?
I don't quite understand what tool you are looking for. du is quite a sane tool, measure /tmp, /var/log, /home, maybe /opt. well, if there are a lot of places, dive further and explore, in the end you will find who ate the place.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question