|
楼主 |
发表于 2011-7-8 16:13:06
|
显示全部楼层
Increasing the block size of local VMFS storage in ESX 4.x during installationPurpose 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.
This article is not applicable to ESXi, 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.
ResolutionThe 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 fdisk:
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.
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:
- Boot the ESX installation DVD and choose
Install in graphical mode. - Press
Ctrl+Alt+F2
to switch to the shell. - Run:
ps | grep Xorg
- Kill the PID which shows Xorg -br -logfile ....
For example, run:
kill 590
Where 590
is the PID, per above.
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 get the message "Press <return> to reboot", pressCtrl+Alt+F3
to go to another console and continue working there without rebooting.
- To switch to the configuration directory, run:
cd /usr/lib/vmware/weasel
- To edit the configuration script, run:
vi fsset.py
Note: For more information on editing files, see Editing configuration files in VMware ESX (1017022).
- Locate
class vmfs3FileSystem(FileSystemType).
- 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.
- To 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.
- Verify that the content has been changed running:
grep -i blockSizeMB fsset.py
- To switch back to the root directory, run:
cd /
- To launch the installer with the new configuration, run:
/bin/weasel
Additional InformationThe 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. The maximums are as follows:
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 Verifying the block size of a VMFS datastore (1003565).
|
|