Author: Jean Francois Landry
Virtual machine file system (VMFS), exclusive to VMware, functions as both a volume manager and a filesystem; it controls block devices associated with a host or hosts and resides on the same pool of storage resources that it manages. VMFS is used to store disc images and the files that make up a virtual machine or template. Unlike most other filesystems, VMFS is optimized for use with large files.
Multiple servers can write data to, and read data from, a VMFS volume. ESX and ESXi server use a file-locking mechanism, called SCSI reservation, to preserve the integrity of data contained on a volume. SCSI reservation occurs when a VMFS operation modifies the metadata of logical unit number (LUN), an individual, unique, block-based storage device. (The term “LUN” is often used interchangeably with “disk” or “drive.”) Examples of VMFS operations include creating a virtual machine or template, turning a VM on or creating or deleting a file. These reservations are dynamic, rather than static; once an operation is complete, the host will release the lock.
VMFS deposits files in a storage container called a datastore, a separate filesystem that runs on top of a volume. Datastores reside on a block-based device such as iSCSI. Virtual machine disks (VMDKs) are housed in the datastore.
VMFS-6, released with vSphere 6.5, offers a new feature that is automatic space reclamation. In VMFS-5, space reclamation had to be done manually via ESXCLI. It’s still possible to use the command line tool for space reclamation using VMFS-6.
To ensure the best performance, administrators should determine what kind of datastore is most suitable for a particular virtual machine. Datastores running on low-end disks or lacking redundancy, for example, should be associated with low-priority VMs. Continue reading to learn how to configure and manage your datastores in VMware vSphere.
Create a new datastore
VMFS volumes should be created in vSphere, rather than via the fdisk tool or from the ESXi installer. The start sectors on volumes formatted in the ESXi installer or via command line will not be aligned at 128K, negatively impacting disk performance as a result.
1. Connect to the ESXi host vSphere web interface. Click the “Storage” tab on the left pane.
2. Click “New datastore.”
3. Select “Create new VMFS datastore” as the storage type and then click “Next.”
4. Create a unique name for the datastore and then click “Next”.
5. There are two partitioning options available: “Use full disk” or “Custom.” You can also select the VMFS version you want to use. Select “Use full disk” and choose “VMFS 6” as the VMFS version and click “Next.”
6. Review your configuration and click “Finish” to complete the process.
7. Click “Yes” when receiving the warning that the entire contents of this disk will be erased.
Mount a datastore
Available datastores in VMware can be mounted to, or unmounted from, a server. To associate an existing datastore with a new server:
1. Select the “Mount” option from the datastore you are wanting to mount.
Unmount a datastore
1. Connect to the ESXi host and select the “Storage” tab on the left panel. Right-click the required datastore and select “Unmount.”
2. Confirm that you want to unmount the datastore by clicking “Yes.”
Increase the size of the datastore
Administrators can increase the size of a VMFS datastore using an extent, which represents a partition on a LUN. You can also grow an existing extent so long as it has available free space after it.
1. Log into the ESXi server and choose “Storage” from the left pane.
2. Select the appropriate datastore.
3. Click “Increase capacity.”
4. From here you can “Add an extent to existing VMFS datastore” or “Expand an existing VMFS datastore extent.” When ready, click “Next.”
5. Select the device and then click “Next.”
6. Claim the amount of free space you want to add to the datastore and then click “Next.”
7. Review the new configuration and click “Finish.”
And there you have it! From creating a new datastore, to mounting/unmounting a datastore, to increasing the size of the datastore. You should now feel confident in managing your own VMFS datastores in VMware.