When trying to expand a datastore from ESXi UI you might get this error:
Failed to expand VMFS datastore #### - Failed to update disk partitions for /vmfs/devices/disks/naa.##############
7.x
8.x
It is possible that the new size of the Lun is not seen by all the host that has access to this datastore. In order to fix this issue, rescan the whole cluster.
Performing a rescan of the storage on an ESXi host