Skip to content

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 df and findmnt
  • /etc/fstab validation 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:

ActionRiskWhat it does
Docker build cacheSafedocker builder prune -af
Stopped containersSafedocker container prune -f
Dangling imagesSafedocker image prune -f
Journal vacuumSafejournalctl --vacuum-size=200M
APT cacheSafeapt-get clean
Old temp filesSafeRemove files in /tmp older than 7 days
VLoud staging foldersSafeRemove old upgrade staging dirs
VLoud old backupsCautionRemove rollback copies beyond retention
Docker unused volumesDangerousdocker 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