Disk Guardian
Storage monitoring, cleanup engine, and disk intelligence for preventing root-disk exhaustion.
Vloud’s Disk Guardian prevents root-disk exhaustion on production servers. Built after a real incident where a 38GB root disk reached 100% due to Docker build cache and journal logs.
What it monitors
The Disk Guardian runs a background check every 15 minutes and monitors:
- Root filesystem usage with thresholds at 80% (warning), 90% (critical), 95% (emergency)
- Docker storage: build cache, dangling images, stopped containers, unused volumes
- Journal/log sizes and large log files
- VLoud release artifacts: old rollback copies, staging folders, downloaded archives
Storage Intelligence
The discovery engine collects disk and partition information:
- Physical and virtual disks via
lsblk - Mount points and filesystem types via
dfandfindmnt /etc/fstabvalidation against actual devices- Detection of unmounted partitions and extra attached disks
- Warnings for fstab entries pointing to missing UUIDs
Cleanup actions
Nine built-in cleanup actions with risk classification:
| Action | Risk | What it does |
|---|---|---|
| Docker build cache | Safe | docker builder prune -af |
| Stopped containers | Safe | docker container prune -f |
| Dangling images | Safe | docker image prune -f |
| Journal vacuum | Safe | journalctl --vacuum-size=200M |
| APT cache | Safe | apt-get clean |
| Old temp files | Safe | Remove files in /tmp older than 7 days |
| VLoud staging folders | Safe | Remove old upgrade staging dirs |
| VLoud old backups | Caution | Remove rollback copies beyond retention |
| Docker unused volumes | Dangerous | docker volume prune -f (may contain data) |
All cleanup defaults to dry-run mode. Every non-dry-run execution is recorded in the audit log.
Safety guarantees
The Disk Guardian never auto-deletes:
- Docker volumes (may contain databases or uploads)
- Database directories (
/var/lib/postgresql,/var/lib/mysql,/var/lib/redis) - User home directories (
/home) - The current active VLoud release or its immediate rollback
- License, state, or configuration files
Upgrade preflight
Before any upgrade, the preflight check verifies sufficient disk space for:
- Release archive download (~35 MB)
- Extracted release (~200 MB)
- Backup/rollback copy (~200 MB)
- Staging folder (~200 MB)
- Safety margin (2 GB minimum)
If space is insufficient, the upgrade is blocked with a clear message listing suggested cleanup actions and their reclaimable space.
UI
The Disk Guardian page is available at /disk-guardian in the admin panel, under Observability. It shows:
- Summary cards for root usage, Docker reclaimable, journal size, and old releases
- Warnings panel with prioritized storage alerts
- Cleanup actions with risk badges and one-click execution
- Docker storage detail breakdown
- Journal and log file analysis
- Disks & Mounts table with usage percentages
- VLoud release artifact list