rancher / local-path-provisioner

Dynamically provisioning persistent local storage with Kubernetes
Apache License 2.0
2.22k stars 452 forks source link

Expand pvc #18

Closed sscenglish closed 1 month ago

sscenglish commented 5 years ago

didn't find a plugin capable of expanding the volume; waiting for an external controller to process this PVC.

nvtkaszpir commented 4 years ago

This is no longer valid at least as of version 0.0.14

When trying to change pvc (from 2gi to 40Gi) there is an error:

Error from server (Forbidden): error when applying patch:
{"metadata":{"annotations":{"kubectl.kubernetes.io/last-applied-configuration":"{\"apiVersion\":\"v1\",\"kind\":\"PersistentVolumeClaim\",\"metadata\":{\"annotations\":{},\"name\":\"local-path-pvc-slow\",\"namespace\":\"default\"},\"spec\":{\"accessModes\":[\"ReadWriteOnce\"],\"resources\":{\"requests\":{\"storage\":\"40Gi\"}},\"storageClassName\":\"local-path-slow\"}}\n"}},"spec":{"resources":{"requests":{"storage":"40Gi"}}}}
to:
Resource: "/v1, Resource=persistentvolumeclaims", GroupVersionKind: "/v1, Kind=PersistentVolumeClaim"
Name: "local-path-pvc-slow", Namespace: "default"
for: "k8s/lppslow-pvc.yaml": persistentvolumeclaims "local-path-pvc-slow" is forbidden: only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize

Yet you can edit pv size.

yasker commented 4 years ago

Currently, the volume size for the local path provisioned doesn't have a quota, so the size used by the pod can be bigger.

avairava commented 4 years ago

Does local-path-provisioner supports expanding the volume provisioned by it? When I tried to expand the volume, it complains about the unavailability of plugin capable of expanding the volume.

"Ignoring the PVC: didn't find a plugin capable of expanding the volume; waiting for an external controller to process this PVC."

avairava commented 4 years ago

Currently, the volume size for the local path provisioned doesn't have a quota, so the size used by the pod can be bigger.

Does this mean we can keep extending the volume as long as there is availability in the disk?

nvtkaszpir commented 4 years ago

In current implementation the disk can have 2GB and cannot be expanded, from kubernetes point of view. But because this is just a path on the host system then from system point of view this can grow in size up to the storage limits (or quota limits applied on the underlying system).

So you can have PVC declared to be 2GB, but actual size of the path is 200GB, while file syste mlimit is 800GB on physical 1TB layer ( in that case let say 80% of the pv is used as vg).

ekristen commented 3 years ago

While I understand there's no enforcement, if you change the underlying value you start to get errors. Is there anyway to update the provisioner to allow changing of the storage size even though it's not enforced? I programmatically generate these values at this time off of external data. I had it change and the updates to the PV start to fail.

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

github-actions[bot] commented 1 month ago

This issue was closed because it has been stalled for 5 days with no activity.