QA
Intermediate LevelLinux Commands & SysAdmin

What is an Inode and what happens when a Linux filesystem runs out of free inodes (df -i)?

❓ Interview Prompt: Explain Inodes (index nodes), file metadata storage, checking inode usage (df -i), and inode exhaustion troubleshooting.

An Inode (index node) is a data structure on Linux filesystems that stores metadata about a file (permissions, owner, size, timestamps, data block pointers) EXCEPT its filename.

Inode Exhaustion Issue:

Every filesystem has a fixed maximum number of inodes created during formatting. Creating millions of tiny 0-byte files can exhaust free inodes ('df -i' shows 100% full), preventing new file creation even if 'df -h' shows gigabytes of free disk space!

Code Implementation Example

bash
# Check inode usage across filesystems
df -i

# Find directory containing millions of tiny files consuming inodes
find /var/spool -type d -exec sh -c 'echo -n "{} "; ls -1 "{}" | wc -l' ;
💡Diagnosing inode exhaustion using df -i and counting directory file handles.
🎯 Interview Key Takeaway

Use df -i to diagnose filesystem write failures caused by inode exhaustion when free disk space remains.

#Inodes#Filesystem#df -i#Debugging#Intermediate
Back to all Linux Commands & SysAdmin Questions→

More Linux Commands & SysAdmin Interview Questions

Beginner LevelLinux Commands & SysAdmin

How do Linux File Permissions (chmod, chown, chgrp) work in Octal and Symbolic notation?

Beginner LevelLinux Commands & SysAdmin

What is the Linux Filesystem Hierarchy Standard (/bin, /etc, /var, /usr, /opt, /tmp)?

Beginner LevelLinux Commands & SysAdmin

What are File Descriptors (0=stdin, 1=stdout, 2=stderr) and Redirection (>, >>, 2>&1)?