diff --git a/scripts/container-specs.sh b/scripts/container-specs.sh index 54ea0fa5..3bfc0852 100755 --- a/scripts/container-specs.sh +++ b/scripts/container-specs.sh @@ -26,7 +26,15 @@ done # ── Environment detection ───────────────────────────────────────────── detect_environment() { - DISK_GB=$(df --output=size -BG / 2>/dev/null | tail -1 | tr -dc '0-9') + # Measure disk where container data actually lives, not the OS partition. + # Archipelago installs mount a separate (usually-encrypted) data volume at + # /var/lib/archipelago on any host with meaningful storage, so checking / + # would always report the ~30 GB OS partition and wrongly trip prune mode + # on 2 TB boxes. Fall back to / only for first-boot before the data + # partition is mounted. + local disk_target="/var/lib/archipelago" + [ -d "$disk_target" ] || disk_target="/" + DISK_GB=$(df --output=size -BG "$disk_target" 2>/dev/null | tail -1 | tr -dc '0-9') DISK_GB=${DISK_GB:-500} TOTAL_MEM_MB=$(($(awk '/MemTotal/{print $2}' /proc/meminfo 2>/dev/null || echo 16000000) / 1024)) LOW_MEM=false