Boot-disk swap: prep + clone runbook (1TB SSD)
Why: The ~2011 Corsair Force GT boot SSD is being replaced with a 1 TB SSD (arriving ~2026-06-03). This entry captures the prep done in advance and the step-by-step clone procedure to follow on swap day, so the actual swap is mechanical and reversible.
This is the migration anticipated in the 2026-05-31 prep entry: a single larger SSD, whole-disk clone (not a reinstall), since all Docker configs + DBs live on root and only bulk media is on the media drives.
0. Current boot disk layout (reference)
Captured to /home/plex/docs/bootdisk-pre-swap-snapshot.txt. /dev/sda is GPT/UEFI:
sda1— 1 MB BIOS-boot partition (GPT+GRUB)sda2— 513 MB EFI System Partition (vfat), UUID5941-6062, mounted/boot/efisda3— ext4 root, ~111 GB, UUID879bcc42-…, ~78% full (81 G used)
UEFI boots Boot0000 Ubuntu → \EFI\UBUNTU\SHIMX64.EFI (shim+GRUB, references the ESP by PARTUUID).
1. Prep done in advance (✓ before swap day)
- Config/DB safety backup —
/home/plex/bin/pre-swap-config-backup.shdumps the live DBs (immich Postgres, NPM MariaDB, vaultwarden SQLite) and rsyncs all app configs, NPM certs, compose stacks,/etc, and crontabs to/media/plex3/pre-swap-backup-<date>/. This is the restore path if the clone is bad; bulk media is already mirrored by the nightly jobs. - Disk-layout snapshot — partition table, UUIDs, EFI entries, root usage (the file above).
- Live USB — build a SystemRescue or Ubuntu live USB before swap day. A boot disk must be cloned offline (unmounted) for a consistent filesystem, and the live USB doubles as the boot-repair tool.
2. Enclosure & USB port (read before cloning)
- CORRECTION (2026-06-03): the spare 128 GB drive was physically confirmed a 2.5" SATA SSD (Kingston SSDNow V+ 325), not NVMe — the earlier "JMicron JMS583 / USB NVMe" reading was the USB bridge mislabeling the drive. So the new 1 TB SATA SSD would fit that enclosure — but its bridge still hangs on SMART pass-through, so don't rely on it for monitoring.
- Best path — skip USB, clone internal-to-internal. The hardware inventory found 6 SATA ports with ~3 free, so connect the new SATA SSD to a free internal SATA port (no need to unplug anything), clone offline from the live USB, then remove the old Corsair and make the new drive boot. Most reliable — no flaky USB bridge in the clone path. (If you must use USB, use a rear port and a non-JMicron SATA enclosure.)
- Front vs rear port: yes — move it to a rear (motherboard I/O) USB3 port. Front-panel ports run through an internal header cable (longer, noisier, sometimes USB2 or a shared hub); rear ports wire straight to the chipset with better signal integrity and power. It won't cure the JMS583's SMART quirk, but for a bulk clone it meaningfully improves stability and speed.
- Best option if available: skip USB entirely — if a SATA data+power lead can be freed (temporarily unplug one HDD), clone disk-to-disk internally. Most reliable.
3. The clone (offline, from the live USB) — recommended
- Connect the new SSD (rear USB3 port, or internal SATA). Power on, boot the live USB (firmware boot menu).
- Identify both disks by serial — do NOT trust
/dev/sd*letters:lsblk -o NAME,SIZE,MODEL,SERIAL,TRAN. Source = Corsair Force GT (~120 G). Target = the new 1 TB. Call them/dev/SRCand/dev/DSTbelow. - Whole-disk clone (carries GPT, BIOS-boot, ESP, root, swapfile — bootable as-is; ddrescue rides over any weak sectors on the aging Corsair):
ddrescue -f /dev/SRC /dev/DST /root/clone.mapfile - Fix the GPT for the larger disk (moves the backup GPT header to the end of the 1 TB; clearing the "backup table not at end" warning):
sgdisk -e /dev/DST - Grow root into the new space (~900 GB unallocated otherwise):
growpart /dev/DST 3
e2fsck -f /dev/DST3thenresize2fs /dev/DST3
4. Physical swap — mind the duplicate UUIDs ⚠️
A whole-disk clone gives the new disk identical filesystem UUIDs and PARTUUIDs (that's why /etc/fstab needs no edits). The hazard: with both drives attached at boot, GRUB/systemd resolve root by UUID and may pick the wrong one. So:
- Power off.
- Physically remove the old Corsair before booting the clone.
- Install the new SSD internally (same SATA port the Corsair used is cleanest for the EFI entry).
- Boot. The cloned ESP + the PARTUUID-based
Boot0000entry should boot straight to Ubuntu. If not: firmware boot menu → the new disk; or boot the live USB and re-point withefibootmgr/ re-rungrub-install --efi-directory=/boot/efifrom a chroot.
5. Post-swap verification
- Run the cheat-sheet verification checklist (services, mounts, containers, external reachability).
df -h /should now show ~900 GB+ free (confirms the resize took).free -h/swapon --show— swap on the cloned/swapfileis active.- All containers up; NPM serving the site; Plex, immich, vaultwarden reachable.
- Keep the old Corsair untouched for ~1 week as a fallback before wiping/repurposing.
Note: this swap is independent of the dying sdb/plex2_backup replacement — do that separately, and when you do, follow the drive-swap steps (smartd by-id line + fstab UUID + re-check netdata's device_selector).