The disk space on my Ubuntu web server, running on DigitalOcean, seems to be full. I have already found and deleted the large log file and restarted Nginx. However, it still seems like there is a problem.
df
shows that it's still full:
$ df -h /
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 50G 47G 22M 100% /
But du
shows that it's not full:
$ du -shx /
3.2G /
What do I need to do to fix this problem?
First check and see if any processes are still referencing the deleted file:
In my case, it was showing that
tail
was still using it:Running
ps x
and filtering by the process name showed me the process id that I needed to kill:In this case, 18961 was the process id. Now kill the process:
Now
df
shows that there is free space again: