I wanted a file server that survives a host failure without touching clients, DNS, or rebuilding the network. This is the simplest pattern I know that works.
Context
In a small home lab, high availability doesnโt need Kubernetes, load balancers, or enterprise clustering.
Sometimes you just need:
- a stable IP for a service
- the ability to move it between hosts
- and minimal moving parts
This pattern uses a floating service IP that can be manually (or later automatically) moved between nodes.
๐ง Concept
Separate host identity from service identity:
| Type | Example IP | Purpose |
|---|---|---|
| Host IP | 172.17.20.253 | Physical node (araman) |
| Host IP | 172.17.20.254 | Physical node (eldamar) |
| Service IP | 172.17.20.97 | File server (movable) |
Clients connect to:
172.17.20.97 โ file-server
They never need to know which machine is serving it.
โ๏ธ Current State
On active node (e.g. araman):
ip -br addr
Shows:
enp2s0 โ 172.17.20.253 (host)
172.17.20.97 (file-server)
๐ Manual Failover Procedure
Step 1 โ Remove service IP from current host
ip addr del 172.17.20.97/24 dev enp2s0
Step 2 โ Add service IP to target host
ip addr add 172.17.20.97/24 dev enp2s0
Step 3 โ Announce ownership (IMPORTANT)
arping -c 3 -A -I enp2s0 172.17.20.97
This forces:
- switches
- clients
- dv-gate
โฆto update their ARP tables immediately.
โ ๏ธ Gotchas
โ Never have both hosts active with .97
If both nodes hold the IP:
- ARP flapping
- intermittent connections
- extremely confusing behaviour
โ ๏ธ Without arping
Failover will appear broken for a while due to stale ARP caches.
๐งฉ Why This Works
This leverages simple Layer 2 behaviour:
- IP โ resolved to MAC via ARP
- whichever host responds becomes the owner
- updating ARP = redirecting traffic
No routing changes required
No DNS changes required
No client changes required
๐ Evolution Path (Optional)
If this pattern proves useful, it can evolve into:
1. Scripted takeover
takeover-file-ip.sh
2. Health-based failover
- ping checks
- service checks
3. Lightweight HA
keepalived(VRRP)- floating virtual IP
๐ฏ Design Philosophy
Keep the system understandable, observable, and recoverable.
This approach is:
- โ transparent
- โ low dependency
- โ easy to debug
- โ easy to reverse
๐งญ Relationship to dv-gate
dv-gatehandles routing + NAT- service IP floats within LAN only
- no impact to WAN or firewall rules
๐งช Final Thought
This isnโt enterprise HA.
Itโs something better for a home lab:
A system you can reason about at 2am when it breaks.