Skip to content

Disk and Filesystem Checks

Disk issues usually show up as secondary failures: services stop writing, deploys fail, temp files break, or databases go read-only.

Terminal window
df -h # show filesystem space in human-readable units
df -i # show inode usage
du -sh /var/* # estimate size of each path under /var
du -sh ./* # estimate size of each path in the current directory
mount # list mounted filesystems
find /var/log -type f -size +100M # find large log files

Space usage:

Terminal window
df -h

Inode usage:

Terminal window
df -i

Big directories:

Terminal window
du -sh /var/* | sort -h
  • A filesystem can have free space but no free inodes.
  • Log growth is a common cause of disk pressure.
  • Temporary directories filling up can break installs, deploys, and service restarts.

Check both df -h and df -i. If you only check bytes, you can miss inode exhaustion completely.

Do not run du blindly at the root of a large filesystem unless you need to. Start in likely hot spots like /var/log, /var/lib, /tmp, and app data directories.