Add NFS self-heal automation for immich/calibre/ocis, backed up in git

Stale NFS handles inside containers (ESTALE/errno -116) can persist even
after the host-side mount looks healthy, requiring a manual remount +
container restart. Adds systemd mount-ready hooks (BindsTo) to restart
immich_server/calibre/ocis when their NFS mount unit restarts, plus a
5-minute health-check timer that does a real nested read and force-remounts
on staleness. Host files backed up under system-config/nfs-self-heal/ so
they can be reinstalled after a host rebuild.
This commit is contained in:
2026-08-25 21:56:48 +00:00
parent d302060e4b
commit 42a31b6a44
8 changed files with 184 additions and 0 deletions
@@ -0,0 +1,13 @@
[Unit]
Description=Restart calibre after NAS books mount is ready
After=mnt-nas_books.mount
Requires=mnt-nas_books.mount
BindsTo=mnt-nas_books.mount
[Service]
Type=oneshot
ExecStart=/usr/bin/docker restart calibre
RemainAfterExit=yes
[Install]
WantedBy=mnt-nas_books.mount