01 NAS hardware
| Property | Value |
|---|---|
| Model | UniFi UNAS 4 |
| IP | 172.20.20.2 — static/reserved in DHCP |
| VLAN | Servers (20) |
| NFS export base | /var/nfs/shared |
| Drives | |
| Total capacity |
02 NFS exports
Four directories under /var/nfs/shared/ are exported over NFS and mounted on the k3s server at boot. A fifth path (backups/pvcs) is used exclusively as the Longhorn backup target — it is not mounted as a filesystem on the cluster node.
| Export path | Mounted at | Used by |
|---|---|---|
| 172.20.20.2:/var/nfs/shared/homelab | /mnt/nas/homelab | General homelab storage |
| 172.20.20.2:/var/nfs/shared/backups | /mnt/nas/backups | General backup storage; also contains pvcs/ subdir for Longhorn |
| 172.20.20.2:/var/nfs/shared/immich | /mnt/nas/immich | Immich photo library (NAS-backed, not Longhorn) |
| 172.20.20.2:/var/nfs/shared/nextcloud | /mnt/nas/nextcloud | Nextcloud external storage for large files |
03 Mount options
All four NFS mounts use the same /etc/fstab options, chosen specifically for a Kubernetes node:
172.20.20.2:/var/nfs/shared/homelab /mnt/nas/homelab nfs defaults,_netdev,nofail,x-systemd.automount,x-systemd.mount-timeout=10 0 0
172.20.20.2:/var/nfs/shared/backups /mnt/nas/backups nfs defaults,_netdev,nofail,x-systemd.automount,x-systemd.mount-timeout=10 0 0
172.20.20.2:/var/nfs/shared/immich /mnt/nas/immich nfs defaults,_netdev,nofail,x-systemd.automount,x-systemd.mount-timeout=10 0 0
172.20.20.2:/var/nfs/shared/nextcloud /mnt/nas/nextcloud nfs defaults,_netdev,nofail,x-systemd.automount,x-systemd.mount-timeout=10 0 0
| Option | Why it's there |
|---|---|
_netdev | Delays mount until networking is up. Without this, systemd may try to mount NFS before the network interface is ready and fail at boot. |
nofail | Boot succeeds even if the NAS is unreachable. The cluster node can start Kubernetes even during a NAS outage — only workloads that need NAS paths will fail. |
x-systemd.automount | Mount is lazy — attempted on first filesystem access, not at boot time. Avoids blocking the boot sequence if the NAS is slow to respond. |
x-systemd.mount-timeout=10 | Caps the automount retry at 10 seconds. Without a timeout, a hung NFS connection would block indefinitely. |
04 Longhorn backup target
Longhorn uses the NAS as its backup destination over NFS. The backup target is configured in the Longhorn Helm values — it points at the backups/pvcs subdirectory, keeping Longhorn volume backups separate from other NAS content.
nfs://172.20.20.2:/var/nfs/shared/backups/pvcs
Longhorn polls the backup target every 300 seconds. Each Longhorn PVC with the annotation recurring-job-group.longhorn.io/default: enabled participates in the default recurring snapshot + backup schedule. See Longhorn docs for details.