Disk Space Disappearing (or seeming to)
I do a du command every week or so or when disk space is low. Here is the whole history:
The command I do is:
$ su
$ cd /
$ du | sort -n -k1,7 -r | head -n50
As you can see in the spreadsheet, it looks like I am doing well, the total space in use in root and other directories is maintained and actually shrinking sometimes.
And yet, when I do a df, I see the percentage free dropping. It used to float around 85-90 and now it seems to always be pushing over 90 going higher.
For example, right now df says:
/dev/xvda 16255928 15085160 510168 97% /
The two sets of data don't align. The amount of used space that df says doesn't match at all what du says.
Can someone help me interpret what might be going on, or where my disconnect is (which can be entirely my ignorance?)
Thanks a lot!
4 Replies
Files are not truly removed as long as anything still uses them, even if they are not shown in the filesystem tree.
@hawk7000:
Is it possible that you have programs running that have files which you have unlinked open still?
Files are not truly removed as long as anything still uses them, even if they are not shown in the filesystem tree.
Good thought. It's a running server, with a fairly big mysql database and other processes…. That might explain it, I guess.
Follow up question then would be, is there any way, short of rebooting, to cause mysql to release blocks that it's holding on for for one reason or other?
Thanks!
As for making mysql release space you may want to "optimize" tables (
(Edit: The latter is unrelated to your disk usage mismatch)
I set up
Also you can expand your disk with the free space you were given last week!