Storage resilience: alerting, backups, and the two-node Longhorn bottleneck #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from the outage on 2026-08-15, which took down Forgejo, Immich, Paperless and Vikunja for roughly two hours. Three gaps made it both possible and hard to diagnose. Each is independently actionable.
Background: what actually happened
0000:01:00.0) logged ATA link errors. 1 event, then 4. Nobody saw them.SErr 0xffffffff,AHCI controller unavailable!). Both its disks went with it; SMART on both SSDs wasPASSED, so this is the adapter, not the media. Two volumes withnumberOfReplicas: 1wentfaulted, the other 14 wentdegraded.concurrent-replica-rebuild-per-node-limit: 5, no v1 bandwidth limit). During that, bigal lost its iSCSI session to atlas. Since bigal's root filesystem is that LUN, EXT4 aborted its journal and remounted read-only, kubelet could no longer create pod directories, and the Postgres primary had nowhere to run — thecreate-default-disk=confignodeSelector plus required anti-affinity left exactly two eligible nodes, one broken and one occupied.1. No alerting
There is no Alertmanager in the cluster.
prometheus-serverhasalerting_rules.yml: {}, and the Loki ruler runs without rule storage, so log-based alerts cannot fire either.The 08-02 and 08-04 link errors were sitting in Loki the whole time. Eleven days of warning went unread.
{transport="kernel"} |~ "SError|AHCI controller unavailable|Aborting journal|critical medium error|Remounting filesystem read-only"longhorn_volume_robustness(2 = degraded, 3 = faulted) andlonghorn_disk_statusnumberOfReplicas: 1— that is the difference betweendegradedandfaulted2. No backups
spec.backupon the CNPG cluster is empty, there are noScheduledBackups, and the Longhornbackuptargets/defaulthas an empty URL andAVAILABLE: false. There is no WAL archiving.Consequence during the incident: the replica had been down 42 h, the WAL segment it needed (
0000000900000018000000ED) was long recycled, and it could never catch up. It had to be rebuilt from scratch. Had the primary's volume also been lost, everything was gone.A manual
pg_dumpallwas taken at 2026-08-15T10:13Z and verified (81 MB, all 6 databases, all 9 roles). That is a one-off snapshot, not a process.ScheduledBackup3. Longhorn storage lives on only two nodes
Every replica in the cluster is on bigal or quartz64, and both have the same class of hardware (a PCIe AHCI adapter on an ARM SBC). Losing one degrades everything; losing both loses everything.
infrastructure/cloudnative-pg/cluster/cluster.yamlalready documents the consequence for Postgres and names the fix: "widen it by giving another node a disk, which also gives it this label."numberOfReplicasabove 1 for volumes that matter (homelab-postgres-*are still at 1)concurrent-replica-rebuild-per-node-limit, and a v1replica-rebuilding-bandwidth-limit(currently only set for v2)Also worth a look
celery inspect pingthat times out while the single worker is busy withprocess_mail_accounts(~187 s at startup) — unrelated to this outage, but it is downpvc-f413d6be(40 Gi,Released,Retain) still holds the old replica's data on quartz64