power: add van-nvme-watch — pages on NVMe I/O-timeout/reset recurrence
Tails journalctl -kf for the "nvme nvmeN: I/O tag ... timeout, reset controller" signature that crashed and corrupted the root fs on 2026-08-02 (and recurred 2026-08-04, that time self-healing). Watches a short grace window to tell a clean self-heal from an escalation (repeated timeout or a following ext4 error) before paging via the existing Pushover credentials, with a live SMART/superblock snapshot in the alert body.
This commit is contained in:
@@ -192,6 +192,11 @@ if [ ! -f /etc/van-battery/pushover.json ]; then
|
||||
warn "seeded /etc/van-battery/pushover.json (EDIT IT: add Pushover token + user)"
|
||||
fi
|
||||
|
||||
echo "== nvme watchdog =="
|
||||
install -D -m0755 power/van-nvme-watch /usr/local/sbin/van-nvme-watch
|
||||
install -D -m0644 power/nvme-watch-config.json /etc/van-nvme-watch/config.json
|
||||
install -D -m0644 power/van-nvme-watch.service /etc/systemd/system/van-nvme-watch.service
|
||||
|
||||
echo "== home assistant =="
|
||||
# Native HA (Podman Quadlet, replaced the ha_van VM). daemon-reload below
|
||||
# regenerates homeassistant.service; started (not restarted) at the end so a
|
||||
@@ -221,12 +226,13 @@ systemctl restart systemd-resolved
|
||||
# its wait-online would just stall network-online.target. NM-wait-online covers WANs.
|
||||
systemctl mask systemd-networkd-wait-online.service >/dev/null 2>&1 || true
|
||||
systemctl unmask hostapd >/dev/null 2>&1 || true
|
||||
systemctl enable regdomain.service hostapd hostapd-2g van-ap-dnsmasq nftables systemd-networkd van-failover van-thermal van-ap-watchdog van-ap-watchdog-2g van-wlan-watchdog van-gps-owntracks >/dev/null 2>&1 || true
|
||||
systemctl enable regdomain.service hostapd hostapd-2g van-ap-dnsmasq nftables systemd-networkd van-failover van-thermal van-nvme-watch van-ap-watchdog van-ap-watchdog-2g van-wlan-watchdog van-gps-owntracks >/dev/null 2>&1 || true
|
||||
# bluetooth: host BlueZ serves the onboard hci0 to the HA container over D-Bus
|
||||
systemctl enable --now bluetooth >/dev/null 2>&1 || true
|
||||
systemctl start homeassistant || warn "homeassistant failed to start (podman/quadlet — check journalctl -u homeassistant)"
|
||||
systemctl start esphome || warn "esphome failed to start (podman/quadlet — check journalctl -u esphome)"
|
||||
systemctl restart van-thermal
|
||||
systemctl restart van-nvme-watch
|
||||
systemctl restart van-gps-owntracks
|
||||
# Pick up unmanaged-devices changes so NM releases/keeps the right interfaces.
|
||||
nmcli general reload 2>/dev/null || systemctl reload NetworkManager 2>/dev/null || true
|
||||
@@ -252,3 +258,4 @@ echo " iw dev $WIFI_5G_IFACE info | grep -E 'ssid|channel|width'"
|
||||
echo " iw dev $WIFI_2G_IFACE info | grep -E 'ssid|channel|width'"
|
||||
echo " cat /run/van-failover/state.json"
|
||||
echo " cat /run/van-thermal/state.json"
|
||||
echo " cat /run/van-nvme-watch/state.json"
|
||||
|
||||
Reference in New Issue
Block a user