Disk space cleanup issues.

Akshat Tripathi

New Member
Joined
Jun 3, 2019
Messages
26
Reaction score
1
Credits
0
Hello all, In the area of system administration, maintaining disk spaces is one of the most important things for a system admin.
But when we run the commands like "df -h", and see that "/" partition is 100%, usually we panic and why not, you will definitely face problems if your server is hosting web sites.

The first thing we check is what actually consuming disk space with the command like "du -h /" or "du . | sort -nr | head -n10" (lists the top 10 largest files from the current directory), and after that we remove the unwanted large file.

But problem occurs when we check the disk space again and still see "/" is 100% full. What now? We cleaned up the files and still getting the same amount of disk usage by "/". Why is it?

Most of the times that's because some process has kept the deleted file open and that's consuming disk spaces.
To find that out, run the command "/usr/sbin/lsof | grep deleted".

Find the process which is keeping the deleted files open and kill it.
Have you guys ever faced this kind of issue?
 


Latest posts

Top