I recently recreated a disk / vm image in google compute from a previous set of snapshots. Those snapshots are currently dated and sized as follows:
- May 20 60 MB - May 21 372 MB - May 22 255 MB - May 23 118 MB - May 24 93 MB - May 25 1110 MB
After creating the disk I took the original source disk off-line (stopped the VM), made the new disk the boot disk, and started it. I then saved a machine image of it, and then did a manual snapshot. The new snapshot:
May 25 16 MB
I don't have an image to verify, but I'm fairly certain the original May 20 snapshot was 300+ MB.
As subsequent snapshots obsolete parts of existing snapshots, are the obsolete files "taken-out" of the preceeding snapshot? I.e. the snapshot is uncompressed, pieces removed, and then recompressed?
Why is the first snapshot of the newly created disk so small? It looks like it must be linked to the snapshot series of the disk from which it was created. Note: the snapshot schedule for the original disk was disconnected from it and re-used with the new disk.
What happens to the snapshot of the newly created disk if the series from the first disk is deleted? Is it invalidated? Or are the originals "rolled into it"?
Can someone explain to me what is going on?
Subsequent investigations have revealed some behavior; still waiting to investigate more:
I successively deleted snapshots starting with the oldest, and observed the size of the others as they changed. Clearly snapshots are not read-only. When an old snapshot is deleted, something is merged into the subsequent remaining one:
Sys-1 May 20 60 MB Sys-1 May 21 372 MB 380 MB Sys-1 May 22 255 MB 255 MB 463 MB Sys-1 May 23 118 MB 118 MB 118 MB 468 MB Sys-1 May 24 93 MB 93 MB 93 MB 93 MB 468 MB Sys-1 May 25 1110 MB 1110 MB 1110 MB 1110 MB 1110 MB 1130 MB Sys-2 May 25 16 MB 16 MB 16 MB 16 MB 16 MB 16 MB
The snapshot of the disk re-created from the original series of snapshots remained at 16 MB. When I feel sufficiently safe I will delete the last (May 25) backup of the original disk and see what happens to the snapshot(s) for the re-created disk.
When the last snapshot of the original disk (Sys-1 May 25, 1130 MB) was deleted, nothing else changed. In particular, the 16 MB first-time snapshot of the recovery disk (Sys-2 May 25, 16 MB) did not expand. As a result, it appears that when a Disk-B is created from a machine image of Disk-A and snapshots of Disk-A are applied to Disk-B, then Disk-B is used to replace Disk-A in the VM, snapshots of the VM are likely to no longer be adequate for recovery:
Sys-1 May 25 1110 MB 1110 MB 1110 MB 1110 MB 1110 MB 1130 MB Sys-2 May 25 16 MB 16 MB 16 MB 16 MB 16 MB 16 MB 16 MB
The only way I have managed to force what appears to be a full snapshot is as follows:
VM-A (running system) MI-A Machine image created from VM-A at approx. desired snapshot time VM-B (backup VM created from MI-A) When created, it is automatically started, unfortunately; stop it SS-B Snapshot created from VM-B Delete VM-B
In the original scenario, this would by Sys-3; a manual snapshot made of it immediately after creation was 1.53 GB, which seems reasonable.
One unknown in the above events revolves around the VM name. The first replacement system (Sys-2) was attached to the original VM — Sys-1 was replaced in that VM with Sys-2. Since they were the same VM, the snapshot mechanism may have been confused. When Sys-3 was created, it was put in a new VM with no existing snapshot schedule.
When looking at the snapshots again (~1 hr later?), I am now totally confused. The Sys-2 original snapshot of May 25 (formerly 16 MB) is now 1.52 GB. This was the 1st snapshot of a new disk (created from snapshots of the original disk).