An inode is a unique record number for all information about a file or folder in Linux and Unix systems. Every file on your web hosting account has an inode assigned to it.
To ensure stability and consistency in its system, servers treat every component as a file. This includes system processes, hardware devices, and directories.
Conventional files such as videos, text, music, or other multimedia files all come with metadata data.
To access this file, the user inputs the filename, but in the system, the file name is linked to respective inode numbers stored in a table structure—making this possible.
The inode, therefore, is responsible for managing the file metadata information necessary to read this file in a table structure.
How do Inodes Relate to the Structure of a File System?
Think of inodes as a data structure that points to blocks that make up a file.
Data blocks and inodes are the two components of a file system. Once the system creates a file directory, the number of data blocks remains fixed and cannot be changed.
The directory does not contain the path, name, position, links, or other file properties. Directories instead include the file names and the inode numbers that correspond to them.
You can create a hard link in the file system, resulting in one file having multiple names. A hard link generates a new name in the table with the same inode but doesn’t transfer the file.
To maintain a hard link, an inode doesn’t contain the name of a file. Instead, it stores other information, separated from the file name, that lets you access various file names pointing to one inode.
If you were moving a bulky file, it is rather efficient to create a new name in a new directory first and delete the old directory. You may also rename old files the same way.
Within the server file system hierarchy, the file names are linked to the inodes, which connect to the physical data.
Attributes of an Inode and How it Works?
Inodes are found at the start of a partition. This partition acts as a boundary in your web hosting account disk that indicates how much space a file system can use.
When you create a new file, the system assigns a file and inode number, which it stores as entries in an index. If you search for a file by name, the system looks for the associated inode number in the file directory where it resides.
An inode number has the following attributes:
- File User ID
- File Group ID
- Device ID
- File creation date
- Permissions and Access control
- File types
- Number of hard links
- Metadata information.
The number of inodes on your web hosting account shows how many files, directories, emails, or other items you have on your account.
How to Check Inode Usage in SPanel
Here’s how to check how many inodes you’ve used on your server and how much you have remaining.
- log in to your SPanel account.
- On the right corner, under Resources, you’ll see the disk and inodes usage.
To see detailed statistics of disk usage for all files and folders on your account, navigate to Files and click on Disk usage. Select any folder to view its content.
If you use up all your inodes, you’ll run out of space in your file system. This can prevent you from creating new files even if you have enough disk space on your server.
How to Free Up the Number of Inodes Your Account Uses
Since the inode usage on your account affects the number of files and folders you can create, you must reduce your inode count by reducing files and folders you don’t need.
You can do this through the File Manager or accessing your files to an FTP client—Filezilla.
Here’s how to go about it.
Delete and Uninstall Inactive Plugins
If you use WordPress, please uninstall any plugins that aren’t in use on your blog. When you deactivate the plugins, the codebase remains on your account and consumes your inodes limit.
Delete Unnecessary Backup Files
Sometimes, scheduled plugins or third-party services can fill up your disk space if left unchecked. To save disk space and inodes, download and delete unused backups from your account.
Clear Your Cache Regularly
It’s usual for many web applications these days to use file caching. This can take up disk space on your account, thus affecting the total inode limit.
To check this, reduce cached files stored in the website’s cache folder.
If you use WordPress, you can use the SG Optimizer plugin to help you monitor caching and performance. If you want to do it manually instead, you can see the cache files in the wp-content folder.
Clear the Obsolete Cache (.opcache) System Folder
You can uninstall the .opcache system folder in your account using FTP. If you use PHP 7.x, this is where obsolete caches are stored.
As you use the program, the cache will be restored but won’t outdate cached files from older PHP accounts.
Remove Unused Images
WordPress themes might generate multiple copies of an uploaded image, some of which you may never use. These images clog your disk space and affect your inode limit.
Remove unused image sizes by checking your theme settings and deleting the ones you won’t need. You can use the Regenerate Thumbnails plugin to regenerate thumbnails while deleting unused image sizes.
Reduce Unnecessary Emails
Clear out your trash and spam folders regularly, as they can store up many unnecessary emails.
While you’re at it, now is the best time to deactivate emails from newsletters you never read.
If you still don’t have sufficient space or cannot create files on your account, you should consider a higher web hosting package that suits your inode needs.