Hi,
I've installed an ESX. The system automatically partition to have the block size of 1 MB which is 256 max virtual hardisk.
How can I change to 4 MB Block Size taking into consideration there are some machine that is running which can be schedule to shouwn down
The only way to change block size is to destroy VMFS datastore and create new with desired block size.
---
VMware vExpert '2009
Do you have another host/datastore that you can move the virtual machines to? You could use Storage VMotion to move them off of the local storage on that host to a different datastore, and then delete and recreate the datastore with the correct block size. The other option might be to use VMware Converter to export the VMs to a local disk, then recreate the datastore and move them back.
I had this happen when I ordered a server with ESXi embedded and it's definitely annoying to discover it after the fact...
I'd like to prefix this post by stating up front that I am a relative newbie to ESX and Linux in general...so bear with me...
I'm running into a similar problem. I'm in the process of evaluating the HP Lefthand Virtual SAN Appliance (VSA) using local storage on the ESX 4.0 host. My local storage is over 500GB per host and in order take advantage of this space, I need to set the blocksize to 2M for the VSA to create a virtual SAN larger than 256G.
The installation process for ESX 4.0 does not allow the user to select the block size of the partition and as far as I can tell, this can't be scripted using a kickstart script either. I went through the GUI setup for host and pulled the KS.CFG script it created to use as a baseline. After reviewing the script, it seems to me that ESX 4.0 creates its required partitions on the VMFS datastore. Since there is no way (at least I can't find a way) to configure the datastore with a non-default block size I am left with a datastore that hosts the partitions for ESX which means I can't delete the datastore or use vmkfstools to change the block size.
So...I decided to modify the script to create a logical partition of 40GB so I could create a second logical partition of the remainder and use vmkfstools to format with a 2M blocksize. This seems to work as I now see a 500+ GB local disk with the following partitions
Primary Partitions:
1. Linux Native 1.07 GB
2. VMWare Diagnostic 109.82 MB
3. Extended 39.07 GB
Logical Partitions:
1. VMFS 39.07 GB
So...all I want to do now is create a 2nd logical partition with the remainder of the disk space and I can't seem to do it. I've tried fdisk and vmkfstools. I'm assuming it may be a syntax issue but at this point, I'm not even sure if my reasoning is sound.
I'm pasting the pertinent sections of the ks.cfg file below...
part '/boot' --fstype=ext3 --size=1100 --ondisk=mpx.vmhba0:C0:T0:L0
Uncomment to use first detected disk:
#part '/boot' --fstype=ext3 --size=1100 --onfirstdisk
part 'none' --fstype=vmkcore --size=110 --ondisk=mpx.vmhba0:C0:T0:L0
Uncomment to use first detected disk:
#part 'none' --fstype=vmkcore --size=110 --onfirstdisk
part 'servername:storage1' --fstype=vmfs3 --size=40000 --maxsize=40000 --ondisk=mpx.vmhba0:C0:T0:L0
Uncomment to use first detected disk:
#part 'servername:storage1' --fstype=vmfs3 --size=17607 --grow --onfirstdisk
virtualdisk 'esxconsole' --size=16607 --onvmfs='servername:storage1'
part 'swap' --fstype=swap --size=1600 --maxsize=1600 --onvirtualdisk='esxconsole'
part '/var' --fstype=ext3 --size=4000 --maxsize=4000 --onvirtualdisk='esxconsole'
part '/home' --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'
part '/opt' --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'
part '/tmp' --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'
part '/' --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole'
Any help would be greatly appreciated.
Thanks
Ray
Hi there,
i'm encountering the same same issue.
I managed to create two vmfs storages (with two "part" lines) in the ks, installing the console on the first one. When i reboot i have both, but if i delete the second one to recreate it with a 4M block size i'm not able to do anything.
What happens is the console OS sees the partition where the Console Storage sits as one, so with the vmkfstool i cannot create any storage (it needs a dedicated path), considering there's one already on it!! Infact i get the "Resource busy" message.
Ho can the ks installer create two storages on the same partition is puzzling...
Is there a way to create bigger block size storages in the interactive CD-ROM installation or in the scripted kickstart one??
Attached are the part lines in the ks file...
part '/boot' --fstype=ext3 --size=1100 --onfirstdisk
part 'none' --fstype=vmkcore --size=110 --onfirstdisk
part 'ConsoleStorage' --fstype=vmfs3 --size=9000 --onfirstdisk
part 'Storage1' --fstype=vmfs3 --size=8920 --grow --onfirstdisk
virtualdisk 'esxconsole' --size=7920 --onvmfs='ConsoleStorage'
part 'swap' --fstype=swap --size=916 --onvirtualdisk='esxconsole'
part '/var/log' --fstype=ext3 --size=2000 --onvirtualdisk='esxconsole'
part '/' --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole'
I have found a workaround for the problem and would like to thank "agblugano" for pointing me in the right direction. Here is what I did...
I created the 2nd partition with the kickstart script and used vmkfstools to change the blocksize after ESX was installed. Here is a sample of the scripts.
ks.cfg poriton dealing with the partitions...
part '/boot' --fstype=ext3 --size=1100 --ondisk=mpx.vmhba0:C0:T0:L0
part 'none' --fstype=vmkcore --size=110 --ondisk=mpx.vmhba0:C0:T0:L0
part 'servername:storage1' --fstype=vmfs3 --size=40000 --maxsize=40000 --ondisk=mpx.vmhba0:C0:T0:L0
part 'servername:storage2' --fstype=vmfs3 --size=500000 --grow --ondisk=mpx.vmhba0:C0:T0:L0
virtualdisk 'esxconsole' --size=16607 --onvmfs='ld052esx01:storage1'
part 'swap' --fstype=swap --size=1600 --maxsize=1600 --onvirtualdisk='esxconsole'
part '/var' --fstype=ext3 --size=4000 --maxsize=4000 --onvirtualdisk='esxconsole'
part '/home' --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'
part '/opt' --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'
part '/tmp' --fstype=ext3 --size=2000 --maxsize=2000 --onvirtualdisk='esxconsole'
part '/' --fstype=ext3 --size=5000 --grow --onvirtualdisk='esxconsole'
vmkfstools script to "reformat" the partition with a 2M blocksize (The target mpx.vmhba... may be different from server to server so you'll have to find where your partition resides). Use the man page for an explanation of the vmkfstools switches.
vmkfstools -C vmfs3 -b 2M -S servername:storage2 mpx.vmhba0:C0:T0:L0:6
Hi,
short after the post i've reinstalled with the same script. What i found out is that the installation indeed creates two vmfs3 partitions, so you can just format the second (empty) one with the desired blocksize.
What happened in my first attempt is that when i delted the second datastore in the vSphere clien, the two vmfs3 partiton have been merged, so all i could do was extending the first storage.
Your solution is the right one, you just have to know the partition path in the first place, something that doesn't apply to a general case....
Btw, is there a way to specify in the ks file to use a partition withoutclearing it out? I'm aligning the partitions with the stripe size and couldn't figure out a way to tell ks to use already created partition instead of clear all and part itself: am i missing something?
Thanks
Alberto
Only way to increase the blocksize is by recreating. For local storage I personally recommend to create two partitions for VMFS so you can manually format it with the correct block size.
Duncan
VMware Communities User Moderator | VCP | VCDX
-
If you find this information useful, please award points for "correct" or "helpful".