checkId: check.storage.diskspace plugin: stellaops.doctor.storage severity: fail tags: [storage, disk, capacity, core]

Disk Space Availability

This Doctor check helps operators catch drives approaching capacity before disk exhaustion takes down database writes, evidence storage, and log rotation.

What It Checks

Verifies disk space availability on drives used by Stella Ops. The check:

Why It Matters

Disk exhaustion causes cascading failures: database writes fail, evidence cannot be stored, log rotation breaks, and container operations halt. This is a severity-fail check because disk exhaustion can cause data loss and service outages that are difficult to recover from.

Common Causes

How to Fix

Docker Compose

# Check disk usage
docker exec <platform-container> df -h

# Cleanup old logs
stella storage cleanup --logs --older-than 7d

# Prune Docker resources
docker system prune -a
docker volume prune

Bare Metal / systemd

# Find large files
du -sh /var/lib/stellaops/* | sort -rh | head -20

# Cleanup logs
stella storage cleanup --logs --older-than 7d

# Cleanup temporary files
stella storage cleanup --temp

# Review Docker disk usage
docker system df

Kubernetes / Helm

# Check PV usage
kubectl get pv
kubectl exec -it <platform-pod> -- df -h

# Expand PVC if needed
kubectl edit pvc stellaops-data  # increase storage request

Consider setting up automated cleanup policies:

storage:
  cleanup:
    enabled: true
    logRetentionDays: 30
    tempCleanupSchedule: "0 4 * * *"

Verification

stella doctor run --check check.storage.diskspace