Linux server’s disk full

disk-space-utilizationlinuxUbuntuvps

I use WinSCP to upload my website's pages to a remote Ubuntu Linux server (VPS xen hosting).
When I copy a file, it is written in the server with size=0.
When I checked the free disk space:
df -h
I got:
/dev/xvda with Avail=0% and Used=100%
I tried to check for deleted files with:
lsof | grep '(deleted)'
But the lsof command is not found.
What can I do next?

Best Answer

I tried: sudo du -h --max-depth=1 ./ And iterating down the tree, found that /srv/www/mysite.com/logs/access.log has size of 13G!!!! I deleted access.log with rm access.log. But df -h steel reports /dev/xvda 0% avail... Should I do anything else to finally delete the file?????

Now lsof should report deleted file. You should send HUP signal to http server using

/etc/init.d/apache2 reload

In the future avoid this by editing /etc/logrotate.d/apache2 (enter correct path for your logs)

Related Topic