Loading

×Sorry to interrupt
CSS Error

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

Skip to main content

My Subscriptions

Loading

Knowledge Base

Manually creating a VMFS volume using vmkfstools -C (1009829)

Last Updated: 3/20/2024Categories: How toTotal Views: 196233Language:
Chinese (Simplified)JapaneseEnglish

13 like this article

Subscribe to get an email
newsletter with new updates

13 people found this helpful Please provide article feedback:

Learn how VMware Skyline Advisor and Skyline Health Diagnostics work together to provide proactive intelligence and self-service log analysis.

Use Skyline Advisor to avoid issues before they occur across VCF, vSphere, vSAN, NSX, vROps & Horizon. Skyline Findings are based on top KBs, VMSAs/CVEs and design best practices.

Use Skyline Health Diagnostics to root cause vSphere & vSAN logs when an issue occurs. Skyline Health Diagnostic Findings are based on top KBs and VMSA/CVEs. You can use the Skyline Health Diagnostics tool in online or offline mode.

If you require additional help from technical support, please use Skyline Advisor to initiate a Log Assist to reduce time to upload logs. TSEs can also initiate logs to reduce effort.

Purpose

This article provides steps to create a new VMFS volume on a disk which has free, unallocated space.

Note: VMFS Datastores are normally created using the vSphere Client, and it is not necessary to format the disk from the command line. For more information, see the Create VMFS Datastores section of the Configuration Guide for your version of VMware ESX.

This method is specific to the local console in ESX/ESXi. For other manual methods, see Managing vSphere Storage using the Command Line Interface (CLI) (1029301).

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. For more information, see Performing a rescan of the storage on an ESX/ESXi host (1003988).

Open a console to the ESX or ESXi host. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

Select a LUN or storage device you wish to format by its /vmfs/devices/disks/... identifier, starting with vml, naa, mpx, or vmhba. For more information, see Identifying disks when working with VMware ESX (1014953).

Use the partedUtil for ESXi 5.x/6.x or fdisk for ESXi 3.x/4.x command to print any existing partitions defined on the chosen disk device. For more information, see Using the partedUtil command line utility on ESX and ESXi (1036609) and Partitioning with fdisk.

Caution: Take care when repartitioning a disk containing data.

For ESXi 5.x/6.x, 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"

For ESXi/ESX 4.0 and earlier , use "partedUtil set" or fdisk

partedUtil set "/vmfs/devices/disks/DeviceName" ["partNum startSector endSector type/guid attribute"]*

For ESXi/ESX 4.1 and later , use "partedUtil setptbl"

partedUtil setptbl "/vmfs/devices/disks/DeviceName" DiskLabel ["partNum startSector endSector type/guid attribute"]*

For ESXi 3.x/4.x, 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.

Use the vmkfstools command to format the new partition as a VMFS-3 datastore, specifying a Block Size of 1-8MB, a friendly name for the datastore, and the chosen disk device and the created partition.

vmkfstools -C vmfs3 -b BlockSize -S DatastoreVolumeName /vmfs/devices/disks/ DeviceName:Partition

Usage:

vmkfstools -C vmfs3 /vmfs/devices/disks/vml... or,
vmkfstools -C vmfs3 /vmfs/devices/disks/naa... or,
vmkfstools -C vmfs3 /vmfs/devices/disks/mpx.vmhbaA:T:L:P

For example:

vmkfstools -C vmfs3 -b 8m -S NewDatastore /vmfs/devices/disks/naa.60901234567890123456789012345678:1

For ESXi 5.0 you can create a datastore with the VMFS-5 file system using the command:

vmkfstools -C vmfs5 -b 1m -S NewDatastore /vmfs/devices/disks/naa.60901234567890123456789012345678:1

Note: In a VMFS 5 file system, the recommended starting offset is 2048, instead of 128. This ensures to mitigate failures if the SCSI UNMAP command is used.

Rescan the storage subsystem to pick up the changes. The datastore should appear and be usable for virtual machine storage. For more information, see Performing a rescan of the storage on an ESX/ESXi host (1003988).

Related Information

Unable to connect to an ESX host using Secure Shell (SSH)
Performing a rescan of the storage on an ESX/ESXi host
Identifying disks when working with VMware ESXi/ESX
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
Managing Storage using the Command Line Interface (CLI) in vSphere 4.x
Using the partedUtil command line utility on ESXi and ESX
使用 vmkfstools -C 手动创建 VMFS 卷
vmkfstools -C を使用して手動で VMFS ボリュームを作成する

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
Chinese (Simplified)JapaneseEnglish

Attachments

Additional Resources

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

KB
•
Download and Install VMware Fusion (2014097)

Results 1-2 of 2

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

VMware ESX Server

Related Versions:

VMware vSphere ESXi 5.0

VMware ESXi 4.1.x Installable

VMware ESXi 4.1.x Embedded

VMware ESXi 4.0.x Installable

VMware ESXi 4.0.x Embedded

VMware ESXi 3.5.x Installable

VMware ESXi 3.5.x Embedded

VMware ESX Server 3.5.x

VMware ESX Server 3.0.x

VMware ESX Server 2.0.x

VMware ESX Server 1.x

VMware ESX Server 1.x

VMware ESX Server 1.5.x

VMware ESX 4.1.x

VMware ESX 4.0.x

view all

Take Our Survey

Was this article helpful?

YES

NO

Copyright © 2005-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.

Terms of Use

Your California Privacy Rights

Privacy

Accessibility

Cookie Settings

Support Assistant