Disk usage shows how much storage is being used by files, directories, logs, databases, backups, cache, and system data. For a system administrator, disk usage is a direct uptime risk.
Simple explanation
A server can have enough CPU and memory but still fail because the disk is full. When disk space reaches 100%, services may stop writing logs, databases may crash, uploads may fail, and updates may break.
Why it matters
Disk pressure is common on small VPS systems because logs, backups, cache, uploads, and databases grow silently.
Real VPS example
If WordPress suddenly cannot upload images or MySQL refuses writes, check disk usage before assuming the application is broken.
What breaks if you ignore it
Full disk can break database writes, SSL renewal, backups, sessions, plugin updates, and even SSH login behavior.
System Administrator Operating Notes
Core principle, commands, verification, troubleshooting, rollback, and cloud/security connection.
Foundation
Skill Level
foundation
System Layer
storage
Core Principle
Disk usage measures storage pressure. A full disk can break services even when CPU, RAM, and network are healthy.
Mental Model
Think of disk as the server warehouse. If the warehouse is full, workers cannot store logs, database changes, uploads, or temporary files.
When To Use
Use this when websites fail to upload, database writes fail, logs stop, backups fail, SSL renewal fails, or the server becomes unstable.
Wrong Assumption
Beginners often delete random files. A real administrator identifies what grew, whether it is safe to remove, and how to prevent recurrence.
Commands
Command Goal
Check total disk usage, find large directories, identify growth source, and clean safely.
Primary Command
df -h; du -sh /* 2>/dev/null; du -sh /var/* 2>/dev/null; find /var/log -type f -size +100MCommand Breakdown
df shows filesystem usage. du shows directory size. find locates large files. Redirecting errors keeps output readable.
Safe Check Command
df -h; df -i; lsblk; mount | column -tExpected Output
Disk usage should not be near 100%. Inodes should not be exhausted. Critical partitions should have enough space for logs and updates.
Verify Command
df -h; df -i; du -sh /var/log /var/www /var/lib/mysql /tmp 2>/dev/nullTroubleshooting
Common Failures
Full disk, inode exhaustion, oversized logs, old backups, cache growth, database bloat, large uploads, or abandoned temporary files.
Log Files
/var/log/syslog; /var/log/nginx/access.log; /var/log/nginx/error.log; /var/log/mysql/error.logDebug Commands
du -ah /var | sort -h | tail -40; journalctl --disk-usage; find / -xdev -type f -size +500M 2>/dev/nullRoot Cause Map
Start from filesystem fullness, identify top directories, separate logs/backups/database/uploads, then clean only known safe targets.
Fix Pattern
Clean logs through rotation or truncation, remove old backups, clear cache safely, then add monitoring and retention policy.
Risk & Recovery
Risk Level
high
Backup Before Change
Before deleting files, confirm path, file type, owner, service dependency, and whether it is backup, log, cache, or database data.
Rollback Plan
If cleanup breaks a service, restore deleted files from backup if available, fix ownership, restart affected service, and review logs.
Blast Radius
High. Deleting wrong files can damage websites, databases, backups, or application state.
Security Note
Never delete database files directly while database is running. Be careful with backups containing credentials or user data.
Strategic Value
Cloud Connection
Cloud disks may be small by default. Disk monitoring, snapshots, and log retention are essential for VPS reliability.
Automation Opportunity
Automate daily df and du checks, alert above 80%, and rotate logs before emergency cleanup is needed.
Interview Value
Disk troubleshooting is a common real production task because full disk causes many unrelated-looking failures.
Related Concepts
df, du, inode, logrotate, backups, MySQL storage, uploads, cache, monitoring