“No space left on device” can mean exhausted data space or exhausted inodes. Identify the filesystem containing the failed write before deleting anything. Free space on another mounted volume does not help the full destination.
Check the mount and inode use
df -h
df -i
du -xhd1 /var 2>/dev/nullThese GNU/Linux examples report mounted filesystem capacity, inode usage and a one-level directory summary under /var. The du command stays on one filesystem and can take time on a large directory. Without sufficient read permissions its results may omit data; inspect permission errors when the totals seem incomplete.
| Finding | Interpretation |
|---|---|
| High byte usage | Large files or many accumulated files need investigation |
| High inode usage | Many small files may be exhausting metadata capacity |
| df and du disagree | Check mount boundaries, permissions and deleted-but-open files |
| Only one mount is full | Move or expand the relevant storage, not an unrelated volume |
Make room without discarding live state
Start with known disposable artifacts under the owning application’s retention policy. Preserve useful failure logs before cleanup. Do not delete database files, container storage internals or unfamiliar system directories to gain space quickly.
- Stop or reduce the workload generating uncontrolled growth.
- Identify the owner and purpose of the largest or most numerous files.
- Confirm backups for data that must be retained.
- Use the application’s supported cleanup or rotation mechanism.
- Recheck free space and confirm the failed application can write normally.
If a deleted file remains open, its space may not be released until the owning process closes it. Arrange a controlled application restart only after identifying that process and its impact. A larger virtual disk may also need partition and filesystem expansion; purchasing capacity does not prove that the filesystem has grown.
Set log retention to prevent recurrence and keep backups outside the filesystem you are repairing.
Sources and references
Hosting documentation. Publication and update dates reflect this edition.
Related articles
- Keeping Linux Logs Useful Without Filling the DiskSeparate journal, application and container logs, then choose retention that supports diagnosis and recovery.2 min read
- VPS Backups: Snapshots, Offsite Copies and Restore TestsBuild a recovery plan around consistent application data, independent storage and a restore procedure you can execute without the original VPS.3 min read
- Diagnosing a Linux Service That Will Not StartUse systemd status and the service journal to find the first failure before changing restart settings.2 min read
