Commit graph

2 commits

Author SHA1 Message Date
f794c57198 fix: retry recording when storage is slow to mount at boot
A power cut makes the recordings drive's fsck slow, so the mount can
appear tens of seconds after nextnvr starts. The recorders then hit the
unmounted, root-owned mountpoint, failed mkdir, and exited permanently —
recording stayed dead until a manual restart.

- recorder: on mkdir failure, log and retry every 15s instead of exiting,
  so recording resumes once storage returns
- storage: add waitForStorage() and call it before the writers start, so
  startup waits (up to 120s) for the recordings dir to be present and
  writable; live view still starts if storage never appears
2026-10-15 07:09:11 +01:00
a54ff08ebb feat: storage health monitor with UI alert on drive loss
Detect a disconnected or read-only recordings drive and surface it
without stopping recording or live view:

- storage.go: probe path existence, mount point, writability and free
  space every 30s; capture mount expectation at startup so a clean
  unmount (writes falling through to root fs) is also caught
- GET /api/storage endpoint; storage fields in /api/status
- red UI banner while storage is unavailable
- log ALERT on loss, OK on recovery
2026-10-10 07:17:28 +01:00