diff --git a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md index c47981f..3d12763 100644 --- a/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md +++ b/docs/platform/proxmox-server/lxc/ct-114-litecoin-wallet/GNAI-024-PLAN_Litecoin-Wallet-LXC.md @@ -42,9 +42,10 @@ Backups, Secret-Regeln). | f) | MWEB: Bitpanda und Rapidgator unterstützen keine MWEB-Adressen; `ltcmweb1…` an eine Exchange wäre Verlust. | Wallet erzeugt nur legacy/bech32-Adressen (`getnewaddress "" "bech32"` → `ltc1…`). MWEB bleibt lokal nutzbar (Cake Wallet), wird aber nie an Exchanges/Dienste adressiert. Dokumentiert in `litecoin.conf` und Abschnitt 8. | | g) | Research nimmt einen „separaten Proxmox Backup Server im LAN“ an, dessen Zugangsdaten der Betreiber liefert. Im Repo existiert **kein PBS**; das etablierte hostunabhängige Backup-Ziel ist der `gn-backup`-Account auf `ghostnet-ki` (`10.0.0.90`, eigene Hardware, Rolle `pve_lxc_backup_sync` / `gn_backup_receiver`). | Default: restic-Repo `sftp:gn-backup@10.0.0.90:/var/lib/ghostnet-ai-backup/ct114/restic` (Inventar-Variable `litecoin_backup_repository`, clientseitig verschlüsselt — das Ziel sieht nur Ciphertext). Falls der Betreiber doch ein PBS betreibt, genügen die PBS-Zugangsdaten als Inventar-Override. **Offener Punkt 11.1.** | | h) | Research: LXC-Backup „nur Snapshots, kein vzdump“. Repo-Konvention syncet alle `vzdump-lxc-*`-Archive nach ghostnet-ki (`pve_lxc_backup_sync`). | Bewusste, begründete Abweichung: CT 114 wird **nicht** in den vzdump-Job aufgenommen (150 GiB Chain, nächtlich ×4 Archive wären teuer; Chain ist per Neu-Sync rekonstruierbar; `wallet.dat` ist durch restic verschlüsselt **und** durch Snapshots geschützt). Umsetzung: Rolle `pve_lxc_snapshot` (täglich 04:00, 7 Snapshots Retention) + restic aus dem CT. **Operator-Schritt:** CT 114 im PVE-Backup-Job ausschließen (Abschnitt 6, Phase 0). | -| i) | Ressourcen 2 vCPU / 4 GiB / 150 GiB rootfs auf SSD/NVMe. | **Korrigiert auf 300 GiB** (Befund l: reale Chain Ende 2026 ~165 GiB — 150 GiB waren zu knapp). `local-lvm` (thin, snapshotfähig). Preflight im Provisioning-Skript: `local-lvm` aktiv und ≥ 332 GiB frei. Kein Nesting nötig (kein Podman; `litecoind` als systemd-Service unter User `litecoin`). | +| i) | Ressourcen 2 vCPU / 4 GiB / 150 GiB rootfs auf SSD/NVMe. | **Korrigiert:** Chain Ende 2026 real ~165 GiB (Befund l), daher rootfs auf `daten4` (7,3 TiB SSD) statt NVMe-thin-pool — entlastet `local-lvm` um ~144 GiB (Befund m). Provisioning: 300 GiB auf `daten4`, Preflight: Storage aktiv und ≥ 332 GiB frei. Kein Nesting nötig (kein Podman; `litecoind` als systemd-Service unter User `litecoin`). | | k) | Research: `onlynet=onion` (P2P ausschließlich zu onion-Peers). Live geprüft 2026-11-27: die kompilierten onion-Seeds von v0.21.5.8 sind alle unerreichbar („host unreachable“ via Tor), während clearnet-via-Tor funktioniert (check.torproject.org via SOCKS: IsTor=true; duckduckgo-onion: HTTP 301). Der Node bliebe ohne Peers. | **Anpassung:** `onlynet=onion` entfällt; mit `proxy=127.0.0.1:9050` geht ALLER Verkehr (DNS-Seeds, clearnet-Peers via Tor-Exits, onion) durch Tor — unsere IP wird nie exponiert, `listen=0`/`discover=0` verhindern Inbound. Audit prüft: jedes Netzwerk hat proxy=127.0.0.1:9050, keine inbound Peers. | | l) | Schätzung Chain ~60–90 GiB (2026-11-27). Live 2026-11-28: Platte voll bei 140/147 GiB, Node stoppte sauber („Disk space is too low!“). Chain bei Block 2,57 Mio bereits 132 GiB → real ~165 GiB am Tip. | **rootfs 150 → 300 GiB** (`pct resize 114 rootfs 300G` + `resize2fs` lief über pct automatisch), thin pool `pve/data` per `lvextend -l +100%FREE` auf 364,82 GiB (79 %). Backup-Lauf 03:00 fiel wegen Node-Down aus, manuell nachgeholt (restic: 2 Snapshots). Künftig: Pool-Füllstand im GNMON-Monitoring (Abschnitt 11), `thin_pool_autoextend_threshold` auf PVE lässt sich als Frühwarnung setzen. | +| m) | 2026-11-28: NVMe-thin-pool `local-lvm` bei 80 % (CT 103/107/304 bereits bei 98–99 %), CT-114-rootfs nach Befund l auf 300 GiB — Kette wächst aber weiter (~165 GiB + ~20 GiB/Jahr). Leer stehendes 8-TB-Volume `daten4` (7,3 TiB SSD, btrfs, PVE-Storage mit `content rootdir,images`) vorhanden. | **rootfs nach `daten4` verschoben:** CT gestoppt, `pct move-volume 114 rootfs daten4` (148,8 GiB via rsync, exit 0), `pct resize 114 rootfs 2T`, alte LVs (`vm-114-disk-0` + 2 Snap-LVs) nach Verifikation per `lvremove` freigegeben → Pool `pve/data` von 79 % auf **39 %** gefallen. Snapshot-Support auf daten4 verifiziert (`pct snapshot`/`delsnapshot` getestet; Timer-Rolle `pve_lxc_snapshot` unverändert). CT bootet von daten4, Node synct weiter (Block 2.503.309/3.220.549), Wallet gelockt. Provisioning-Skript: `CONTAINER_STORAGE='daten4'`. | | j) | Debian 13, unprivileged, Key-Only-SSH, fail2ban, unattended-upgrades, dedizierter User `litecoin`. | Übernommen nach Repo-Muster: frischer CT per gepinntem Community-Scripts-`debian.sh` + Bootstrap-Hook (wie CT 102, GNAI-016 Phase D), dann Ansible (`litecoin_lxc_baseline`, `litecoin_access`, `litecoin_fail2ban`, …). `unattended-upgrades` auf Debian-Security eingeschränkt (CT-100/101/102-Konvention). | ## 3. Zielarchitektur @@ -54,7 +55,7 @@ Backups, Secret-Regeln). | CT-ID / Hostname | `114` / `ltc-node` | | IP | `10.0.0.61/24` (statischer Serverbereich bis `.99`; DHCP ab `.100`), GW `10.0.0.1`, DNS `10.0.0.14` (Pi-hole), vmbr0, IPv6 aus | | OS / Typ | Debian 13, unprivileged, onboot, protection | -| Ressourcen | 2 vCPU, 4096 MiB RAM, 1024 MiB Swap, **300 GiB** rootfs `local-lvm` (Befund l; live per `pct resize` von 150 auf 300 GiB erweitert) | +| Ressourcen | 2 vCPU, 4096 MiB RAM, 1024 MiB Swap, rootfs auf **`daten4`** (7,3 TiB SSD, btrfs): 300 GiB bei Provisioning, live auf **2 TiB** gewachsen (Befund m) | | Software | `litecoind` v0.21.5.8 in `/opt/litecoin` (Symlink), `tor` (Client-only, SOCKS 127.0.0.1:9050), nftables, fail2ban, unattended-upgrades, restic | | Node-Konfig | `proxy=127.0.0.1:9050` (alle Netze, Befund k), `listen=0`, `dnsseed=0`, `upnp=0`, `natpmp=0`, RPC `127.0.0.1:9332` Cookie-Auth, `wallet=cold`, `dbcache=2048` | | Firewall | nftables default-deny; nur SSH 22 aus LAN/WireGuard; kein Forwarding | @@ -271,18 +272,14 @@ getnetworkinfo, getpeerinfo, getwalletinfo, listtransactions, …). restic-Passwort wurde **on-target** generiert (`/etc/litecoin-backup/restic-password`, 0600) — Operator holt es einmal per Konsole und legt es im Vaultwarden ab. - - **Speicherbudget (korrigiert 2026-11-28, Befund l):** Ursprünglich 150 GiB - rootfs — **zu knapp**: am 2026-11-28 01:15 lief die Platte voll (140/147 GiB), - litecoind stoppte mit „Disk space is too low!“ (sauberes Shutdown, kein - Datenverlust). Messung bei Block 2.570.985/3.220.414: `blocks/` 132 GiB → - hochgerechnet ~165 GiB Chain + chainstate ~2–6 GiB am Tip. **Fix:** - `pct resize 114 rootfs 300G` (live: 295 GiB, 140 GiB belegt, 142 GiB frei) - + thin pool `pve/data` per `lvextend -l +100%FREE` auf 364,82 GiB erweitert - (79 % belegt, VG `pve` danach 0 GiB frei — Pool-Alerting siehe Abschnitt 11). - Provisioning-Skript ROOT_DISK_GIB=300. restic sichert nur `backups/` - (wallet.dat ~2,2 MiB/Tag → ~1 GiB/Jahr auf ghostnet-ki); PVE-Snapshots - (Retention 7) wachsen um den täglichen Chain-Zuwachs. RAM: litecoind-Peak - ~3,9 GiB (dbcache=2048) innerhalb der 4 GiB. + - **Speicherbudget (aktualisiert 2026-11-28, Befunde l+m):** rootfs auf + `daten4` (7,3 TiB SSD), live 2 TiB, belegt 139 GiB (8 %). Vollsync: Chain + ~165 GiB + chainstate ~2–6 GiB → datadir ~170 GiB, Platz für Jahrzehnte. + NVMe-Pool `local-lvm` durch den Move von 79 % auf 39 % entlastet (224 GiB + frei). restic sichert nur `backups/` (wallet.dat ~2,2 MiB/Tag → ~1 GiB/Jahr + auf ghostnet-ki); PVE-Snapshots (Retention 7) auf daten4 wachsen um den + täglichen Chain-Zuwachs. RAM: litecoind-Peak ~3,9 GiB (dbcache=2048) + innerhalb der 4 GiB. - PVE-Host: `pve_lxc_snapshot` aktiv, erster Snapshot `ghostnet-daily-20261127-072519`, Timer täglich 04:00 (Retention 7). vzdump: kein Cluster-Backup-Job vorhanden, der CT 114 fassen würde diff --git a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh index 5c27512..a232cc5 100755 --- a/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh +++ b/proxmox/lxc/ct-114-litecoin-wallet/scripts/provision-ct114-litecoin.sh @@ -10,7 +10,7 @@ readonly GATEWAY='10.0.0.1' readonly NAMESERVER='10.0.0.14' readonly BRIDGE='vmbr0' readonly TEMPLATE_STORAGE='local' -readonly CONTAINER_STORAGE='local-lvm' +readonly CONTAINER_STORAGE='daten4' readonly ROOT_DISK_GIB='300' readonly POST_INSTALL_HOOK='/usr/local/sbin/ghostnet-litecoin-ansible-bootstrap-hook.sh' readonly BASELINE_HOOK='/usr/local/sbin/ghostnet-lxc-baseline.sh' @@ -94,9 +94,9 @@ storage_is_active "$TEMPLATE_STORAGE" || die "template storage ${TEMPLATE_STORAGE} is not active" storage_is_active "$CONTAINER_STORAGE" || die "container storage ${CONTAINER_STORAGE} is not active" -# The Litecoin chain needs roughly 100 GB plus growth on top of the thin -# 150 GiB rootfs; require headroom for rootfs plus chain before creating. -# (2026-11-27: local-lvm has ~206 GiB free, so +32 GiB headroom is the gate.) +# The Litecoin chain needs ~165 GiB (2026-11) plus growth; the rootfs lives on +# daten4 (7.3 TiB SSD btrfs, see GNAI-024 Befund m) — require headroom for the +# rootfs before creating. (2026-11-28: daten4 has ~7 TiB free.) storage_has_free "$CONTAINER_STORAGE" $((ROOT_DISK_GIB + 32)) || die "container storage ${CONTAINER_STORAGE} has less than $((ROOT_DISK_GIB + 32)) GiB free" @@ -177,7 +177,7 @@ grep -qx 'unprivileged: 1' <<<"$config" || die 'container is not unprivileged' grep -qx 'timezone: Europe/Berlin' <<<"$config" || die 'unexpected timezone' grep -Eq '^features: .*nesting=0' <<<"$config" || die 'nesting is not disabled' grep -Eq '^features: .*keyctl=0' <<<"$config" || die 'keyctl is not disabled' -grep -Eq '^rootfs: local-lvm:.*,size=300G(,|$)' <<<"$config" || +grep -Eq '^rootfs: daten4:.*size=300G(,|$)' <<<"$config" || die 'unexpected root filesystem allocation' net0="$(grep '^net0: ' <<<"$config")" for expected_net_field in \