How to increase local datastore from the command line (using SSH) for ESXi 6.7.0

While I was working on ESXi 6.7.0, I ended up with an issue which I couldn’t resolve easily with the web interface of ESXi 6.7.0 or from vSphere Client. I had an extra HDD space which I would like to merge in my ESXi system to host more VMs.

VMFS Datastores in vSphere ESXi can be increased in size by adding a new extent on a different storage device (spanning), or by increasing the size of the existing storage device and then growing the existing datastore extent to fill that available adjacent capacity. It is very easy to do from VMware ESXi web interface but I started getting an error even though I had enough size to increase.

failed to expand vmfs datastore – cannot change the host configuration.

I searched on lots of blogs and few of them were very helpful. Therefore, I thought to share it here by combining all of them and the proper steps that I have used so it will be helpful for other IT Engineer in the future.

Before continuing these steps, I would like to warn not to overlap any Primary and Logical partitions. This could result in data loss.

Continue reading “How to increase local datastore from the command line (using SSH) for ESXi 6.7.0”