CertGrid CertGrid
Hands-on Lab·Linux Foundation Certified System Administrator

When a filesystem fills, or refuses

No space left on device has three quite different causes, and only one of them is solved by deleting files. This guide produces all three deliberately - the root reserve, exhausted inodes, and a deleted file still held open - and shows the command that finds each one.

Storage Guide 36 of 38 Advanced

ext4 reserves 5% of blocks for root by default and fixes its inode count at mkfs time; xfs allocates inodes dynamically and does not have the second failure mode. lsof, df -i and tune2fs are the same on both families.

Everything happens on a 512 MiB loop device made from a file, created and destroyed inside the transcripts. Nothing on the host was filled.
Server NameIP AddressOSRolesCPURAMHDD
LFCS-A01192.168.0.70Ubuntu 26.04 LTSPrimary host - most guides run only here2 Core4 GB50 GB

This guide includes

Use this because "no space left on device" has three quite different causes. This matters because only one of them is a full disk - and df will never show you the third.

Before you start

  1. Full, and what full means

  2. The 5% you cannot use

  3. Space back without deleting anything

  4. Finding what is using the space

  5. The space that df and du disagree about

  6. Finding the process holding it

  7. Reclaiming it with the process still running

  8. Full, with 99% of the space free

Official sources