A process creating many small files fails even though block space remains.
Check inode usage for the filesystem containing /var.
Which command is appropriate?
df -i reports inode usage. A filesystem can have free blocks yet reject new files when its inode pool is exhausted.
Detailed explanation
du -ih /varIncorrect. du -i is not the general filesystem inode report requested here.
Incorrect. du -i is not the general filesystem inode report requested here.
df -h /varIncorrect. df -h reports block capacity, not inode counts.
Incorrect. df -h reports block capacity, not inode counts.
df -i /varCorrect. df -i /var reports inode usage and availability.
Correct. df -i /var reports inode usage and availability.
fsck -i /varIncorrect. fsck -i is not the standard way to report inode availability.
Incorrect. fsck -i is not the standard way to report inode availability.
Try it yourself
An example you can run in a temporary verification environment.
df -i /varExpected result
/varを格納するファイルシステムのinode総数・使用数・空き数Key points
- -i displays inodes
- Many small files can exhaust them
- This differs from block space
Notes
- Environment: GNU coreutils 9.x
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.