DF and DU Disk Usage Investigation Checklist

halfbrain_logo512adminJune 18, 2026
7 lượt xem

DF and DU Disk Usage Investigation Checklist

df and du are must-have tools for understanding disk problems. df shows filesystem usage. du shows directory usage. Together they help find full disks, growing logs, large backups, Docker storage, uploads and database growth.

Core principle

df tells you which filesystem is full. du helps you find what is using the space. Do not delete files until you understand both.

Checklist

  1. Check filesystem usage with df.
  2. Check inode usage.
  3. Find large top-level directories.
  4. Check /var growth.
  5. Check Nginx logs.
  6. Check Docker data if used.
  7. Check backup folders.
  8. Check WordPress uploads.
  9. Check database data size.
  10. Clean or rotate data safely.

Reusable lesson

Disk investigation applies to WordPress, Docker, MySQL, backups, logs, video generation, crawlers, automation pipelines and file upload systems.

Checklist Type Monitoring
Level Beginner
Risk Level Medium Risk
Estimated Time 20–60 minutes

When to Use This Checklist

Use this checklist when a VPS disk is full, backups fail, uploads fail, database stops, Docker grows or logs consume storage.

Required Tools

SSH access, df, du, Docker if used, website root path, backup path, database path

Before You Start

Do not delete large files before identifying what service created them and whether they are needed for recovery.

Structured Checklist Steps

  1. Run df -h.
  2. Run df -i.
  3. Find large directories.
  4. Check /var.
  5. Check logs.
  6. Check Docker.
  7. Check backups.
  8. Check uploads.
  9. Check database.
  10. Clean safely.

Rollback Plan

If cleanup breaks a service, restore the deleted data from backup if available and redesign retention or log rotation instead of deleting blindly.

Common Mistakes

  • Only using df and not du.
  • Ignoring inodes.
  • Deleting database files manually.
  • Deleting Docker volumes blindly.
  • Keeping backups on the same full disk.

Related Commands

df -h
df -i
sudo du -sh /* 2>/dev/null
sudo du -sh /var/* 2>/dev/null
sudo du -sh /var/log/* 2>/dev/null
docker system df
sudo du -sh /var/lib/mysql 2>/dev/null

Share:

Disclaimer: The guides, checklists, commands, and examples on HalfBrain.net are provided for educational and operational reference only. Server environments, hosting providers, software versions, security settings, and WordPress configurations can vary, so you should always review commands before running them on your own system. We do our best to keep the content accurate and useful, but we cannot guarantee that every command, configuration, or recommendation will fit every environment. Always back up your website, database, and server configuration before making changes. HalfBrain.net is not responsible for data loss, downtime, security incidents, misconfiguration, or other issues that may result from applying the information on this website. Use the material at your own discretion.

Leave a Reply

Your email address will not be published. Required fields are marked *