Update PersistentVolume NFS IP

Hy!

My cloud provider moved one of my servers to a new host, so it gets a new ip. This was my nfs server. The cluster nodes can’t connect to it anymore, so I redeployed the nfs-client-provisioner chart with the updated IP, and hoped everything will come up. The provisioner container came up just fine, but nothing else. In the dashboard PVC/edit-view, I saw that the spec/nfs/server points to the old ip. At this point I was like: “Ok, I need to update them manually, it is ~10 file I will do it by hand.” But apparently that field is not mutable.

My question is:
What is the easiest way to modify/recreate PVC volumes with the new IP, without a lot of manual file copy, or multiple rebindings? (It happened on a staging env so it is not super critical, but would be nice to solve this without big data/config loss.)

I’m using v1.15.4-rancher1-2 but I think this is not a rancher or cluster-version specific question.

So I didn’t found any simple way. Edit on ip not working. The delete PV and create the PV with the same name could work, but you need to check the meta and remove the delete-protection. I recreated all my pv-s with a new name, rebinded in the deploys and moved the data from folder-to-folder. Super slow, but everything worked perfectly. For <10 app I think this is a lesser evil. Still interested in a more sofisticated way tho.

Hi @tg44 did you make a script or something ?
I am exactly in your case and it is a nightmare …
you did not find anything better since ?

I found: https://github.com/utkuozdemir/pv-migrate that could help to migrate pv… but I need to stop production to do that

Sadly not… The best way to avoid this is to not use ntfs at all :smiley: I migrated all my data by hand, it was only a dev env.

Thanks for your answer :stuck_out_tongue: it will be a mess when we will do that ^^

What other file system should we use ? I thought nfs was a good idea but indeed it was not