vmware CBT changed block tracking

VMware CBT may not be giving your backups accurate data.

If you are currently using VMware vSphere and you are utilizing CBT (Change Block Tracking) for you backups you may be at risk of bad backups. Luckily this issue only effects vmdk files that have grown over 128GB in size, so this should narrow down your scope of affected backups. This issue can be reproduced by expanding a virtual disk (vmdk) file with Change Block Tracking (CBT) enabled. Your virtual machine may be at risk if the vmdk file was extended to a size greater than 128 G. Which would incorrectly calculate the in-use blocks in the vmdk file.

This affects esxi hosts versions 4.x and 5.x and there is no currently no fix or update; There is however a workaround.

Workaround:

Go to each of the affected VMs and disable and then re-enable Change Block Tracking (CBT) on the virtual machines.

How to Disable CBT:

  1. Power off the virtual machine.
  2. Right-click the virtual machine and click Edit Settings.
  3. Click the Options tab.
  4. Click General under the Advanced section and then click Configuration Parameters. The Configuration Parameters dialog opens.
  5. Set the ctkEnabled parameter to false for the corresponding SCSI disk.

How to Enable CBT

Note: Ensure that you power off the virtual machine before performing these steps.
  1. Right-click the virtual machine and click Edit Settings.
  2. Click the Options tab.
  3. Click General under the Advanced section and then click Configuration Parameters. The Configuration Parameters dialog opens.
  4. Click Add Row.
  5. Add thectkEnabled parameter and then set its value to true.
  6. Click Add Row, add scsi0:0.ctkEnabled, and 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.
  7. In the home directory of the virtual machine, verify that each hard disk contains a vmname-ctk.vmdk file.

 

Sources:

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2090639

http://www.reddit.com/r/vmware/comments/2keko3/major_bug_in_vmwares_cbt_function_causes_data/


Comments

2 responses to “VMware CBT may not be giving your backups accurate data.”

  1. Jannie Hanekom Avatar
    Jannie Hanekom

    I don’t know how to identify disks that have been extended, but the following PowerCLI one-liner should return a list of VMs that have CBT enabled and have disks larger than 128GB:

    Get-VM | ? {$($_.ExtensionData.Config.Extraconfig | ? {$_.Key -like “*ctkEnabled” -and $_.Value -eq “True”}) -ne $null -and $($_.HardDisks | ? {$_.CapacityGB -ge 128}) -ne $null}|ft Name, PowerState, @{n=”LargestDisk”;e={$($_.HardDisks | sort CapacityGB | select -last 1).CapacityGB}}, Notes

    1. Awesome, thank you Jannie !

Leave a Reply