Unix and Linux File system Inodes

If you have worked with Unix or Linux dedicated servers, you might have heard the term inode and not paid it much attention. Each object of a Unix or Linux file system is represented by an inode. The inode contains information about the file and its attributes and may include the following details:

  • File type
  • Permissions
  • Owner
  • Group
  • File Size
  • File access
  • File deletion time
  • Number of links
  • Extended attribute
  • Access Control List (ACL)

File system objects include regular files, directories, and links to files and directories. Each object is associated with an inode number that contains metadata about the file but no actual file names. The POSIX standards outline specific file system requirements for inode attributes, including: size of the file, device ID, user ID, group ID, file mode, timestamps, link count, and pointers to disk blocks.

In most instances, you will not work directly with inodes, and it is only general information that you need to know. In case of disk errors, file system checks, and data recovery, it may be important to know how to retrieve file and directory information when you have nothing but an inode number. Furthermore, inode usage is important for web servers because it is possible to use up all of the inodes available on a disk even if there is still actual physical space remaining. This is because some files may have several links and thus require multiple inodes.