OPERATING DOCUMENT / NFS QUOTA AGENT

Storage Architecture

Linux XFS Project Quotas, gRPC daemon internals, and provisioning flows.

01 / Context02 / Procedure03 / Operations04 / Verification

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

  1. Mount Option: The XFS filesystem must be mounted with the pquota (or prjquota) option.
  2. Directory Association: When a new PVC is created, a unique Project ID is assigned and linked to the directory:
    xfs_quota -x -c 'project -s -p /srv/nfs/pvc-12345 101' /srv/nfs
  3. Limit Enforcement: Hard and soft byte thresholds are established:
    xfs_quota -x -c 'limit -p bhard=10g 101' /srv/nfs
  4. Kernel-Level Blocking: Any write attempting to exceed the 10GiB limit immediately fails with EDQUOT (Disk quota exceeded).
DOCUMENT TRACE

Return to the project record to see architecture, development pulse, proof and related field notes in one context.