Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Volume Expansion #190

Open
ekristen opened this issue May 11, 2021 · 8 comments
Open

Support Volume Expansion #190

ekristen opened this issue May 11, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@ekristen
Copy link
Contributor

Since local-path-provisioner does not enforce capacity limitations, then I see no reason to throw errors in the event that someone changes the spec.capacity settings.

The following PR implements a partial fix that does away with the error messages. The remaining fix would be to simply update the PVC status to match the spec in a no-op function since it doesn't actually enforce or have to provision space.

Again since there is zero enforcement I see no reason to not simply set the setting that allows for volume expansion.

The error being only dynamically provisioned pvc can be resized and the storageclass that provisions the pvc must support resize

PR - #189

Other issues

@innobead innobead added the enhancement New feature or request label May 11, 2021
@ekristen
Copy link
Contributor Author

Is there any reason to not do this? If the provisioner isn't actually enforcing or check data sizes, why not allow the size to be changed so it doesn't throw an error?

@michaelandrepearce
Copy link

Any update on this?

@quato666
Copy link

I'm also very interested in this enhancment - I'm successufly using provisioner with xfs quota feature and it really lacks the ability to resize pvc/pv - that way it would be possible to have consitancy between pv/pvc data on k8s and quotas set on directories. Adding additional section "resize" (besides setup and teardown) in local-path-config configmap, along with code changes needed for k8s to properly handle and notify volume expansion for storageclass with allowVolumeExpansion set to true, would be very useful.

@quato666
Copy link

By the way - xfs quota works great, because at the pod/container level it returns proper size values with df :)

@derekbit
Copy link
Member

@quato666

Thanks for the feedback.
I don't have much time for this project at the moment, so the development and update will be slow.
If you're interested in this feature. Any contribution is welcomed. Thank you in advance.

@laurivosandi
Copy link

I am also interested in this

@jessebot
Copy link

It looks like #350 may no longer be in development, so if others are familiar enough to tackle this, it may be a good time to submit a PR. This feature would be incredibly useful.

@fs185143
Copy link

Any progress on this? Currently if I do the following:

  • Add allowVolumeExpansion: true to the local-path StorageClass
  • Create a VM with a local-path disk, e.g.,
  - metadata:
      name: os-vm-basic-disk
      namespace: os-example
    spec:
      pvc:
        accessModes:
        - ReadWriteOnce
        storageClassName: local-path
        resources:
          requests:
            storage: 80Gi
  • Patch os-vm-basic-disk PersistentVolumeClaim and increase the value, e.g.,
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 90Gi

Then the PVC just gets stuck in this state

Warning ExternalExpanding 7m3s volume_expand waiting for an external controller to expand this PVC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants