R-99 runbook (pbs-phantom-cleanup) + read-only ep0 listing: no phantom today, nothing deleted; R-444 trim measured on demo-hp; R-618 closed by ruling (150 -> 149)
gates / gates (push) Successful in 2m18s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0159rPz1ZhFKsS53msqPYxtS
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-10-06 11:18:14 +02:00
1 parent 8c65ff0cf2
commit 6b5804c63c
6 files changed
+126 -2

No files matched your search

@@ -0,0 +1,23 @@
import os, re, json
root = "/mnt/pbs-datastore"
rows = []
def walk_ns(base, ns):
for typ in ("ct", "vm", "host"):
tdir = os.path.join(base, typ)
if not os.path.isdir(tdir): continue
for gid in sorted(os.listdir(tdir)):
gdir = os.path.join(tdir, gid)
for snap in sorted(os.listdir(gdir)):
sdir = os.path.join(gdir, snap)
if not os.path.isdir(sdir) or not re.match(r"\d{4}-\d{2}-\d{2}T", snap): continue
files = os.listdir(sdir)
size = sum(os.path.getsize(os.path.join(sdir, f)) for f in files)
man = "index.json.blob" in files
manifest_files = []
rows.append({"ns": ns or "(root)", "group": f"{typ}/{gid}", "snap": snap, "files": sorted(files), "dir_bytes": size, "manifest": man})
nsdir = os.path.join(base, "ns")
if os.path.isdir(nsdir):
for n in sorted(os.listdir(nsdir)):
walk_ns(os.path.join(nsdir, n), (ns + "/" if ns else "") + n)
walk_ns(root, "")
print(json.dumps(rows))