





















































In this article by Abhilash G B, author of VMware vSphere 5.5 Cookbook, we will learn how to expand or grow a VMFS datastore with the help of two methods: using the Increase Datastore Capacity wizard and using the ESXi CLI tool vmkfstools.
(For more resources related to this topic, see here.)
It is likely that you would run out of free space on a VMFS volume over time as you end up deploying more and more VMs on it, especially in a growing environment. Fortunately, accommodating additional free space on a VMFS volume is possible. However, this requires that the LUN either has free space left on it or it has been expanded/resized in the storage array.
The procedure to resize/expand the LUN in the storage array differs from vendor to vendor, we assume that the LUN either has free space on it or has already been expanded.
The following flowchart provides a high-level overview of the procedure:
We can expand a VMFS datastore using two methods:
Before attempting to grow the VMFS datastore, issue a rescan on the HBAs to ensure that the ESXi sees the increased size of the LUN.
Also, make note of the NAA ID, LUN number, and the size of the LUN backing the VMFS datastore that you are trying to expand/grow.
We will go through the following process to expand an existing VMFS datastore using the vSphere Web Client's GUI.
A VMFS volume can also be expanded using the vmkfstools tool. As with the use of any command-line tool, it can sometimes become difficult to remember the process if you are not doing it often enough to know it like the back of your hand.
Hence, I have devised the following flowchart to provide an overview of the command-line steps that needs to be taken to expand a VMFS volume:
Now that we know what the order of the steps would be from the flowchart, let's delve right into the procedure:
esxcli storage vmfs extent list
Here, the NAA ID corresponding to the DS01 datastore is naa.6000eb30adde4c1b0000000000000083.
esxcli storage core device list -d naa.6000eb30adde4c1b0000000000000083
partedUtil getptbl "Devfs Path of the device"
Command:
partedUtil getptbl /vmfs/devices/disks/ naa.6000eb30adde4c1b0000000000000083
partedUtil resize "Devfs Path" PartitionNumber NewStartingSector NewEndingSector
Command:
partedUtil resize /vmfs/devices/disks/ naa.6000eb30adde4c1b0000000000000083 1 2048 31455232
vmkfstools –-growfs <Devfs Path: Partition Number> <Same Devfs Path: Partition Number>
Command:
vmkfstools --growfs /vmfs/devices/disks/ naa.6000eb30adde4c1b0000000000000083:1 /vmfs/devices/disks/ naa.6000eb30adde4c1b0000000000000083:1
Once the command is executed successfully, it will take you back to the root prompt. There is no on-screen output for this command.
Expanding a VMFS datastore refers to the act of increasing its size within its own extent. This is possible only if there is free space available immediately after the extent. The maximum size of a LUN is 64 TB, so the maximum size of a VMFS volume is also 64 TB.
The virtual machines hosted on this VMFS datastore can continue to be in the power-on state while this task is being accomplished.
This article walks you through the process of creating and managing VMFS datastores.