Resolution
To
create a new VMFS volume from the ESX/ESXi host command line:
Rescan the storage subsystem to ensure that the
host is updated with the latest storage information. Open a console to the ESX or ESXi host.
- Select a LUN or storage device you wish to format
by its /vmfs/disks/devices/...
identifier, starting with vml, naa, mpx, or vmhba. - Use the partedUtil or fdisk command to print any
existing partitions defined on the chosen disk device. - Caution: Take care when repartitioning a disk
containing data.- Use the partedUtil command to create a
new partition with type 251 =
0xFB and a starting offset of 128 on the chosen disk device,
overwriting or augmenting any existing partitions.
For example, to create
a partition number 1,
starting at sector 128 and ending at sector
500000, with type
251 =
0xFB:
partedUtil set "/vmfs/devices/disks/DeviceName" "1 128 500000 251
0" - Use the fdisk command to create a new
partition with a starting offset of 128 and type fb. For example:- Run the command:
fdisk
/vmfs/devices/disks/naa.60901234567890123456789012345678 - Type p and press
Enter to list partition information. - Type d and press
Enter to delete existing partition
information. - Type n and press
Enter for new partition. - Type p and press
Enter for a primary partition. - Type 1 and press
Enter. - For the First cylinder prompt, press Enter for the default.
- For last cylinder or +size, press Enter for the default.
- Type t and press
Enter to change volume type. - Type 1 and press
Enter to select the first partition. - Type fb and press
Enter.
Note: fb is the hexadecimal code for
VMFS volumes. - Type x and press
Enter to enter Expert mode. - Type b and press
Enter to start the process of changing
the starting block of the partition. - Type 1 and press
Enter to select the first partition. - Type 128 and
press Enter to set the starting block to
128. - Type w and press
Enter to save the changes and exit
fdisk.
- Run the command:
- To list the newly created partition information:
fdisk -lu
/vmfs/devices/disks/naa.60901234567890123456789012345678
- Use the partedUtil command to create a