Disable Delayed Ack for iSCSI on ESXi, not always working

Some iSCSI storage system, requires that "Delayed Ack" is disabled on the ESXi hosts, like DELL Equaligic, HPE StoreVirtual and HPE StoreServ.

If this is not done in the correct order this will not work completely as expected.

The KB from VMware says, just to disable it, and reboot, and this will work if you wan not already been running against a iSCSI target already. in that case some of the connections will continue til use Delayed Ack.

https://kb.vmware.com/kb/1002598

To check for this you can use this command on the ESXi host.

vmkiscsid –dump-db | grep Delayed

What you are looking for is ’node.conn[0].iscsi.DelayedAck’=’0’ This men that "Delayed Ack", '0' means that "Delayed Ack" is disabled.

Solution:

the solution is:

  • Put the host in "maintenance mode"
  • Remove all iSCSI target from the host in dynamic discover and static target, close the window
  • Rescan storage
  • Readd all dynamic discover target
  • Rescan storage

You may need to configurer Round Robin or other path setting after this.

Result:

Here is some screenshots from a test my Colleague did, he added 1 iSCSI target, from a HPE StoreVirtual.

After adding iSCSI taget, and reboot.

After disable "Delayed Ack" and before reboot.

After a reboot, there are still connections with "Delayed Ack" enabled.

After removing the dynamic discover and static target, rescan, readd the iSCSI taget again, it is fixed.

Thanks to my colleague Christian Grønbæk Møller, for doing the this test and solution.

Update:

I have made a PowerCLI script that removes all static and dynamic target from a host, rescans all HBAs and adds the dynamic target again. 

#Enter maintenance mode
Get-VMHost | Set-VMHost -State Maintenance

#Get iSCSI targets
$iSCSI_targets = Get-IScsiHbaTarget

# Remove All static
foreach ($iSCSI_target in $iSCSI_targets) {
  if ($iSCSI_target.type -eq "Static") {Remove-IScsiHbaTarget $iSCSI_target -confirm:$false}
}

# Remove All dynamic
foreach ($iSCSI_target in $iSCSI_targets) {
  if ($iSCSI_target.type -eq "Send") {Remove-IScsiHbaTarget $iSCSI_target -confirm:$false}
}

#Rescan HBA
Get-VMHostStorage -RescanAllHba

$hba = Get-VMHost | Get-VMHostHba -Type iScsi | where-object {$_.model -eq "iSCSI Software Adapter"}

#Add dynamic target
foreach ($iSCSI_target in $iSCSI_targets) {
  if ($iSCSI_target.type -eq "Send") {new-IScsiHbaTarget -IScsiHba $hba -Address $iSCSI_target.address}
}

#Rescan HBA
Get-VMHostStorage -RescanAllHba

Get-VMHost | Set-VMHost -State Connected

This script does not reboot or add static target.

If you are using dynamic targets, the static targets will reappear automatically. 

Use the script at your risk, so test it before usage.

Notes:

Host profiles can not be used to fix this.

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *