cancel
Showing results for 
Search instead for 
Did you mean: 
khokha
Flight Engineer
Flight Engineer
  • 1,213 Views

DO370 PVC cloning

Hello everyone,

I've a quesion about pvc cloning Ch05S05.

Can i clone a pvc that is mounted in a deployment?

I tried this but the clone kept in pending state!!

Thanks

 

Labels (3)
4 Replies
Chetan_Tiwary_
Community Manager
Community Manager
  • 1,181 Views

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/ 

https://docs.openshift.com/container-platform/4.9/storage/container_storage_interface/persistent-sto... 

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.

khokha
Flight Engineer
Flight Engineer
  • 1,179 Views

@Chetan_Tiwary_ 

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

0 Kudos
Chetan_Tiwary_
Community Manager
Community Manager
  • 1,144 Views

@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

Chetan_Tiwary__0-1700662011155.png

If it is not the requirement then you can ignore it. I agree that it is best suited for backups and restoring procedures. 

0 Kudos
Chetan_Tiwary_
Community Manager
Community Manager
  • 1,144 Views

@khokha To return to your original query - I found one reference in the K8 docs to my answer above : 

Chetan_Tiwary__1-1700662599957.png

 

0 Kudos
Join the discussion
You must log in to join this conversation.