Disk Full: Diagnosis and Resolution

Quickly identify a saturated disk and free up space.

A full disk is one of the most frequent causes of silent failures. When there's no more space, logs stop writing, the database refuses writes, and everything freezes. Here's how to respond.

Symptoms

  • "No space left on device" errors
  • Database in read-only or write errors
  • PHP sessions that no longer work
  • Logs that suddenly stop

Common Causes

  • Unrotated logs: Log files that grow indefinitely without rotation.
  • Local backups: Backups stored on the same disk without purging.
  • User uploads: Uploaded files without size or retention limits.

Diagnostic Steps

  1. Check space with df -h
  2. Find large files with du -sh /* | sort -h
  3. Identify deleted but still open files (lsof | grep deleted)
  4. Check inodes with df -i

Automate with MoniTao

MoniTao detects full disk effects:

  • Alerts on sudden 500 errors
  • Heartbeat to detect failing jobs
  • Monitoring of endpoints that write data

Best Practices

  • Configure logrotate for all logs
  • Store backups on an external volume
  • Implement quotas for uploads
  • Monitor disk space with an alert at 80%

FAQ

Why is my disk full when I deleted files?

Processes keep files open. Restart them or use lsof to find them.

What are inodes?

Inodes store file metadata. You can run out with many small files.

How to prevent this problem?

Log rotation, old backup purging, and disk space monitoring.

Can MoniTao monitor disk space?

Not directly, but it detects errors caused by a full disk.

Ready to Sleep Soundly?

Start free, no credit card required.