Article ID: kb1117Last Modified: 29-Aug-2024

Changed Block Tracking Feature on VMware Backup Plans

Changed Block Tracking Explained

Changed Block Tracking (CBT) is a VMware feature that helps perform incremental backups. VMware Data Recovery uses this technology and so can developers of backup and recovery software.

Virtual machines running on ESX/ESXi hosts can track disk sectors that have changed. This feature is called Changed Block Tracking (CBT). On many file systems, CBT identifies the disk sectors altered between two changeset IDs. On VMFS partitions, CBT can also identify all the disk sectors that are in use.

Virtual disk block changes are tracked from outside virtual machines, in the virtualization layer. When software performs a backup, it can request transmission of only the blocks that changed since the last backup, or the blocks in use. The CBT feature can be accessed by third-party applications as part of the vSphere APIs for Data Protection (VADP). Applications call VADP to request that the VMkernel return blocks of data that have changed on a virtual disk since the last backup snapshot.

For CBT to identify altered disk sectors since the last change ID, these items are required:

  • The host must be ESX/ESXi 4.0 or later
  • The virtual machine owning the disks to be tracked must be hardware version 7 or later
  • I/O operations must go through the ESX/ESXi storage stack. So NFS is supported, as is RDM in virtual compatibility mode, but not RDM in physical compatibility mode. VMFS is supported, whether backed by SAN, iSCSI, or local disk
  • CBT must be enabled for the virtual machine (see below)
  • Virtual machine storage must not be (persistent or non-persistent) independent disk, meaning unaffected by snapshots.

For CBT to identify disk sectors in use with the special *\ change ID, these items are required:

  • The virtual disk must be located on a VMFS volume, backed by SAN, iSCSI, or local disk
  • The virtual machine must have zero (0) snapshots when CBT is enabled, for a clean start.

In some cases, such as a power failure or hard shutdown while virtual machines are powered on, CBT might reset and lose track of incremental changes. In vSphere 4.1 and prior, Cold Migration (but not Storage vMotion) could reset but not disable CBT. In vSphere 5.x versions earlier to vSphere 5.5 Update 2, storage vMotion resets CBT.

Check if a Virtual Disk has a CBT Enabled

To make sure if a virtual disk has CBT Enabled, proceed as follows:

  1. Open the vSphere Client and select a powered-off virtual machine.
  2. Right-click the virtual machine and go to Edit Settings -> Options -> Advanced/General -> Configuration Parameters.
  3. The configuration file (.vmx) of the virtual machine contains the entry: ctkEnabled = "TRUE".

Note: Set the value to False to disable CBT. For more information, see the Enable CBT on Virtual Machines paragraph

  1. For each virtual disk, the .vmx file contains the entry: scsix:x.ctkEnabled = "TRUE".
  2. For each virtual disk and snapshot disk there is a .ctk file.

For example:

  • vmname.vmdk
  • vmname-flat.vmdk
  • vmname-ctk.vmdk
  • vmname-000001.vmdk
  • vmname-000001-delta.vmdk
  • vmname-000001-ctk.vmdk.

After a successful backup and full snapshot consolidation, there should be no snapshot related .ctk files remaining in the datastore. For example: vmname-000001-ctk.vmdk

Enable CBT on Virtual Machines

To enable or disable CBT on a virtual machine, perform the appropriate steps given for enabling or disabling:

Note: Ensure that the virtual machine is powered off before performing these steps.

To Enable CBT in a Virtual Machine

  1. Power off the virtual machine.
  2. Right-click the virtual machine, then click Edit Settings.
  3. Switch to the Options tab.
  4. Click General under the Advanced section, then click Configuration Parameters.
  5. Click Add Row.
  6. Add the ctkEnabled parameter, then set its value to true.
  7. Click Add Row, add scsi0:0.ctkEnabled, then set its value to true.

Note: scsi0:0 in scsi0:0.ctkEnabled indicates the SCSI device assigned to the hard disk that is added to the virtual machine. Every hard disk added to the virtual machine is given a SCSI device that appears similar to scsi0:0, scsi0:1, or scsi 1:1. CBT is enabled (or disabled) individually on each disk

  1. Power on the virtual machine.
  2. In the home directory of the virtual machine, verify that each disk having CBT enabled has also a vmname-ctk.vmdk file.
https://git.cloudberrylab.com/egor.m/doc-help-kb.git