Linux Commands / IT Support Guides
Diagnose inode exhaustion with df -i
Use df -i to check whether a filesystem has room to create more files.
Environment and inputs: Linux · Bash-compatible shell; package and service names vary by distribution
Understand the problem
An inode holds metadata for a filesystem object such as a file or directory. Many small files can use up the available inodes while leaving disk space free.
Run the command
Run df -i and find the row for the filesystem that holds the affected folder. To narrow the output, add that folder as an argument, for example df -i /var/log.
df -i
Read the output
Read IFree and IUse% on that row. If IFree is 0 and IUse% is 100%, the filesystem has no free inodes. A modest percentage on that row is a reason to check available bytes or other limits.
Choose the next step
If free inodes are low, look for directories with unusually many files on the affected filesystem. Check whether old cache, temporary, or rotated files are eligible for cleanup under the retention policy.
Before making changes
Record the mount point and the inode counts before changing anything. After an approved cleanup, run df -i again and confirm the affected application can create a file.