RPI5-NAS Connectivity Watchdog

k3s cluster · 192.168.100.51 · deployed 24 Jul 2026

Problem

The RPI5-NAS has twice lost IP connectivity, apparently due to a routing-table issue at restart/boot. Each time, the only fix was a physical restart — not viable without physical access to the cluster.

Solution

A bash watchdog script running on a systemd timer that checks connectivity, logs diagnostic evidence on failure, attempts a soft fix, and escalates to a reboot if the soft fix doesn't work. Status: Deployed & running

StageTriggerAction
CheckEvery 2 min (+ 90s after boot)Ping gateway / secondary target
DiagnoseAny failed checkLog ip route, ip addr, journal, dmesg to a timestamped file
Soft fix2 consecutive failuresRestart NetworkManager/systemd-networkd, or bounce interface + renew DHCP
Hard fix4 consecutive failuresReboot (capped at 2/hour to avoid loops)

Files

Operations

systemctl list-timers nas-watchdog.timer   # confirm scheduled
sudo systemctl status nas-watchdog.service # last run result
tail -f /var/log/nas-watchdog/watchdog.log # live event log
sudo /usr/local/bin/nas-watchdog.sh        # manual test run
Root cause of the routing-table issue itself is still unknown — the diagnostic snapshots captured on the next failure should provide the evidence needed to investigate it properly.

Log rotation