kubernetes-csi / csi-driver-nfs

This driver allows Kubernetes to access NFS server on Linux node.
Apache License 2.0
849 stars 249 forks source link

Capacity value doesnot reflect in pvc list/status after updating storage request in PVC #746

Open navilg opened 2 months ago

navilg commented 2 months ago

What happened:

I tried to edit a PVC and increase storage request, but it doesnot increase the storage size of PVC.

What you expected to happen: I know since we are using NFS, It will use entire NFS volume and not restricted to PVC size, But atleast it should have updated the new capacity value in PV and in PVC for proper visual in PVC and PV list.

How to reproduce it:

  1. Create a dynamic PVC in K8s using csi-driver-nfs csi-driver.
  2. Create pod which uses this PVC
  3. Edit PVC and increase resources.requests.storage

Anything else we need to know?:

is there a way as workaround to make sure PVC and PV size is reflected after we edit the storage request in PVC without making pod/app down.

Environment:

andyzhangx commented 2 months ago

this csi driver does not support resize

navilg commented 2 months ago

Thanks @andyzhangx

Can we add a feature where when we resize a PVC

  1. It updates the PV size to new size only in metadata (definition)
  2. It updates PVC status size to new size

I know there is not have a way to restrict the size of data inside a pv directory in nfs server. But atleast this will fix the issue of PVC size not reflecting correct status

andyzhangx commented 1 month ago

@navilg that's a dummy resize, it's better not doing that since this driver actually does not support resize.

jsalatiel commented 2 weeks ago

Even though it is a dummy resize it is really useful to be able to do that" resync in disk size" before backing up using Velero. This way the restore to another csi will create the right size pvc before restoring otherwise it just fails to restore.