kubernetes-sigs / nfs-subdir-external-provisioner

Dynamic sub-dir volume provisioner on a remote NFS server.
Apache License 2.0
2.46k stars 740 forks source link

Change nfs path without reinstalling helm package #331

Open AlistairMcCutcheonIAS opened 4 months ago

AlistairMcCutcheonIAS commented 4 months ago

I've been using this for some time, but I need to change the nfs path that I'm using. I have several persistent volumes which I don't want to delete. As per the readme, the way to install the helm package is:

helm install nfs-subdir-external-provisioner nfs-subdir-external-provisioner/nfs-subdir-external-provisioner \
    --set nfs.server=x.x.x.x \
    --set nfs.path=/exported/path

But is there any way to change the nfs.path after it is installed please?

Orhideous commented 4 months ago

It is not possible to change the path in existing volumes.

Rename/move the data folder on the NFS server (if the archiveOnDelete policy is not set), then delete pv/pvc, then move the data back to its place after creation of new pv/pvc.

In the case of a database, temporary replace the command with ["/bin/sleep", "infinity"] to maintain data consistency.

k8s-triage-robot commented 1 month ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

Orhideous commented 3 weeks ago

/remove-lifecycle stale

Orhideous commented 3 weeks ago

Well, since https://github.com/kubernetes/kubernetes/issues/54562 configuration for NFS volumes is effectively set in stone, so there are no easy way to move data automatically.

Nevertheless, I removed the stale label, because this issue can be addressed, at least with mention of some workarounds in the docs.