Thursday, January 28, 2010

VMWare - Resize VMFS block size

You are experiencing these issues:

Creating a virtual disk larger than a certain size fails with these errors:
  • In the ESX host command line:

    Failed to create virtual disk: There is not enough space on the file system for the selected operation.
  • In the Virtual Infrastructure (VI) Client for ESX 3.0 with VirtualCenter 2.0:
  • In the VI Client for ESX 3.5 with Virtual Center 2.5 and in vSphere 4.0 with vCenter:

VMFS Size Limitations

There is no way to change the block size of a VMFS datastore once it is created. The data store must be reformatted with the required block size.
Block Size
Largest virtual disk on VMFS-2
Largest virtual disk on VMFS-3
1MB
456GB
256GB
2MB
912GB
512GB
4MB
1.78TB
1TB
8MB
3.56TB
2TB
16MB
7.18TB
Invalid block size
32MB
14.25TB
Invalid block size
64MB
28.50TB
Invalid block size
With a block size of 1MB, every file that is created uses at least 1MB of space on the storage, regardless of its actual size. With an 8MB block size, a 1KB file still occupies 8MB of space. The unused space in that block is wasted. The larger block size is only required when a file is so large that it requires an extended addressing space. Being aware of the intended use helps with your planning and efficient use of space on the data store.
To create a resized datastore:

Note: All data on a VMFS volume is lost when the data store is recreated. Backup all data before proceeding.
  • In the VI Client / vSphere connected to VirtualCenter / vCenter:

    1. Remove the datastore from one of the ESX hosts.
    2. Rescan for VMFS volumes from the other hosts that can see the datastore.
    3. Create the new datastore on one of the hosts.
    4. Rescan for VMFS volumes from all other hosts that can see the datastore.

  • From the ESX console:

    1. Use vmkfstools to create a new volume over the existing one.
    2. Rescan from all other ESX hosts with the command vmkfstools -V . For syntax on creating the VMFS volume, please consult the appropriate document listed below.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1003565

No comments: