As with any VMDK manipulation, a working backup MUST be confirmed before any work is started.
To extend a clustered VMDK, follow the steps below:
- Obtain the path to the clustered VMDK to be extended (for example,
/vmfs/volumes/shareddatastore/VM-NAME/VM-NAME.vmdk)
- Shut down all VMs, having access to the clustered VMDK to be extended.
- Login to an ESXi host (SSH) with access to the datastore where the clustered VMDK is stored.
- Expand a clustered VMDK with the following command:
vmkfstools -X|--extendvirtualdisk newSize[bBsSkKmMgGtT]
Specify the newSize parameter adding an appropriate Unit Suffix.
Unit Suffix:
It is not case-sensitive. vmkfstools interprets either k or K to mean kilobytes.
If you do not specify the unit suffix, vmkfstools defaults to kilobytes.
newSize:
The newSize parameter defines the entire new size, not just the increment you add to the disk.
Example below extends the existing vmdk to new total size of 2048 GB :
vmkfstools --extendvirtualdisk 2048G /vmfs/volumes/shareddatastore/VM-NAME/VM-NAME.vmdk -d eagerzeroedthick
Note: As zeros are being written this will take a while.
- Refresh the configuration file of VMs with the access to the extended clustered disks. See "Additional Information" below.
- Verify that the new disk size is correctly reflected on all VMs using "Edit Settings" section in the UI. If there are any discrepancies, remove the VMDK from that VM and readd it (“Add an existing disk”), making sure to use the same SCSI controller and ID.
- Boot the first VM and grow the Guest filesystem. Use the Guest OS respective guidelines
- Boot remaining VMs and confirm the functionality of the cluster.