From 83b3660d4d0886f91fca7b8e1f2ae7c43fa5699b Mon Sep 17 00:00:00 2001 From: Mikei386 <44135113+Mikei386@users.noreply.github.com> Date: Tue, 13 Oct 2026 10:33:00 +0200 Subject: [PATCH] deploy: support split Strata SSD storage and document IQ3 relocation --- deploy/STRATA_NATIVE.md | 10 ++++ deploy/install.py | 8 ++- .../iq3-ssd-migration-2026-10-13/README.md | 60 +++++++++++++++++++ 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100644 docs/experiments/iq3-ssd-migration-2026-10-13/README.md diff --git a/deploy/STRATA_NATIVE.md b/deploy/STRATA_NATIVE.md index cfeee76..bc4e92c 100644 --- a/deploy/STRATA_NATIVE.md +++ b/deploy/STRATA_NATIVE.md @@ -48,6 +48,16 @@ Die heutige Docker-Testinstallation übernimmt `strata_storage` aus ihrer `installation.json` als expliziten Bind-Mount samt Umgebungsvariable. Das ist nur der aktuelle Transport; der Worker selbst ruft Docker niemals auf. +IQ3 liegt seit 13.10.2026 physisch auf der Samsung 980 PRO unter +`/opt/athena-deck-dev/runtime/state/strata-ssd`. Die IQ3-Unterverzeichnisse im +logischen Strata-Datenpfad sind Symlinks dorthin; IQ2 bleibt auf der Data-SSD. +Die Containerinstallation setzt zusätzlich `strata_storage_mounts` auf eine +Liste mit diesem Zielpfad und bindet jeden Eintrag am identischen absoluten +Pfad ein. Native Dienste benötigen dafür keinen zusätzlichen Mount, aber die +Zielverzeichnisse und Symlinks müssen vor dem Start vorhanden sein. +Details und Restore-Schritte: +`docs/experiments/iq3-ssd-migration-2026-10-13/README.md`. + Die Bibliothek (`DECK_STATE_DIR/models`) und der Strata-Datenbereich sollten auf derselben großen Datenpartition liegen, damit Hardlinks zusätzliche GGUF-Kopien vermeiden. Bei einer Zustandswurzel auf der Systempartition muss das native diff --git a/deploy/install.py b/deploy/install.py index ece1c20..02691cd 100644 --- a/deploy/install.py +++ b/deploy/install.py @@ -151,6 +151,10 @@ def launch(config): path=Path(config['strata_storage']) if not path.is_absolute() or not path.is_dir() or ',' in str(path):raise RuntimeError('Ungültiger Strata-Datenpfad.') args+=['--mount',f'type=bind,src={path},dst={path}', '-e','DECK_STRATA_DATA_DIR='+str(path)] + for extra in config.get('strata_storage_mounts',[]): + path=Path(extra) + if not path.is_absolute() or not path.is_dir() or ',' in str(path):raise RuntimeError('Ungültiger zusätzlicher Strata-Datenpfad.') + args+=['--mount',f'type=bind,src={path},dst={path}'] if config.get('memory_swap_limit'):args+=['--memory-swap',str(config['memory_swap_limit'])] for external in config.get('external_model_roots',[]): path=Path(external) @@ -176,7 +180,7 @@ def launch(config): if Path('/data/emergency-backups').is_dir(): args+=['--mount','type=bind,src=/data/emergency-backups,dst=/host/backups,readonly'] if config.get('reference_models'): - for folder,filename in [('qwen3.8-27b-iq4-mix','Qwen3.8-27B-IQ4-MIX.gguf'),('qwen3.8-27b-iq4-xs-pure','qwen3.8-27b-IQ4_XS-pure.gguf'),('qwen3.8-27b-abliterated','Qwen3.8-27B-ABLITERATED-Q4_K_M.gguf')]: + for folder,filename in [('qwen3.8-27b-iq4-mix','Qwen3.8-27B-IQ4-MIX.gguf'),('qwen3.8-27b-iq4-xs-pure','qwen3.8-27b-IQ4_XS-pure.gguf')]: source=base/'state/reference-models'/filename if not source.is_file() or not source.resolve().is_relative_to((base/'state/models').resolve()): raise RuntimeError('Deck-Referenzmodell fehlt; zuerst deploy/migrate_reference_models.py ausführen.') @@ -264,7 +268,7 @@ def update(base, rollback=False, force=False, api_ports=None, reuse_runtime=Fals backup_name=config['name']+'-previous' if inspect(backup_name):raise RuntimeError('Rückfall-Containername belegt. Keine Änderung ausgeführt.') stamp=str(time.time_ns()) - shutil.copytree(base/'state',base/'backups'/stamp,ignore=shutil.ignore_patterns('strata-runtime','strata-worker','strata-data','strata-install-src','soulx_singer-runtime','soulx_singer-data','seed_vc-runtime','seed_vc-data','seed_vc-prepare','reference-models','xvc-runtime','xvc-data','xvc-prepare','cache','omni-reference-check.py','omni-cache-clean.py','applio-runtime','applio-data','applio-checkout','applio-runtime.py','import_applio.py','applio-migration.log','acestep-runtime','acestep-jobs','acestep-setup-code','acestep-checkout','acestep-source-files','acestep-test-tmp','music-verification','music-test-temp','music-jobs','music-remix-runtime','separator-runtime','separator-tests','voxcpm-runtime','omnivoice-runtime','voice-worker-check','voice-integration-check','voice-setup-code','audio-cpp-runtime','ltx-original-runtime','original-work','tts-runtime','tts-tests','voice-tests','models','runtime','runtime-verification','image-tests','image-verification','image-verification-*','image-runtime','video-runtime','video-verification','video-verification-*','comfy-work','router-verification-*')) + shutil.copytree(base/'state',base/'backups'/stamp,ignore=shutil.ignore_patterns('strata-runtime','strata-worker','strata-data','strata-ssd','strata-install-src','soulx_singer-runtime','soulx_singer-data','seed_vc-runtime','seed_vc-data','seed_vc-prepare','reference-models','xvc-runtime','xvc-data','xvc-prepare','cache','omni-reference-check.py','omni-cache-clean.py','applio-runtime','applio-data','applio-checkout','applio-runtime.py','import_applio.py','applio-migration.log','acestep-runtime','acestep-jobs','acestep-setup-code','acestep-checkout','acestep-source-files','acestep-test-tmp','music-verification','music-test-temp','music-jobs','music-remix-runtime','separator-runtime','separator-tests','voxcpm-runtime','omnivoice-runtime','voice-worker-check','voice-integration-check','voice-setup-code','audio-cpp-runtime','ltx-original-runtime','original-work','tts-runtime','tts-tests','voice-tests','models','runtime','runtime-verification','image-tests','image-verification','image-verification-*','image-runtime','video-runtime','video-verification','video-verification-*','comfy-work','router-verification-*')) was_running=previous['State']['Running'] if was_running:run('docker','stop','--time','15',config['name']) run('docker','rename',config['name'],backup_name) diff --git a/docs/experiments/iq3-ssd-migration-2026-10-13/README.md b/docs/experiments/iq3-ssd-migration-2026-10-13/README.md new file mode 100644 index 0000000..07c402a --- /dev/null +++ b/docs/experiments/iq3-ssd-migration-2026-10-13/README.md @@ -0,0 +1,60 @@ +# Strata IQ3 storage on Samsung 980 PRO + +The user authorized moving IQ3 to the system SSD while no request was running. +The transfer covers `models/IQ3_XXS` (both GGUF parts and preparation marker) +and `packs/iq3_xxs` (including the actual experts.bin used by Strata). +It does not move IQ2, shared MTP weights or the CPU vision projector. + +## Layout and deployment + +- Physical destination: `/opt/athena-deck-dev/runtime/state/strata-ssd` on the + Samsung 980 PRO root filesystem. +- Logical storage remains `/data/athena-deck-strata`; its IQ3 model and pack + directories become symlinks to the destination. +- Catalog links and preparation metadata retain their existing logical paths. +- Container installation manifest `strata_storage_mounts` includes the physical + destination, mounted read/write at the identical absolute path. The regular + `strata_storage` mount remains present for IQ2 and shared components. +- `deploy/install.py` supports these additional explicit storage mounts. + The retired Abliterated reference model is no longer a mandatory startup + prerequisite; the two active reference models are still checked. + +## Migration procedure + +Copy the two directories, compare SHA-256 for every file, check that there are +no active endpoint requests, stop Deck, swap logical directories to symlinks, +recreate only the Deck container with its existing image and the added mount, +and run a synthetic IQ3 request. Remove old directories only after acceptance. +Other service containers and IQ2 are not stopped or modified. + +## Native installation and restore + +A native Debian service can follow these host symlinks directly and requires +no container mount. Configure destination ownership for its actual service +account; the current test deployment uses UID/GID 65534. + +On restore, provision the physical destination and recreate the two symlinks +before launching Deck. For the optional container installation preserve both +the `strata_storage` and `strata_storage_mounts` settings. Prepared weights +remain pinned by the existing Strata recipe; they can be reacquired and +prepared rather than placed in Git. Do not assume copying symlinks alone backs +up their external contents. Private voices and encrypted backup policy are +unchanged. No full restore exercise is part of this relocation. + +Migration evidence is kept on Athena at +`/opt/athena-deck-dev/iq3-ssd-20261013/status.json` (phases, checksums and +synthetic acceptance metrics only). Completion must be verified there. + +## Verified result + +Migration completed with all 16 file checksums matching. Both logical IQ3 +directories resolve to the root SSD; the running Strata process maps +`strata-ssd/packs/iq3_xxs/experts.bin`. A fresh request through the public Deck +endpoint returned the correct synthetic arithmetic answer. Only Deck was +recreated, using the same image; IQ2 and the other service containers remained +unchanged. Old IQ3 directories were removed after acceptance; shared hardlinks +outside them were retained. Root free space is **166.33 GiB**. + +The three-token acceptance answer is not a speed benchmark; no performance +improvement is claimed from its timing. The lightweight installer rollback +copy excludes `strata-ssd`, as it already excludes other reconstructible weights.