fix(scripts): reclaim space below 25 GiB instead of 20 GiB
Trigger the pre-zpool cache/kernel cleanup earlier (free < 25 GiB). On small VPS hosts the kernel comes from the provider template and stale kernel rollback is not a concern, so the extra headroom is worth it. Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
This commit is contained in:
1 parent
c9185f0bae
commit
9e9533d2b3
1 file changed
+2
-2
+2
-2
@@ -114,8 +114,8 @@ else
|
||||
# Without this, a host close to full would carve a pool that then starves
|
||||
# the root filesystem.
|
||||
FREE_KB=$(df -k --output=avail / | tail -1 | tr -d ' ')
|
||||
if (( FREE_KB < 20 * 1024 * 1024 )); then
|
||||
log "free space on / is $(( FREE_KB / 1024 / 1024 )) GiB (< 20 GiB) — reclaiming caches before sizing the pool..."
|
||||
if (( FREE_KB < 25 * 1024 * 1024 )); then
|
||||
log "free space on / is $(( FREE_KB / 1024 / 1024 )) GiB (< 25 GiB) — reclaiming caches before sizing the pool..."
|
||||
# Cleanest wins first; each is idempotent and never touches user data.
|
||||
DEBIAN_FRONTEND=noninteractive apt-get clean 2>/dev/null || true
|
||||
rm -rf /var/lib/apt/lists/* 2>/dev/null || true
|
||||
|
||||
Reference in new issue
Block a user