azure-docs icon indicating copy to clipboard operation
azure-docs copied to clipboard

Migration from in-tree to CSI drivers missing explanation if existing data can be re-attached or must be copied to new PV-s

Open mloskot opened this issue 2 years ago • 1 comments

This migration guide promises no data loss and this is correct as the guide clearly presents how to change reclaimPolicy from Delete to Retain for existing volumes (PV-s).

Then, the guide explains how to 4. Create a new PV using the new StorageClass and then the new PV is claimed as volume by re-created POD-s.

But, this guide does not explain how to re-attach the already existing (old) PV-s to re-created pods.

List of I think important questions that the migration guide is not answering:

  • Why the new PV-s are created?
  • What about existing old PV-s?
  • Is it possible to re-attach existing PV-s to re-created POD-s after switching from in-tree to CSI drivers?
  • Is user supposed to perform copy of data from old retained PV-s to newly created PV-s?

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

mloskot avatar Feb 14 '23 16:02 mloskot

@mloskot Thanks for your feedback! I've delegated this to content author @MGoedtel, who will review it and offer their insightful opinions.

Naveenommi-MSFT avatar Feb 15 '23 01:02 Naveenommi-MSFT

@Naveenommi-MSFT @MGoedtel Any update on this? Document is still not updated, nor there was an update here. To be honest, in AWS EKS similar migration is done in the backend by the addon itself, no action nor changes needed from users (besides installing addon prior upgrade), so here at least documentation should be done right.

grodzik avatar May 15 '23 09:05 grodzik

Why the new PV-s are created?

that's because old PV is in-tree PV, it's deprecated, new CSI driver PV should be created.

What about existing old PV-s

After new PV and PVCs are created successfully, old PVs are useless, they could be deleted.

Is it possible to re-attach existing PV-s to re-created POD-s after switching from in-tree to CSI drivers?

existing PVs are in-tree PVs, user should not use existing intree PV any more.

Is user supposed to perform copy of data from old retained PV-s to newly created PV-s?

that's not necessary since new PV references the same file share, it's just k8s PV config change in the in-tree volume migration process.

andyzhangx avatar May 25 '23 15:05 andyzhangx

@andyzhangx Thank you! Your answer should be turned into the docs update, IMHO.

that's not necessary since new PV references the same file share

This is a subtle Azure Storage specific detail that I had missed and I'm confident many users may miss it as well: lifetime of PVC vs lifetime of PV vs lifetime of underlying cloud-based storage.

mloskot avatar May 25 '23 21:05 mloskot

We've addressed the feedback in a PR that was just merged this morning, and as a result I'm going to proceed with closing this issue. Thanks. #please-close

MGoedtel avatar Jun 09 '23 13:06 MGoedtel