SD transplant prep notes
Date: 2026-04-17
Host: ballbox-first

Purpose:
- Free the only USB slot currently occupied by /mnt/rpi so a new microSD can be attached.

Processes observed using /mnt/rpi before stop:
- eiffel-monitor: PID 1256
- opencode: PIDs 13140, 13280, 54031
- bash under opencode web: PID 54130
- personal-agent daemon wrapper: PID 65013

Planned recovery if something does not return after reboot:
1. Check mounts:
   lsblk -o NAME,SIZE,FSTYPE,LABEL,UUID,MOUNTPOINTS,MODEL,TRAN
   findmnt /mnt/rpi
2. If /mnt/rpi USB disk is present but not mounted:
   sudo mount /dev/sda1 /mnt/rpi
3. Check personal-agent:
   curl -fsS http://100.116.176.16:8082/api/status
   If down, inspect process/service and restart from its normal launcher.
4. Check eiffel-monitor:
   ps -ef | grep -i eiffel-monitor
   Restart from /home/sebas/eiffel-monitor if needed.
5. Check opencode web:
   ps -ef | grep -E 'opencode|3967'
6. Review this file plus shell history for exact maintenance actions.

Actual actions taken will be appended below.

[2026-04-16T22:31:43-03:00] Created prep note file

[2026-04-16T22:31:51-03:00] Sent TERM to pids 65013 13140 13280 54031 1256 and moved cwd to /home/sebas

[2026-04-16T22:31:57-03:00] Residual users after first stop:
 158740    1273 Ssl  /home/sebas/.opencode/bin/opencode web --port 3967
 158781  158740 Ss+  /bin/bash -l

[2026-04-16T22:32:04-03:00] Sent TERM to residual opencode pids 158740 158781

[2026-04-16T22:32:10-03:00] Attempted umount /mnt/rpi

[2026-04-16T22:32:16-03:00] sudo umount /mnt/rpi

[2026-04-16T22:34:47-03:00] Stopping and masking opencode-web.service to free /mnt/rpi

[2026-04-16T22:34:53-03:00] Sent TERM to eiffel-monitor pid 159028

[2026-04-16T22:35:05-03:00] Successfully unmounted /mnt/rpi; safe to unplug USB disk

[2026-04-16T22:38:17-03:00] Restore: mounted /dev/sda1 on /mnt/rpi; enabled+started opencode-web.service; started personal-agent.service; relaunched eiffel-monitor manually

[2026-04-16T22:38:34-03:00] Restore verification: /mnt/rpi mounted; opencode-web active; personal-agent active; eiffel-monitor running (with Playwright browser error logged)
