Step By Step Guide to increase datastore size in VMware vSphere

Spread The Knowledge

Today I’ll explain all the possible ways to increase datastore size connected to VMware ESXi hosts. Once the additional storage space is added from Storage support, It can be extended further from the vSphere console. There are many ways to expand the datastore in VMware. Let’s have a look one by one.

How to increase datastore size in VMware vSphere?

You need to login to vSphere web client and follow the below steps:

  1. Click on Home -> Hosts and Clusters
  2. Navigate to any host (from the cluster) -> Configure tab
  3. Under Storage, Click on Storage devices where you can see many already presented storage devices with a unique device ID known as LUN or NAA ID.
  4. Before going to increase the datastore, you need to Rescan/Refresh the storage.
Rescan/Refresh the storage
Rescan/Refresh the storage

5. Once the rescan done, Go to the Datastore tab and select the datastore you want to expand, Right-click on it to get the option of Increase Datastore capacity:

Increase Datastore Capacity
Increase Datastore Capacity

6. Click On ‘Increase Datastore Capacity‘ to see the available space that can be added further to the datastore.

7. Next select the devices you want from the list and Make sure Expandable option is set to Yes automatically.

Select Device

8. On next page, you will be given the available space.

8. You need to click on dropdown at Partition Configuration and select Use all available partitions option to get all available space otherwise you can Increase it by selecting the number of GB below the dropdown menu.

9. Click Next.

10. Review the setup and finish it.

How to increase VMware datastore capacity using esxcli?

You can also increase the datastore capacity using esxcli command-line tool. One of the most used tools is vmkfstools and partedUtil. Just follow the below steps:

  1. Get the unique device identifier or NAA ID or mpx information
vmkfstools -P /vmfs/volumes/your_datastore_name

The output will be similiar:

VMFS-5.0 file system spanning 1 partitions.
File system label (if any): your_datastore_name
Mode: public
Capacity 145223581696 (138496 file blocks * 1048576), 43937431552 (41902 blocks) avail
UUID: 4a14d968-62bf7161-700f-00145df49f90
Partitions spanned (on "lvm"):

Note down the current capacity and space on the Datastore.

2. Now use partedUtil tool to identify the existing partitions on the device using the command. You need the identifier information for this. And run the following commands:

partedUtil get "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0"

3. Now you can get usable sectors and resize parition with the help of partedutil command:

partedUtil getUsableSectors "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0"
partedUtil resize "/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0" PartitionNumber NewStartingSector NewEndingSector

e.g. partedUtil resize “/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0” 2 247073 286515199

4. Now grow the VMFS datastore into the new space using the vmkfstools --growfs command, specifying the partition containing the target VMFS Datastore twice.

vmkfstools --growfs "/vmfs/devices/disks/device:partition" "/vmfs/devices/disks/device:partition"

e.g vmkfstools –growfs “/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0:2” “/vmfs/devices/disks/mpx.vmhba0:C0:T0:L0:2″

5. Use below command to validate newwly added storage space:

vmkfstools -V

Try the above esxcli command line utility to check and expand the datastore.

There are many scenario where you would not be able to expand the datastore so let have a look on those.

Unable to grow or expand a VMFS volume or datastore – Solution

When you try to grow or expand a VMFS volume by clicking the Increase Datastore Capacity option, there are no available devices to select even after the storage team has already increased the capacity from their ends. The expandable option does not have Expandable = Yes in the column.

In this case first Rescan Storage from the host/cluster level. Then login to VMware ESXi webclient console with root credentials. And proceed further as below steps:

  1. Navigate to the Storage tab
  2. Right-click and select ‘Increase Datastore Capacity’
  3. Select creation type and make sure to select only the ‘Expand an existing VMFS datastore extent’ option
Select Creation Type
Select Creation Type

4. Next, Select the device you want to expand.

Select Device
Select Device

5. On next page, Select the partitioning options and take the full available free space. It gives you an option to compare capacity pre and post status.

Select Partitioning
Select Partitioning

6. Review the setup and Finish it.


By following any of the above method you will be able to increase the datastore capacity as per your requirement.

You’ll Also Like,

Spread The Knowledge

Leave a Comment