Browse OpenForge documentation
/oss/en/nfs-quota-agent/architecture

Storage Architecture

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

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).