Skip to main content

Storage & Headroom Policy

Principle

Helsinki2 storage is finite. All containers, VMs, and Docker volumes must stay within allocated limits. Uncontrolled growth causes host instability.

Container Rootfs Limits

Each LXC container has a fixed rootfs size. Check and resize:

pct config <CTID> | grep rootfs
pct resize <CTID> rootfs +5G # expand only, no shrink

VM700 Docker Volume Policy

  • All stacks use named volumes scoped to their Compose project
  • No anonymous volumes for persistent data
  • No cross-stack volume sharing

Check usage

ssh [email protected] "docker system df -v"
ssh [email protected] "df -h /var/lib/docker"

Safe cleanup

docker container prune -f
docker image prune -f
# Do NOT run: docker system prune -a --volumes (destroys data)

Log Rotation

Add to all compose services:

logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"

Audits

Storage audits should be performed before:

  • Adding a new service
  • Extending a container rootfs
  • Running a full backup

Check all container rootfs:

for ct in $(pct list | awk 'NR>1{print $1}'); do
echo "CT$ct: $(pct config $ct | grep rootfs)"
done