Storage Architecture
NFS Quota Agent runs as a lightweight, single-binary Go daemon on the NFS host server with root privileges.
Architecture Diagram
The diagram separates Kubernetes requests → agent control logic → Linux/XFS kernel enforcement. Capacity limits are ultimately enforced by XFS Project Quotas in the kernel rather than by application-level checks.
XFS Project Quota Kernel Mechanics
- Mount Option: The XFS filesystem must be mounted with the
pquota(orprjquota) option. - Directory Association: When a new PVC is created, a unique
Project IDis assigned and linked to the directory:xfs_quota -x -c 'project -s -p /srv/nfs/pvc-12345 101' /srv/nfs - Limit Enforcement: Hard and soft byte thresholds are established:
xfs_quota -x -c 'limit -p bhard=10g 101' /srv/nfs - Kernel-Level Blocking: Any write attempting to exceed the 10GiB limit immediately fails with
EDQUOT (Disk quota exceeded).