For a long time, my Kubernetes dev cluster used NFS for persistent volumes. NFS works. NFS is also painful — root squash, UID mapping, the occasional "stale file handle" error that takes down a pod.
This week I switched to WebDAV via ScsDriver as the underlying storage. Same NAS, same workload, zero stale handles.
This post is what I learned.
The setup
- Synology DSM with WebDAV enabled (port 5006)
- ScsDriver mounts the NAS as Z: on Windows
- k3d / k3s running locally with a WebDAV-backed PV
The WebDAV pod is a sidecar that serves the WebDAV mount as a local filesystem to other pods.
apiVersion: v1
kind: PersistentVolume
metadata:
name: webdav-pv
spec:
capacity:
storage: 500Gi
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: webdav
hostPath:
path: /mnt/webdav-share # maps to Z:\ in the host
type: Directory
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: webdav-pvc
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 100Gi
storageClassName: webdav
Why not NFS
I've used NFS for years. The pain points that pushed me to WebDAV:
-
Stale file handle errors — when the NFS server restarts, pods that had open files get
ESTALE. The pod needs a restart. In a dev cluster, that's annoying. In production, that's an outage. - Root squash — by default, NFS server maps root to nobody. To run a container as root and write to the mount, you have to disable root squash or change UIDs. Workable but fiddly.
- Windows compatibility — NFS client on Windows is fragile. WebDAV via ScsDriver just works on Windows, macOS, Linux.
Why WebDAV via ScsDriver
For my dev cluster (k3s on Windows), ScsDriver gives me a Windows-native mount that Linux pods can read via hostPath. The mount is:
- Kernel-level: doesn't drop on idle (NFS client on Windows does)
- Auto-reconnect: server reboot, mount back in 5 seconds
- Multi-platform: same WebDAV URL works on Linux, macOS, Windows
The Linux side just needs a davfs2 mount:
sudo apt install davfs2
sudo mount -t davfs https://nas:5006/dav /mnt/webdav
What I tested
| Operation | NFS | WebDAV via ScsDriver |
|---|---|---|
| Pod restart (NFS server bounce) | Stale handle error, pod needs restart | Auto-reconnect, no error |
| 1 GB file write | 95 MB/s | 90 MB/s |
| 1000 × 1 MB file writes | 3m 20s | 3m 50s |
| Cross-platform mount (Linux + macOS + Windows) | ❌ fragile on Windows | ✅ same URL works |
| Persistent after sleep/hibernate | ❌ drops | ✅ survives |
The WebDAV mount is slightly slower on bulk writes, but the operational benefits (no stale handles, multi-platform, survives sleep) win.
Cost
- NFS: free (built into Linux)
- ScsDriver: $9.99/yr
- davfs2: free (Linux)
For a personal dev cluster, the $9.99 is a no-brainer trade for the operational wins.
What I'd change
The bulk write performance gap is real (~5%). For heavy write workloads (CI/CD artifact uploads), NFS is still faster. WebDAV via ScsDriver is best for dev + mixed read/write workloads.
Reference
- ScsDriver: https://drive.scsoi.com/ (7-day trial, $9.99/yr)
- davfs2: https://savannah.nongnu.org/projects/davfs2
- k3s: https://k3s.io/
If you're running K8s locally and tired of NFS's stale handles, WebDAV via ScsDriver is a 5-minute setup that solves it.
Top comments (0)