Knowledge Base

The VMware Knowledge Base provides support solutions, error messages and troubleshooting guides
 
Search the VMware Knowledge Base (KB)   View by Article ID
 

Increasing the block size of local VMFS storage in ESX 4.x during installation (1012683)

Purpose

This article provides instructions on how to specify a block size during the formatting process of VMware ESX 4.x. By default it formats them with a 1MB block size, allowing for storage of files 256GB and under. This default VMFS Datastore cannot be easily reformatted with a higher block size as it contains the Service Console VMDK file.

Notes for ESXi users:
  • ESXi 4.1 U1 and earlier: This article is not applicable as there is no Service Console or associated VMDK file. The default VMFS Datastore is blank, and can be deleted and reformatted post-install. It is not necessary to change the VMFS Datastore block size during the installation.
  • ESXi 4.1 U2: You can specify the VMFS block size during a kickstart installation. For more information, see the Resolved Issues: Upgrade and Installation section of the VMware ESXi 4.1 Update 2 Release Notes.

    Note: For kickstart installations the part option has a new parameter --blocksize Xm which allows you to specify the block size for the datastore. Valid values for Xm are 1m , 2m , 4m , or 8m.

Resolution

The ESX 4.x installer utilizes the default block size of 1MB when creating VMFS volumes. For additional information on the VMFS block size, see the Additional Information section, below.

The service console in ESX 4.x is stored in a VMDK file on a VMFS partition, typically located on local storage. While VMware ESX 4.x is running, you cannot reformat the volume with the intended block size. If you have already completed an installation of VMware ESX 4.x, are unable to reinstall the product with the intended block size using steps provided below, and you require a larger block size on the local VMFS partition, see Reformatting the local VMFS partition's block size in ESX 4.x (post-installation) (1013210).

New Installations: Formatting with a VMFS block size larger than 1MB

While the installer can be modified to format any new VMFS partitions with a specified block size, the following workarounds are also available:

  • Re-install the ESX host on a different drive (for example, a second RAID set or boot from SAN), and leave the original disk for the VMFS volume. You can then choose your blocksize when creating the second datastore at a later time.
  • Alternatively, install ESX 3.5, create the volume with desired blocksize or re-format the volume with the intended block size, then upgrade to ESX 4.x. Specify to use the existing VMFS volume to store your Console OS VMDK.
  • Create a second RAID set, forming a discrete device or volume which can be utilized with the intended block size, post-installation.
  • Carve out a new LUN, volume, on the local controller for a new volume. This, too can be utilized with the intended block size post-installation, but additional proecdures are required:

    Note: You cannot create a second datastore (via another partition) on the same drive via the ESX GUI. You must use the vmkfstools command. You may also need to create a partition on the free space first with the fdisk command:

    vmkfstools -C vmfs -b Xm -S local2mBS /vmfs/devices/disks/naa.xxxxxxxxxx:y

    where:

    • Xm is the blocksize (1m, 2m, 4m, or 8m).
    • local2mBS is your volume name. If the volume name has a space (for example, volume name ), enclose it in quotation marks (for example, " volume name").
    • naa is the naa identifier, and y is the partition number. To determine this, run ls -la in the /vmfs/devices/disks folder.
    • You can also specify the file system version in the command to execute correctly:

      vmkfstools -C vmfs3 -b Xm -S local2mBS /vmfs/devices/disks/naa.xxxxxxxxxx:y

    Note: Depending on your disk controller type, naa. may be replaced with eui., t10., or mpx.. For more information, see Identifying disks when working with VMware ESX (1014953).

Reconfiguring the ESX 4.x installer and formatting new VMFS volumes with a specific block size

To reconfigure the installer to format VMFS partitions with a specified block size:

  1. Boot the ESX installation DVD and choose Install in graphical mode.
  2. Press Ctrl+Alt+F2 to switch to the shell.
  3. Run this command:

    ps | grep Xorg

  4. Kill the PID which shows Xorg -br -logfile ....

    Example: If this PID is 590, enter this command:

    kill 590

    Notes:
    • If you specified a GUI mode installation, killing the process identified as Xorg may switch you back to another console. If this occurs, press Ctrl+Alt+F2 to return to the previous console.
    • If after killing the Xorg process you see the message Press <return> to reboot, press Ctrl+Alt+F3 to go to another console and continue working there without rebooting.

  5. Switch to the configuration directory. Enter this command:

    cd /usr/lib/vmware/weasel

  6. Edit the configuration script. Enter this command:

    vi fsset.py

    Note: For more information on editing files, see Editing configuration files in VMware ESXi and ESX (1017022).

  7. Locate class vmfs3FileSystem(FileSystemType).
  8. Edit the blockSizeMB parameter to the block size that you want. It is currently be set to 1. The only values that work correctly are 1, 2, 4, and 8.

    Note: Press i for insert mode.

  9. Save and close the file, press Esc, type :wq! and press Enter. The exclamation mark is needed to force the action of saving as the file is read-only.
  10. Verify that the content has been changed. Enter this command:

    grep -i blockSizeMB fsset.py

  11. Switch back to the root directory. Enter this command:

    cd /

  12. Launch the installer with the new configuration. Enter this command:

    /bin/weasel

Additional Information

The largest file that can be created with a 1MB block size is 256GB in size. For more information about the maximum file size, see the Configuration Maximums for your version of ESX.

To create a file bigger than 256GB, the VMFS filesystem needs to have a block size larger than 1MB. These are the maximums:

Block Size
Maximum File Size
1 MB
256 GB
2 MB
512 GB
4 MB
1 TB
8 MB
2 TB

For more information about block sizes, see Block size limitations of a VMFS datastore (1003565).

Tags

increase-vmfs-block-size-installation

See Also

Update History

05/11/2012 - Added information on changing blocksize when using kickstart on ESXi 4.1u2 and later.

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 62 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.
What can we do to improve this information? (4000 or fewer characters)
  • 62 Ratings
Actions
KB: