Error Reference › Linux / Server
Linux / Server
No space left on device (ENOSPC)
The disk (or the inode table) is full, so the write failed.
What it looks like
Error: ENOSPC: no space left on device, write
write /var/lib/docker/tmp/GetImageBlob123: no space left on device
What does "No space left on device (ENOSPC)" mean?
Reported by the operating system when a write fails because the filesystem is full — either out of bytes or out of inodes (the entries that track files). Apps then fail in odd ways: databases refuse writes, logs stop, uploads break.
What causes "No space left on device (ENOSPC)"?
- The partition is out of free space.
- Logs/temp files filled the disk.
- Out of inodes (many tiny files).
How do I confirm the cause?
- Run df -h to see which filesystem is full, and df -i to check inodes.
- Find what is using space: du -xh / --max-depth=2 | sort -h shows the biggest folders.
- Check the usual suspects: log files, /tmp, old releases, Docker images and volumes (docker system df), and package caches.
How do I fix "No space left on device (ENOSPC)"?
- Check usage with df -h (space) and df -i (inodes).
- Delete/rotate large logs and old files.
- Grow the volume if it's legitimately full.
How do I stop it happening again?
- Rotate and compress logs (logrotate), and clean up old builds and Docker images on a schedule.
- Alert on disk usage (for example at 80%) instead of finding out when writes fail.