Discrepancy between df and du-solved
For a couple of days cPanel has been complaining that /usr is almost full. Sure enough, `df -h` show that /usr is almost full. `du -sh /` on the other hand, says I have tons of room left. So what gives?
The solution as found here, is quite simple. A file has been deleted, but the process that was using the file is still running.
First step is to find the deleted files sorted by size:
sudo lsof -s | grep DEL | sort -rnk 7,7
The large files for me were being used by Apache, and a quick restart with `/etc/init.d/httpd restart` quickly showed that `df -h` now showed lots of free space.
The root of the problem for me? I had placed a directory in /tmp to catch Apache core dumps. The directory had been cleaned up, but Apache was still trying to put core dumps there.