What is Inode?
How to find the INODE usage on Linux”. You know, in Unix/Linux everything is considered as a file. An Inode is a data structure that stores various information about a file. This includes
- File type (executable, block special etc)
- Group Owner
- File Size
- File access, change and modification timestamp
- File deletion timestamp
- Number of links (soft/hard)
- Access Control List (ACLs)
First of all, let me briefly explain about Inode. Index Node (inode) is a basic concept in Linux/Unix. Index node/number (inode) is a data structure which contain the information about a file in your server/hosting account.
Inode save the information such as user and group ownerships, access mode (read, write, execute permissions) and file type.
Number of inodes indicates the number of files and folders in your account. Every file like a webpage, image file, an email, cache file etc will count as 1 inode.
In a WHM server, you can view the inode usage of your account from left side of your cPanel which is denoted by the term “File Usage”.
Inode usage Exceeded
If your account has reached/exceeded the Inode usage and you’re not sure about the reason for this. Don’t worry. Here’s the solution for this! If the account has reached the maximum inodes allocated for your account then it’ll affect your account, website and email performance.
You won’t be able to send/receive new emails, you won’t be able to upload a new file to your account. Hence it’ll affect the total performance of your account.
To know which is consuming the inodes
Number of Inodes indicates the number of files and folders in your account. Every Shared Hosting provider will have some INODE limits set on their server’s and hence it’s important to check the inode usage on your account regularly. This is because you won’t be able to add new files once you have reached the Inode limit allocated to your account.
If you have SSH access to your account the following commands will help you to understand the inode usage in your hosting account.
# find . | wc -l
This command will give you the total inode count of your account. To get the detailed inode usage that is which files/folders are consuming more inode you can use the following command.
# echo "Detailed Inode usage for: $(pwd)" ; for d in `find -maxdepth 1 -type d |cut -d\/ -f2 |grep -xv . |sort`; do c=$(find $d |wc -l) ; printf "$c\t\t- $d\n" ; done ; printf "Total: \t\t$(find $(pwd) | wc -l)\n"
This will give the Inode usage of your current working DIRECTORY. If you need to find the Inode usage of your entire hosting account, execute this command in the location /home/
Reduce Inode usage
Using FileManager you can remove unnecessary files/folders from your account.If you have the backups stored in your root directory, that is /home/user; you can download it to your local machine using FTP or FileManager.
If there’re large amount of cache files, you can use the purge functionality to clear the cache folders. This can be done via administrator panel.
Emails will also add inode to your account. If you’re storing all emails in the server WEBMAIL which you think as important emails you can archive emails like emails which are older than 6 months and you can download it your local machine.
If you have enabled Default Address (catch all) for your account, you should regularly check the mailbox and clear all the unwanted emails. You need to delete all the unusing email accounts. Also you should check your email accounts and need to delete spam emails.
These are ways to find exact inodes value.