6

In VMWare, when a snapshot is taken, my understanding is that it creates delta disks, and any writes that occur after the snapshot is created will be written to these new delta disk images, and not the primary vmdk image. This is part of the copy on write functionality which is common between vmware,KVM, and LVM snapshots. If you revert/go to a snapshot, the corresponding deltas are ignored, and if you delete a snapshot, they are deleted so either way you are left reading and writing only to the primary vmdk file again. There is also system setting information and system state information that is saved as well.

Is this accurate, and is it fundamentally the same for LVM and KVM snapshots?

2 Answers 2

4

and if you delete a snapshot, they [the deltas] are deleted so either way you are left reading and writing only to the primary vmdk file again.

Deleting a snapshot without reverting to it will cause the delta file to be applied to the VMDK. Other than that, your explanation for VMWare seems spot on. I can't help with the other platforms, though.

That said, normal copy-on-write like you'd see on a storage array or with VSS in Windows is something that writes to the actual volume after saving the snapshotted state of the data. If the VMWare snapshot were copy-on-write, it would be modifying the VMDK after populating the delta file with the old version of whatever was being written.

6
  • Can anyone confirm which is correct? Does it simply write any new data to the delta files, or does it copy the blocks to be changed to the delta files and write the changes to the original vmdk (and then overlay the deltas to replace those blocks with their original contents after reverting to or applying a snapshot)?
    – user160910
    Jul 17, 2013 at 19:36
  • 1
    "Deleting a snapshot removes the snapshot from the Snapshot Manager. The snapshot files are consolidated and written to the parent snapshot disk and merge with the virtual machine base disk." source
    – Basil
    Jul 17, 2013 at 19:47
  • Thanks! If you are deleting a snapshot, dont you not want the data?
    – user160910
    Jul 17, 2013 at 20:24
  • If you delete a snapshot, all the writes done since the snap need to be applied to the normal vmdk. If you want to revert to the snapshot, no writes are required.
    – Basil
    Jul 18, 2013 at 13:48
  • That suggests that the Snapshots contain any writes that occur after their creation, and it suggests that they don't contain a copy of the modified blocks from the original VMDK, right?
    – user160910
    Jul 18, 2013 at 14:04
8

Is this accurate, and is it fundamentally the same for LVM and KVM snapshots?

Yes and yes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy