Is your server disk space full even when you have not exhausted the allocated resources?
Is your Email no longer delivering or unable to receive Messages due to server Disk space 100% used?
Are you unable to run download or upgrade packages in your Linux server when you use access via SSH?
Is your website no longer accessible due to no disk space available in your Linux server?
As part of our Linux Support Services, we have received countless numbers of support request from our customers seeking support for their Server Disk space rescue when their allocated disk space keeps maxing out.
In this context , we shall look into the common reasons why a server disk space get exhausted automatically beyond the owner's control.
Based on our experience, we have seen in Server environments that the issue is not always due to an actual exhaustion of the resources of the server by rather because the iNodes of the server are full. iNodes is responsible for storing all the Data and information about files in a Linux operating system.
iNodes holds important information of files such as;
i. Files permission information
ii. File Owner ID.
iii. File Group ID.
iv. The Size of the file.
v. The Number of hard links to the file.
vi. The last Time the file was accessed.
vii. The last time the file was modified.
viii. The last time iNodes was modified.
Therefore , it is important that it does not get filled up as this will disrupt the performance of the System.
To check if the iNodes is actually full, you can run the following command;
df -i
If full or about to, you will see that IUse value is 100% used up and no free disk space available.
Since we are sure that the iNodes are out of space, it is best to clear it in the most possible way to restore the disk space of the Linux Server. To do this, first you have to check the status of the memory again. You can run the following commands;
df -h
This will check whether your server have enough free disk space.
Next, check the available iNodes on your server. use the command below;
df -i
Now you will see that it is almost full or the iUse value is 100%.
To clear iNodes , you need to locate the files using the space. To achieve this , use the command below;
for i in /*; do echo $i; find $i |wc -l; done
This will return the sizes of all files in the system along with their respective directories. The largest files you see is most probably the reason why your iNodes are out of space. If you do not get the exact directory, you can keep digging into the directories that have large files until you get the right folder hosting the file causing this issue.
For example, if the file is located in the "var" directory, you can look further into that directory with the following command;
for i in /var/*; do echo $i; find $i |wc -l; done
As soon you you get the folder causing the issue, you should delete it and then restart your web server. In Apache, you can use the following command;
service apache2 restart
After restarting the server, do a reboot with the following command to finalize the restoration of your Server's Disk space;
reboot
Finally, you can check the status of the iNodes space with the following command to see that the space has been restored;
df -ih
In Summary, you can see that in majority of cases, the iNodes are responsible for your disk space appearing to be 100% full. Our Linux Server Experts offer around the clock Server Management Services.