Search The Hostwinds Guides Knowledge Base

What Is An Inode

This is a common question for many folks that are new to Linux or hosting in general. In the world of Linux you have many file systems and one of the things that remains constant among them is the inode. Data is stored on a Linux file system in two different ways – data blocks and inodes. An inode, short for index node, is like a place holder on the file system that stores data about your data including it’s attributes and disk block location. This is also referred to as metadata. A few examples of metadata are file owner, groups, permissions, access time, creation time and size.

 

Why Is It Important To Monitor Inodes?

Each file that resides on the file system has an inode associated with it regardless of the content or size. Although it is rare for a modern file system to run out of inodes before running out of disk space, there are some cases where servers may face this risk. For instance you can have a directory with many 0 byte files and even though they take up little to no space size-wise, you can still run out of inodes.

Further Examples where you can run out of inodes:

  • Servers with an Ext3 file system that have multiple files but have a block size of 1024 or 2048.
  • Running a containerized server that shares the same file system as the host node which may also have disk quota restrictions.
  • Email servers with high volume of mail queued for delivery

Troubleshooting

The following commands will help you with identifying inode attributes on a Linux file system via the command line interface.

How to list inode number where “l” outputs in long format and “i” prints the index number of each line.

How to list inode information instead of block usage.

How to list inode usage instead of block usage.