How to change the blocksize of a VMFS filesystem
July 12th, 2007 Posted in Technology, VMWareBy default, VMWare ESX server uses a 1M block size which limits you to having a maximum of 256GB in any single virtual machine. By changing the block size of your vmfs partition, you can increase the maximum amount of disk you can have. A 2M block size yields a maximum disk size of 512 GB, 4M yields 1TB, and 8M yields 2TB. There is no support for anything larger under vmfs3. Vmfs2 had a maximum block size of 16M, but that has been removed in the vmfs3 specification.
To change the block size of a vmfs filesystem, you need to use vmkfstools to reformat the partition. The command is:vmkfstools --createfs vmfs3 --blocksize 8M vmhba0:0:0:3 It is important to note that like any other formatting procedure, this will destroy any data on the partition, so make sure you move your data before you do this. The “vmhba0:0:0:3″ is where you specify which partition to reformat. According to the VMWare server configuration guide, the format is:
vmhbaA:T:L:P format, where A, T, L, and P are integers representing adapter, target, LUN, and partition number respectively. The partition digit must be greater than zero and should correspond to a valid VMFS partition of type fb
For example, vmhba0:2:3:1 refers to the first partition on LUN 3, target 2, HBA 0.
If you’re reformatting a current vmfs filesystem just to increase the blocksize, you can get that information from the storage section in the configuration tab of the Virtual Infrastructure Client.
9 Responses to “How to change the blocksize of a VMFS filesystem”
By MikeG on Jan 15, 2009
Just what I needed, great guide. SHORT AND SWEET!
By Mahesh on Mar 26, 2010
wow..I was scratching my head to do this

this is the easiest way
thanks !!
By Brandon Hamilton on May 4, 2010
how long should it take per GB?
By lionel on May 12, 2010
How i know which is my adapter, target, LUN, and partition numbers??
By Pricher on Jun 1, 2010
You also can connect to the ESX host by Infrastructure Client with root account. Then remove partition and add it. Wizard will ask you for partition size and block size.
By nate on Aug 20, 2011
Thanks man, this was driving me nuts
By Philippe on Sep 28, 2011
If, as I was, you are using ESXi, you can empty your local datastore, and then simply delete it and recreate a new one through GUI.
It worked well for me, the server I was working was ESXi 4.0 update 2