ND-0032 / LINUX OPERATIONS
Linux Says “No Space Left.” Why Does df Show Room?
The service can read existing files but fails whenever it makes a new one. The dashboard still shows gigabytes free. Before you extend the disk or delete files, check what the application ran out of and which filesystem it was writing to. Run two checks against the same path Use the existing parent directory of […]
The service can read existing files but fails whenever it makes a new one. The dashboard still shows gigabytes free. Before you extend the disk or delete files, check what the application ran out of and which filesystem it was writing to.
Run two checks against the same path
Use the existing parent directory of the failed write. For a containerized service, run the checks from the same mount namespace as the service. The host’s view may point at a different filesystem.
df -h -- /var/spool/myapp
df -i -- /var/spool/myapp
df -h shows block usage. df -i shows inode usage, where the filesystem reports it. A new file generally needs a new inode even if its contents are tiny. A backlog of small files can exhaust that supply while the byte count still looks comfortable. GNU df manual
Read the two numbers together
Suppose the first command shows 36 GB available and the second shows zero free inodes on the same ext4 volume. That points to inode exhaustion. Look for a growing spool, cache, or temp directory, then check which process owns it and what the files are for. If both readings have headroom, preserve the exact error and check the app’s actual write path, quota or storage-layer limits. The two df readings don’t settle those questions.
Restore writes without losing work
Pause or rate-limit the producer if your runbook permits it. Check retention and incident-preservation requirements before touching the files. Use the application’s supported cleanup or drain procedure for confirmed disposable data. Don’t delete an active queue to make a graph green.
Verify that free inodes increase and that the service, under its normal identity, can create and finish a representative item. If the backlog starts growing again, fix the consumer or retention rule before calling the incident closed.
Evidence: The command behavior is documented. The outputs above are illustrative; we did not fill a filesystem or test quota behavior for this article.
Related: The First 15 Minutes of a Linux Incident.