ข้ามไปยังเนื้อหา

imageshare (194.1.0.11) root disk relief — Tier 1

Date: 2026-11-18 16:10–16:12 (+07) Related: GitHub #7 (disk 98%→100%), epic #16 security/reliability audit Severity: P0 — data-loss risk active at execution time Status: ✅ Tier 1 + Tier 2 complete (mitigated). Tier 3 pending approval.

Issue #7 progressed from 98% (2026-07-10 audit) to 100% full / 164MB free — DiskSpaceCritical has fired continuously since 2026-05-31 (~6 months unacknowledged). Primary risk: MariaDB write failure → crash → refuses to restart (crash recovery needs space). Hosts Chevereto (imagesharing.ovbhospital.com, Medical Technology Dept photo archive), Moodle LMS, Guacamole 1.4.0, Portainer. No clinical/IoT blast radius — VM is independent of the HA/water/AC paths.

  • /var/log/journal = 1.8G — journald running with no cap (defaults only)
  • One dangling image (ghcr.io/chevereto/chevereto:<none>, 947MB, 3y old)
  • apt cache 88M. Inodes fine (35%) — byte-level exhaustion.

Read-only safety first, then cleanup. No container restarts.

  1. DB dumps streamed off-host (passwords never left container env): moodle_db (161MB raw), chevereto (2.4MB), guacamole_db (0.8MB) — all gzip -t + -- Dump completed verified, SHA256 recorded.
  2. journalctl --vacuum-size=200M → +1.7G
  3. docker image prune -f (dangling only) → +946.9MB
  4. apt-get clean → +88MB

Safety gate re-verified both targets unreferenced by any container (incl. stopped), then:

  • docker rmi nmtan/chevereto:latest (old pre-ghcr chevereto) — +514MB
  • docker rmi mariadb:latest (unused; running DB is bitnami/mariadb) — +404MB

Post: 3.9GB free (79%); 9/9 containers Up with original uptimes; image inventory now exactly the 9 in-use images — zero reclaimable left in Docker.

before after Tier 1 after Tier 2
/ avail 164MB (100%) 3.0GB (84%) 3.9GB (79%)
containers Up 9 9 (original uptimes intact) 9 (original uptimes intact)
web checks — Chevereto/Guacamole/Moodle HTTP 200; node-exporter serving unchanged

Backups (off-host): /Volumes/SmileX-Storage/backup/obh-iot/imageshare-194.1.0.11/2026-11-18/ (3 dumps + SHA256SUMS + README.md with restore procedure).

Not required — steps are non-destructive to service data; dumps are a safety net.

  • Tier 3 (prevent regrowth): SystemMaxUse=300M in journald.conf; docker daemon.json log rotation (max-size=10m, max-file=3 — needs rolling restarts, do when disk is healthy)
  • Photo archive backup: Chevereto images live in volumes (~922MB total), DB holds metadata only — DB dumps do not cover the photos. Tar volumes off-host separately.
  • Long term: move data volumes off the 19G root LV; Ubuntu 23.10 is EOL, uptime 1,021 days — schedule a maintenance window with the OS upgrade plan (#10/#11).