Change Block Tracking (CBT), is a VMkernel feature that keeps track of the stoirage blocks of a virtual machines they change over time. The VMkernel keeps track of block .changes on virtual machines, witch enhaces the backup process for applications that h ave been developed to take advantage of VMware's vStorage APIs
If CTB is not enabled in a worker node and enabled on First Class Disks (FCDs), you can have errors on attaching PVC: PVCs cannot be mounted - The operation is not allowed in the current state.
CBT is enabled on the PVCs/FCDs but was not enabled on the newly deployed worker virtual machines. Those VMs where having problems attaching PVCs: PVCs cannot be mounted - The operation is not allowed in the current state
This is an expected behavior when the CBT flags on the FCD and the VM are different.
To resolve this issue you need to enable CBT on the worker VM.
/usr/lib/vmware-wcp/decryptK8Pwd.py
kubectl config get-contexts
kubectl edit virtualmachine <VM-Name> -n <Your-vSphere-Namespace (e.g.: shared-services>)
advancedOptions:
changeBlockTracking: true
Then check if CBT is enabled, run this command:
kubectl get vm <vmname> -n <namespace> -o jsonpath='{.status.changeBlockTracking}'
Impact/Risks:
Please consult with your backup vendor for any possible impacts if you decide to disable Changed Block Tracking on the Virtual Machines as part of the resolution below..