Hello @khokha !
AFAIK, both CDI and CSI volume cloning do not support cloning a PVC that is already mounted in a deployment.
Did not get this specific information at : https://kubernetes.io/docs/concepts/storage/volume-pvc-datasource/
Another alternative to it would be volume snapshots - take a snapshot of the PV and then use it to create a new volume based on K8s dynamic volume provisioning.
Thanks for your reply.
Can you mention in more details your solution?
would it be considered as clone when created from a snapshot?
Can i create the clone and the snapshot is for mounted pvc?
Thanks
@khokha No - Snapshots are by definition a point in time copy of your data whereas Clone is 100% duplicated 1:1 copy.
I was talking about an alternative resolution about if you want a copy of a pvc and provision a new volume : create a snapshot of the volume --> create a disk out of it --> create new pv & pvc --> then proceed to include it in a new deployment
If it is not the requirement then you can ignore it. I agree that it is best suited for backups and restoring procedures.
@khokha To return to your original query - I found one reference in the K8 docs to my answer above :
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.