Friday, November 11, 2011

Block size limitations of a VMFS datastore

Here you can find a VMware's Knowledge Base article related to VMFS datastores:
VMFS Block Sizes
The block size on a VMFS datastore defines two things:

  • The maximum file size
  • The amount of space a file occupies
To determine the block size used by a datastore:
  • In the VI/vSphere Client:
    1. Select an ESX host that contains the datastore.
    2. Click the Configuration tab.
    3. Click Storage.
    4. Select the datastore.
    5. The block size is identified in the Details window under the Formatting subheading.
  • In the ESX console:
    1. Log in to the ESX console.
    2. Run the command:
      vmkfstools -P <path to datastore>
      The bolded section of this line is the block size:
      Capacity 429228294144 (409344 file blocks * 1048576), 8896118784 (8484 blocks) available
      This table reports the various block sizes that can be found in this output: Block Size Value
      Actual Block Size
      1048576
      1MB
      2097152
      2MB
      4194304
      4MB
      8388608
      8MB
      Note: vSphere 5.0 and later releases have a block size of 1MB only.




VMFS Size Limitations
There is no noticeable I/O performance difference when using a larger block size. The block size should be chosen based on the size of the largest file and virtual disk that must be stored. Choose the VMFS block size carefully when creating VMFS datastores, because there is no way to change the block size of a VMFS datastore once it is created. The datastore must be reformatted with the required block size.
Block Size
Largest virtual disk on VMFS-2
Largest virtual disk on VMFS-3
Largest virtual disk on VMFS-5
1MB
456GB
256GB
2TB minus 512B
2MB
912GB
512GB
Invalid block size
4MB
1.78TB
1TB
Invalid block size
8MB
2TB
2TB minus 512B
Invalid block size
16MB
2TB
Invalid block size
Invalid block size
32MB
2TB
Invalid block size
Invalid block size
64MB
2TB
Invalid block size
Invalid block size
Note: VMFS-5 has a maximum virtual disk size of 2TB minus 512B. However, passthrough RDMs are supported up to ~60TB.
VMFS-3 uses sub-blocks for directories and small files with a size smaller than 1MB. When the VMFS uses all of the sub-blocks (4096 sub-blocks of 64KB each), file blocks are used. For files of 1 MB or higher, file blocks are used. The size of the file block depends on the block size you selected when the Datastore was created.
In vSphere 4.1, if snapshots are intended to be used, there are further size limitations on the virtual disk size. For more information, see Creating a snapshot for a virtual machine fails with the error: File is larger than maximum file size supported (1012384).
In VMFS-5, very small files, i.e. files smaller than 1K, will be stored in the file descriptor location in the metadata rather than using file blocks. Once the files increase beyond 1K, file sub blocks are used. As VMFS-5 uses sub blocks of 8K rather than 64K (as in VMFS-3), this reduces the amount of disk space being used by small files. For more information on VMFS-5, see vSphere 5 FAQ: VMFS-5 (2003813).
To create a resized datastore:
Note: All data on a VMFS volume is lost when the data store is recreated. Back up all data before proceeding.
  • In the VI / vSphere Client connected to VirtualCenter/vCenter Server:
    1. Storage vMotion or delete all the virtual machines located on the datastore you would like to remove.
    2. Select the ESX/ESXi host in the inventory and click the Configuration tab.
    3. Select the Storage under hardware, right-click the datastore and choose Delete.
    4. Rescan for VMFS volumes from the other hosts that can see the datastore.
    5. Create the new datastore on one of the hosts using Add Storage Wizard with the desired block size.
    6. 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 vmkfstools -V command. For syntax on creating the VMFS volume, see the appropriate document listed below.
Note: If extending a vmdk over 1TB (1023GB) on an ESX 3.5 host using the GUI fails, see Cannot extend a vmdk over 1TB (1008528) for more information.
Additional Information
To create a VMFS datastore larger than 2TB, you need to extend the VMFS datastore over another LUN.










































No comments:

Post a Comment