2.7 KiB
Reorg runbook
The one-time migration from /mnt/nas/home/ to /mnt/nas/stacks/ + /mnt/nas/data/.
Phase 0 — preconditions
- Admin SSH on morgott + melina + mohg.
Charlie/project-charliepushed (done).- Decided owner host per stack (see repos.md).
- Snapshot taken on miquella (Synology snapshot of
volume1/ubuntu).
Phase 1 — scaffolding (no downtime)
# On any one host (NAS is shared).
sudo mkdir -p /mnt/nas/stacks /mnt/nas/data
sudo chown alex:alex /mnt/nas/stacks /mnt/nas/data
Optional rename now (still no downtime — these are bulk dirs nothing reads except by full path):
# Only if you commit to the new names. Update bind paths in compose files BEFORE renaming.
sudo mv /mnt/nas/media-server /mnt/nas/media # if no compose binds it yet at the old path
sudo mv /mnt/nas/ldap /mnt/nas/ldap-certs
(Actually: don't rename media-server until mediacompose is migrated — its compose binds the old path. Leave both renames for the per-stack pass.)
Phase 2 — create empty Charlie repos in Gitea
Per repos.md, create empty repos:
- All
initandrewriterows. - All
mirrorrows (configured as pull-mirrors, see migration.md).
No host changes yet.
Phase 3 — per-stack migration loop
Order: Tier 1 → 5 from repos.md. For each stack on its owner host:
cd /mnt/nas/home/<old> && sudo docker compose down- Run migration.md recipe (
initorrewrite). - Verify checklist at the bottom of migration.md.
- ✅ on to next.
Pilot: do ddclient first end-to-end before touching anything else. If it works, the pattern works.
Phase 4 — sweep
Once every stack is migrated and verified:
# On miquella or any NFS client:
ls /mnt/nas/home/ # expect: only *.retired/
sudo rm -rf /mnt/nas/home/*.retired
sudo rmdir /mnt/nas/home
# Final layout check
ls /mnt/nas/ # expect: ca, data, ldap-certs, media, stacks, #recycle
Phase 5 — runner stack
Now that everything is git-tracked, design + deploy Charlie/runners (separate effort). Pilot redeploy via webhook on Charlie/ddclient.
Rollback strategy
Any stack failing to come up at the new location:
sudo docker compose downin/mnt/nas/stacks/<new>/.sudo mv /mnt/nas/home/<old>.retired /mnt/nas/home/<old>(state was moved, not copied — restore is just a path rename of the directory shell).- Move state back:
sudo mv /mnt/nas/data/<new>/* /mnt/nas/home/<old>/. cd /mnt/nas/home/<old> && sudo docker compose up -d.- Investigate, retry.
Because state was moved (not copied), there's only ever one source of truth. No risk of two diverging copies.