VMFS Block Sizes
The block size on a VMFS datastore defines two things:- The maximum file size
- The amount of space a file occupies
- In the VI/vSphere Client:
- Select an ESX host that contains the datastore.
- Click the Configuration tab.
- Click Storage.
- Select the datastore.
- The block size is identified in the
Details
window under theFormatting
subheading.
- In the ESX console:
- Log in to the ESX console.
- 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:
- Storage vMotion or delete all the virtual machines located on the datastore you would like to remove.
- Select the ESX/ESXi host in the inventory and click the Configuration tab.
- Select the Storage under hardware, right-click the datastore and choose Delete.
- Rescan for VMFS volumes from the other hosts that can see the datastore.
- Create the new datastore on one of the hosts using Add Storage Wizard with the desired block size.
- Rescan for VMFS volumes from all other hosts that can see the datastore.
- From the ESX console:
- Use
vmkfstools
to create a new volume over the existing one. - Rescan from all other ESX hosts with the
vmkfstools -V
command. For syntax on creating the VMFS volume, see the appropriate document listed below.
- Use
Additional Information
To create a VMFS datastore larger than 2TB, you need to extend the VMFS datastore over another LUN.- For information on increasing the capacity of the datastore in ESX 3.x, see Adding Extents to Datastores in the ESX Server 3 Configuration Guide.
- For information on increasing the capacity of the datastore in ESX 4.x, see Increase VMFS Datastores in the ESX 4.x Configuration Guide.
- For vSphere 5.0 storage configuation maximums pertaining to 2TB LUN support, see Configuration Maximums for VMware vSphere 5.0.
No comments:
Post a Comment