aly badawy/homelab
all systems operational
// networking · storage

NAS & storage

The UNAS 4 at 172.20.20.2 provides NFS shares for the k3s cluster. Four exports mount on the cluster node at boot; a fifth is the Longhorn backup target.

UNAS 4 172.20.20.2 NFS exports Longhorn backup target

01 NAS hardware

PropertyValue
ModelUniFi UNAS 4
IP172.20.20.2 — static/reserved in DHCP
VLANServers (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 pathMounted atUsed 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:

/etc/fstab (NFS entries) text
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
OptionWhy it's there
_netdevDelays mount until networking is up. Without this, systemd may try to mount NFS before the network interface is ready and fail at boot.
nofailBoot 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.automountMount 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=10Caps 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.

Longhorn backup target text
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.

last updated 2026-06-08 · mount-nas script on GitHub