CompTIA Linux+ (XK0-006)TroubleshootingMedium

Users report they cannot create new files in /data even though `df -h` shows only 20% disk space used on that filesystem. Which command should the technician run next to diagnose the problem?

  1. Alsblk /data
  2. Bdu -sh /data
  3. Cstat /data
  4. Ddf -i /data
Show answer & explanation

Correct answer: D. df -i /data

When free space exists but files cannot be created, the filesystem has likely run out of inodes. `df -i` reports inode usage, and if IUse% shows 100%, no new files (which each require an inode) can be created regardless of available disk space.

Why the other options are wrong

  • A. lsblk shows block device layout, not inode statistics.
  • B. du -sh reports directory size usage, not inode counts.
  • C. stat shows metadata for a single file/directory, not filesystem-wide inode usage.

Inode Exhaustion

Every file consumes one inode; a filesystem can run out of inodes (many small files) even when disk block space remains available.

  • Check with df -i
  • IUse% 100% means no inodes remain
  • Common cause: millions of tiny files (e.g., session caches, mail spools)

Memory trick: Blocks hold data, inodes hold file entries — run out of either and writes fail.

More Troubleshooting questions