-
Notifications
You must be signed in to change notification settings - Fork 95
Support a volume create -o"clone-from=<diskname>" option. #462
Comments
For a future planned release. Sure, this issue isn't as much for doing backup as it allows users to clone disks via docker itself which isn't possible otherwise. |
Hello @govint @pdhamdhere , I have added basic cloning support at 44f91cc. From simple tests the only downside i noticed is the capacity info in docker volume inspect, the same doesn't happen in the admin cli. (i know they fetch information in different ways, but didn't investigate). Also dependency tracking for deltas doesn't seems to be necessary, looks like that when deleting the parent it consolidates on the delta. Do you have available documentation about this behaviour? Thanks! |
The output from the one basic test with diskformat=delta, which shows the consolidation on the clone volume after removal of master.
//CC @msterin |
I'm not sure we want to create a delta of the volume being cloned-from, or that should be a choice whether delta or a full clone of the volume is needed. Plus need a way to create deltas of just the disk alone vs. the VM as a whole. The disk size issue I've raised a separate issue to handle that. |
It's a choice, right now the default is the same for create (thin).
The code on brunotm.issue462 only clones the volume with virtualDiskManager.CopyVirtualDisk, there's no vm interaction.
|
Thanks @brunotm . I have a few emergencies to take care of and then will take a look. |
@msterin Luck with the emergencies. |
I am back for now. Yes. I see the use case. checkpoint it nice. The code is good too. A few nits (the biggest one being the code from lower layer creeping into executeRequest() - I think misc. details eg. clone or DB handling, should be within *VMDK() functions, e.g. createVMDK, not in executeRequest. Are you planning to submit a PR ? |
@msterin |
Supported via #726 |
This issue is to support a new volume create time option "clone-from" that allows a docker user to create a volume from an existing volume, either as a full copy (initially) or as a copy-on-write disk of the existing one.
Use cases:
The text was updated successfully, but these errors were encountered: