kubernetes-csi/csi-driver-nfs

NFS CSI provisioner not showing actual usage of each PVC

kaveh6161 opened this issue · 2 comments

Is your feature request related to a problem?/Why is this needed
We have deployed this driver in our OKD cluster, accessing an NFS share running on top of an Ubuntu 22.04 LTS server.

As far as I understand, Kubernetes sees the PVC as a "view" into this directory. However, from a capacity reporting perspective, Kubernetes (or rather, the tools that report on PVC usage) sees the entire filesystem, not just the isolated directory. Hence, the reported usage is that of the entire NFS share and not just the sub-directory associated with the PVC.

This limitation creates a critical pain point for us in reporting and quota management of the used and allocated storage by each k8s application.

Additional context
Are there already any k8s-native solution for this? Or any other workarounds?

navilg commented

This is expected behaviour with NFS based storage.
PVC we see in K8s is just a folder inside a NFS which is mounted on node/pod. Even if you mount a specific directory of NFS, It will show you entire filesystem usage.

by design