What are Dependent, Independent Disks & Persistent and Non-persisent Modes?

I had a query about this recently, and actually it is a topic that I have not looked at for some time. Those of you configuring virtual machine disks may have seen references to these different configuration options and may have wondered how they affect the behavior of the virtual machine. Read on to find out the subtleties between Independent Persistent Mode and Independent Non-persistent Mode disks, and what impact they may have.

In a nutshell, this all related to how the VMDK behaves when a virtual machine snapshot is taken. VMDKs, by default, are said to be dependent. In other words, when the virtual machine is snapshot’ed, this disk is included in the snapshot. Independent disks, however, can have different behaviors when the VM is snapshot’ed. Let’s examine the difference next.

Independent Persistent Mode

When a VMDK is configured in Independent Persistent Mode, what you will see is that no delta file is associated with this disk during a snapshot operation. In other words, during a snapshot operation, this VMDK continues to behave as if there is no snapshot being taken of the virtual machine and all writes go directly to disk. So there is no delta file created when a snapshot of the VM is taken, but all changes to the disk are preserved when the snapshot is deleted.

Independent Non-persistent Mode

When a VMDK is configured as Independent Non-persistent Mode, a redo log is created to capture all subsequent writes to that disk. However, if the snapshot is deleted, or the virtual machine is powered off, the changes captured in that redo log are discarded for that Independent Non-persistent VMDK.

Why Independent Disks?

This begs the question of what do Independent disks do for you, be they persistent or non-persistent. The bottom line is that if a disk is Independent, they can be omitted from a backup operation by virtue of the fact that they do not support snapshot operations. You can think of Independent as meaning ‘Independent of snapshots’.

Sample Use Case

Let’s take a virtual machine which hosts a web service, but it is primarily a read-only web site with content that rarely changes. This VM has three disks. Disk 1 contains the Guest OS and web application (e.g. Apache). Disk 2 contains the web pages for the web site. Disk 3 contains all the logging activity.

In this case, disk 1 (OS & app) are dependent (default) settings and is backed up nightly. Disk 2 is independent non-persistent (not backed up, and any changes to these pages will be discarded). Disk 3 is independent persistent (not backed up, but any changes are persisted to the disk).

If updates are needed to the web site’s pages, disk 2 must be taken out of independent non-persistent mode temporarily to allow the changes to be made.

Now lets say that this site gets hacked, and the pages are doctored with something which is not very nice. A simple reboot of this host will discard the changes made to the web pages on disk 2, but will persist the logs on disk 3 so that a root cause analysis can be carried out.

There you have it. Hopefully this gives you an idea of the reasoning behind independent persistent and independent non-persistent disks.

8 Replies to “What are Dependent, Independent Disks & Persistent and Non-persisent Modes?”

  1. Nice explanation, especially the illustrated use case. I usually go farther with the explanation because independent virtual disks are also treated differently when the VM is cloned. In the case of cloning a VM, the independent disk is not included in the resulting new clone VM.

  2. I’m using independent non-pers disks for swap volumes of Linux VMs. This way i’m 100% sure that after reboot(or when VM is down) the swap dedicated vdisk will go back to it’s minimal normal state. I have no problem cloning these, so i’m not sure why you state the independent disks not included in clones. Is there a special situation when they are not cloned or is this applicable on the new vsphere versions? I’m using 4.1 platform.

Comments are closed.