csi-digitalocean icon indicating copy to clipboard operation
csi-digitalocean copied to clipboard

Simplify way to migrate volumes between clusters

Open scottrobertson opened this issue 5 years ago • 7 comments

This may already be somewhere, or perhaps i am thinking about it wrong, but I cannot find anything.

I recently had to migrate to another cluster, and i used https://github.com/digitalocean/csi-digitalocean/tree/master/examples/kubernetes/pod-single-existing-volume to keep the exisiting volumes.

Would it make sense to document a way so that when creating the volumes, they can easily be migrated to a new cluster, instead of having to retroactively go back and get the ids, and create "fake" PV definitions.

For example, can this be done by supplying a name to the PV?

scottrobertson avatar May 15 '19 10:05 scottrobertson

Thank you for creating the issue! One of our team members will get back to you shortly with additional information.

welcome[bot] avatar May 15 '19 10:05 welcome[bot]

One way to implement this that I've been thinking about would be to add a small operator that accepts a simple CRD for the volume to be integrated. It would hide all the details of mapping IDs and setting up PVs properly.

timoreimann avatar Dec 15 '19 23:12 timoreimann

For me it seems usefull to re-use volume in PVC if it already exists, and if not, a new one should be created. Can i achieve that out of the box?

bukowa avatar Jan 31 '20 17:01 bukowa

@bukowa the link shared in the original post of this issue describes how to re-use an existing volume. There's no mechanism in place implementing a reuse-or-create logic; I suppose you could build that yourself by checking if the volume exists and creating the PV depending on the outcome of that check.

timoreimann avatar Jan 31 '20 18:01 timoreimann

@timoreimann yes i totally understand that, is it something reasonable to implement on the driver side?

bukowa avatar Jan 31 '20 18:01 bukowa

Yeah, I think it's a reasonable thing to do for that hypothetical controller I mentioned above. I'm not sure whether it would be best to integrate the controller into the driver or provide it as a stand-alone component, but that's more of a detail.

timoreimann avatar Jan 31 '20 18:01 timoreimann

I agree with @bukowa that having smth out of the box for reusing existing volumes will be really useful.

botzill avatar Feb 10 '20 13:02 botzill