«

»

Nutanix Clone & Snapshot – How it works

Just realised that this blog post was never released for an unknown reason. Was supposed to be published back in June 2020 ๐Ÿ™‚

Anyway, I’m getting question around how Nutanix clones and snapshots actually works and based on that i decided to create an official Nutanix document around these two techniques. The Nutanix Acropolis Distributed Storage Fabric (DSF) provides clone and snapshot functionality using a redirect-on-write algorithm.

A vDisk is any file over 512KB on DSF including VM hard disks and can be in the following modes:

  • Mutable (read/write). You can perform both reads and writes to and from the vDisk.
  • Immutable (read-only). You canโ€™t make any changes to the vDisk. Effectively, itโ€™s in read-only mode.
  • SnapshotImmutable (read-only). You canโ€™t make any changes to the vDisk. This mode is used during backup and disaster recovery situations.
  • ImmutableShadow (read-only). You canโ€™t make any changes to the vDisk. This mode is used with VMware Horizon linked clones.

During both clone and snapshot operations, the system puts the original vDisk, the VM disk and any file >512KB in DSF, in read-only mode and creates at least one new vDisk.

The newly created vDisk and its metadata structure include internal references to the original vDisk, as the two disks have a parent-child relationship

Pithos is the internal DFS vDisk configuration manager that is responsible for vDisk (DSF file) configuration data.

I’ll just provide one example of the clone process and one example of the clone process in this blog post. A lot more examples are included in the Nutanix Clones & Snapshot official document.

Clone

  1. Starting point including only VM1 which is powered off.
  2. Initial clone – VM2 is created and its vDisk_id 28 is allocated in Pithos (not on disk)
  3. VM2 performs first write and now vDisk_id (disk for VM2) is allocated on disk.
  4. VM1 is started and performs a write operation. Now vDisk_id 10 becomes RO and DFS performs a snapshot-on-write action and creates vDisk_id 22 for VM1 to which the new data goes.

Snapshot

  1. Original state – vDisk_id 10 is in RW mode.
  2. First snapshot – vDisk_id 22 is created in Pithos (not on disk). Read operations goes through vDisk_id 22 but is served via vDisk_id 10.
  3. First write – Data, D, is written to vDisk_id 22 which is now allocated on disk.
  4. Overwrite – When data A is overwritten, the new data A goes to vDisk_id 22 with data D.

Hope this gives a bit more clarity to the Nutanix AOS clone and snapshot workflows

———————————————————————————