checkId: check.core.env.diskspace plugin: stellaops.doctor.core severity: fail tags: [quick, environment, resources]

Disk Space

Doctor check check.core.env.diskspace — for operators confirming a Stella Ops host has enough free disk for logs, evidence, SBOMs, and scan artifacts before low space starts dropping writes.

What It Checks

Verifies sufficient disk space is available on the drive where the application is running. The check reads the drive information for the current working directory and applies two thresholds:

ThresholdValueResult
Critical (fail)Less than 1 GB freefail
WarningLess than 5 GB freewarn
Healthy5 GB or more freepass

Evidence collected includes: drive name, free space, total space, and used percentage.

Why It Matters

Stella Ops services write logs, evidence files, SBOM data, scan results, and temporary processing artifacts to disk. When disk space is critically low:

Common Causes

How to Fix

Docker Compose

Check disk usage and clean up:

# Check overall disk usage
df -h

# Find large files
du -sh /var/lib/docker/* | sort -hr | head -20

# Clean Docker artifacts
docker system prune -a --volumes

# Clean application temp files
docker compose exec <service> rm -rf /tmp/*

# Set up log rotation in compose
# Add to your service definition:
logging:
  driver: json-file
  options:
    max-size: "10m"
    max-file: "3"

Bare Metal / systemd

# Find large files
du -sh /* | sort -hr | head -20

# Clean temp files
rm -rf /tmp/*

# Rotate logs
sudo logrotate -f /etc/logrotate.conf

# Check and clean old journal logs
sudo journalctl --vacuum-size=100M

Kubernetes / Helm

# Check node disk usage
kubectl top nodes

# Check PVC usage
kubectl exec -it <pod> -- df -h

# Set ephemeral storage limits in Helm values:
resources:
  limits:
    ephemeral-storage: "2Gi"
  requests:
    ephemeral-storage: "1Gi"

Verification

stella doctor run --check check.core.env.diskspace

See the Doctor reference for the full check catalog, CLI usage, and export bundles.