More fun with ESX – VMFS at the command line

So, I’ve had an issue creating VMFS partitions from the GUI on the ESX 3.02 servers that I have built.   Given that I didn’t have it create partitions at installation because I wanted a bigger block size (its an 800GB local disk, so I want one VM to be able to use at least a majority of it, and the default 1MB block size means a .vmdk file is limited to 256GB, too small) so I elected  to wait until after the ESX installation. Doing this greeted me with a great “There was an unexpected error updating the partition table.”  Great, thanks for that descriptive error. So, to the command line we go:

  1. fdisk -l (check what the last partition is)
  2. fdisk /dev/sda
  3. n (new)
  4. default (start block)
  5. default (end block)
  6. t (partition type)
  7. 10 (partition 10, just created)
  8. fb (vmfs type)
  9. w (write config)
  10. reboot (Reboot the host before you format the newly created local partition)
  11. vmkfstools -C vmfs3 /vmfs/devices/disks/vmhba0:0:0:10
  12. Go to VI Client, Refresh storage view and rename the newly created volume
  13. W
  14. You can align the VMFS volume as follows, before you do step 9:
  15. X
  16. b
  17. 1
  18. 128 (disk alignment, check your SAN manual for the correct value, 128 is correct in most cases…)

Now I need to figure out how to set blocksize while running that command and I will be set.

#vmkfstools –C vmfs3 –b 2M vmhba1:0:0:2

Found it.

–Nat

Leave a Reply

Your email address will not be published. Required fields are marked *