Skip to main content
InterviewHubPRO
Section Overview
Q46

Question 46 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

92%
Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

Linux Inodes, Hard Links vs Symbolic Links, and recovering from Inode Exhaustion.

senior LevelCode Examplelinux-osAdvanced Internals

In Simple Words:

  • Inode (Index Node): A data structure storing metadata about a file (permissions, owner, size, timestamp, pointers to disk data blocks), but not the file name or file content.
  • Hard Link: A new directory entry pointing to the same inode number. Modifying either modifies the underlying data. Deleting one hard link does not delete data until all links are removed. Cannot span across different filesystems.
  • Symbolic Link (Symlink): A pointer file containing the string path to another file.
  • Inode Exhaustion ("No space left on device" with 50% disk space free): Happens when millions of tiny 0-byte cache or session files exhaust the filesystem inode table:
    bash
    df -i # Inspect inode usage percentage
    find /var/spool/clientmqueue -type f -delete # Clean up millions of small files