Today I had an issue on / with shortage of disk inodes on a cPanel dedicated server.
In computing, an inode is a data structure on a traditional Unix-style file system such as UFS. An inode stores basic information about a regular file, directory, or other file system object.
In layman’s term – Every time a file is created or uploaded on a server, an inode is created. Simply say, inode is the count of the number of files on your server may it be a VPS or dedicated server.
The number of inodes used can be checked using below command (example is for /root) :
for i in /root ; do echo $i; find $i -type f | wc -l ;done
For my current issue it was the comet directory which was using up the space / inodes. The comet directory is usually filled on a high mail traffic server.
/root/.cpanel/comet
You can safely clean up the comet directory by running the following command that will remove all files in this directory that have not been accessed in more than three days.
/usr/local/cpanel/bin/purge_dead_comet_files
Example :
root@linuxbabu [~]# df -i /
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda6 960992 960992 0 100% /
root@linuxbabu [~]#
root@linuxbabu [~]# /usr/local/cpanel/bin/purge_dead_comet_files
******Cleaning up comet for root...Done
root@linuxbabu [~]#
root@linuxbabu [~]# df -i /
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/sda6 960992 31278 929714 4% /
root@linuxbabu [~]#
This should free your Inodes / Disk space.
🙂