blog header
Subscribe via: (Email / RSS)

VCDX Enterprise Admin Notes: VMFS Alignment

by Harley Stagner on November 17, 2009

I recently started preparing for the VCDX Enterprise Administration Exam on VI:3. To help myself and others I will be making notes on my blog to refer back to as I prepare for the test. The first note is for objective 1.1: Create and Administer VMFS datastores using advanced techniques. All of the objectives in the Enterprise Administration Exam Blueprint are split into Knowledge (K), Skills and Abilities (S), and Tools (T). So, my posts will refer to an objective using the following syntax:


Without further ado, here is my note.

1.1.K.3 – Explain the process used to align VMFS partitions

  • VMFS partitons are aligned by default if they are created with the VI Client.
  • Identify LUNs that are available to your ESX host using this command:
  • esxcfg-vmhbadevs
  • Note the Service Console Device Linux names of the LUNs you will be using for VMFS: e.g. /dev/sda
  • See if any existing partitions are aligned with this command:
  • fdisk -lu /dev/sd* Where * is your device letter (e.g. /dev/sda)
  • A properly aligned partition should start at 128.
  • To align a partition (/dev/sda for example) do the following sequence of steps:
  • fdisk /dev/sda
  • Determine if any VMFS partitions exist. They will have an id of “fb”.
  • Backup your data on the partition if you need it. If there are any VMFS partitions and you want to delete them, type “d.”
  • Type “n” to create a new partition
  • Type “p” to create a primary partition
  • Type “1″ to create partition number 1
  • Select the defaults to use the complete disk
  • Type “t” to set the partition’s system ID
  • Type “fb” for the VMFS system ID
  • Type “x” to go into expert mode
  • Type “b” to adjust the starting block number
  • Type “1″ to choose partition 1
  • Type “128″ to set it to 128
  • Type “w” to write the label and partition information to the disk

Now that you have an aligned partition you can create a VMFS volume on that partition using the following command:

vmkfstools -C vmfs3 -S YourLabel vmhba#:#:#:#

-C creates the vmfs3 volume and -S labels the volume. Replace YourLabel with your volume label and replace the vmhba#:#:#:# with your Adapter:Target:LUN:Partition.

For example vmhba1:0:2:1 .

Verify that ESX sees the new VMFS volume with the following command:

vdf -h

Leave a Comment