🛠️ Project: The Warp Core Refit v3 (Side-by-Side Migration)
Status: 🛡️ Safe Mode / Implementation
Target: ds9-truenas (TheWarpCore)
Objective: Non-destructive migration to Unified Storage (/vault).
📊 Capacity Check
- Total Capacity: 5.3 TB
- Current Usage: ~417 GB (plus downloads)
- Free Space: ~4.8 TB
- Feasibility: ✅ GO. We have ample space to duplicate all data 10x over.
🏗️ The Architecture: "The Atomic Monolith"
We create one master dataset (vault) shared by all nodes.
Hierarchy (New)
/mnt/TheWarpCore/vault [DATASET: lz4, recordsize=1M]
├── /downloads [FOLDER]
│ ├── /torrents
│ │ ├── /video <-- starfleet-compute
│ │ └── /audio <-- subspace-comm
│ └── /manual
├── /media [FOLDER]
│ ├── /movies <-- Hardlinks work here
│ ├── /tv
│ └── /audiobooks
└── /app_data [FOLDER]
📅 Execution Plan (Safe Mode)
⚠️ WARNING: Run this on TrueNAS (192.168.1.100) as root.
Phase 1: Build & Clone (No Downtime)
We create the new structure and copy data. The old datasets (infra_storage, subspace-comm) remain Read/Write and active for existing clients.
#!/bin/bash
POOL="TheWarpCore"
ROOT="vault"
# 1. Create New Dataset
zfs create -o mountpoint=/mnt/$POOL/$ROOT -o compression=lz4 -o atime=off -o recordsize=1M $POOL/$ROOT
# 2. Create Structure
mkdir -p /mnt/$POOL/$ROOT/downloads/torrents/{video,audio}
mkdir -p /mnt/$POOL/$ROOT/media/{movies,tv,audiobooks,music}
mkdir -p /mnt/$POOL/$ROOT/app_data
# 3. Set Permissions (GID 3000)
chown -R 3000:3000 /mnt/$POOL/$ROOT
chmod -R 775 /mnt/$POOL/$ROOT
find /mnt/$POOL/$ROOT -type d -exec chmod g+s {} \;
# 4. INITIAL SYNC (Copy Only - No Delete)
# We use rsync to clone data. This takes time but is safe.
echo "Syncing Media..."
rsync -avP /mnt/$POOL/infra_storage/media/ /mnt/$POOL/$ROOT/media/
echo "Syncing Downloads..."
rsync -avP /mnt/$POOL/subspace-comm/downloads/ /mnt/$POOL/$ROOT/downloads/torrents/audio/
# Note: Adjust source path for video downloads if they live elsewhere
Phase 2: Dual-Running (Testing)
- Export
/vault: Create a new NFS Export in TrueNAS for/mnt/TheWarpCore/vault. - Test Client: Update only
enterprise-devor a test LXC to mount/mnt/vault. - Verify: Check if files are visible, writable, and permissions are
3000:3000.
Phase 3: The Cut Over (Maintenance Window)
- Stop Apps: Stop Docker stacks on
starfleet-computeandsubspace-comm. - Final Sync: Run the
rsynccommands again (they will be fast, checking only checksums/new files). - Update Mounts:
- Edit
/etc/fstabon clients. - Change remote path from
/mnt/TheWarpCore/infra_storage->/mnt/TheWarpCore/vault.
- Edit
- Restart Apps: Start Docker stacks.
- Verify: Test playback, downloads, and hardlinking.
🛑 Rollback Plan (If things break)
- Stop Apps.
- Revert Mounts: Edit
/etc/fstabto point back to/mnt/TheWarpCore/infra_storage. - Restart Apps.
- Status: Back to original state. New data in
/vaultcan be inspected or deleted.
Phase 4: Cleanup (T+2 Weeks)
Only after 2 weeks of stable operation:
1. Delete /mnt/TheWarpCore/infra_storage.
2. Delete /mnt/TheWarpCore/subspace-comm.