Skip to content
Linux & VPS

Fix "No Space Left on Device" on Linux

No space left on devicedisk fullwrite error
8 min read Updated 12 June 2026 ESAGAMES Team

"No space left on device" stops a server from writing — saves, logs, databases all fail. Usually the disk is genuinely full, but sometimes it's inodes or Docker layers. Here's how to find and fix it, and stop it recurring.

The disk is usually genuinely full — but the confusing cases (df shows free space, yet writes still fail) trip people up. Match your situation:

SymptomCauseHow to confirm
df -h shows the disk 100% fullDisk genuinely fulldu -sh /* to find the big folders
df -h shows free space, but writes failOut of inodes (too many tiny files)df -i shows 100% on that filesystem
Space "used" but nothing visibly thereDeleted-but-open files still heldlsof +L1 lists them; restart the holder
Only one folder failsA separate mount/partition is fulldf -h and check that mount specifically
Fills up fast on a Docker hostOld images/layers/volumesdocker system df, then docker system prune

Confirm what's full

Check disk usage per filesystem first:

df -h          # space used per filesystem
df -i          # inode usage (the sneaky one)

Find the big folders

Track down what's eating space, largest first:

du -sh /* 2>/dev/null | sort -h
du -sh /home/* /var/log/* | sort -h

The usual culprits

  • Log files — runaway logs in /var/log or a server's logs folder.
  • Backups — old world/database backups piling up.
  • Crash dumps / core files — large hs_err / core files.
  • Temp files — leftovers in /tmp or download caches.
Out of inodes, not space?

If df -h shows free space but writes still fail, df -i is the answer — you ran out of inodes (too many tiny files). Delete large numbers of small junk files (old cache/session files) to recover.

Free space safely

Delete old logs/backups you don't need, truncate a giant active log rather than deleting it, and set up log rotation so it can't happen again:

truncate -s 0 /path/to/huge.log   # empty a live log safely
journalctl --vacuum-size=200M     # trim systemd journals
df -h for space, df -i for inodes, du to find the hog. Clear logs/backups, set up rotation, and you're back.

Docker and quota-specific causes

  • Unused Docker images, stopped containers and dangling build layers under /var/lib/docker/overlay2 can silently consume tens of GB — docker system prune (carefully, after reviewing what it will remove) reclaims it.
  • Some hosting plans enforce a separate storage quota below the actual disk size — if df -h shows plenty of space but writes still fail, see fixing disk quota exceeded.
  • Game server auto-save/backup features (world saves, database dumps) can accumulate faster than expected on a busy server — cap how many old backups are kept.

How to prevent it recurring

  • Set up log rotation (logrotate) for anything that writes continuously.
  • Cap the number of retained backups instead of keeping them forever.
  • Monitor disk usage with alerts before it hits 90%+, not after a crash.

NVMe storage, monitored

Our hosting runs on fast NVMe with sensible defaults and monitoring, so a full disk doesn't take you offline.

See hosting
FAQ

Frequently asked questions

Why does Linux say "no space left" when df shows free space?

You've likely run out of inodes, not bytes. Run df -i — if inode use is at 100%, too many small files filled the table. Delete large numbers of tiny junk files to recover.

How do I find what's using my disk space?

Use du -sh /* | sort -h to see the biggest top-level folders, then drill down. Common culprits are logs, old backups, crash dumps and temp files.

How do I safely empty a huge log file?

Use truncate -s 0 /path/to/file.log to empty it without deleting it (so the running process keeps writing). Then set up log rotation to stop it recurring.

Can Docker fill up my disk even if I don't see big files anywhere obvious?

Yes — unused images, stopped containers and build cache layers live under /var/lib/docker and don't show up in a casual du of /home or /var/log. Check docker system df and prune carefully.

What's the difference between "no space left" and "disk quota exceeded"?

No space left means the filesystem itself is full. A quota error means a per-account/per-directory limit set by your hosting plan was hit, even though the underlying disk may have room — the fixes differ.

How often should I check disk usage to avoid this?

Set up automated monitoring/alerts at a threshold like 80-90% rather than checking manually — by the time df -h shows 100%, services are already failing.

Knowledge base

Related articles

Skip the troubleshooting

Managed, protected hosting in Frankfurt — we handle the Linux, the network and the DDoS so you don't have to.

Payments Secure checkout with cards, banking apps and digital wallets.

Choose the payment flow that fits your stack and region without leaving the platform.

Pay by Zen Visa Mastercard Paysafecard PaysafeCash Skrill Trustly Bancontact UnionPay iDeal WebMoney