VMware Cloud Community
shamim-a
Enthusiast
Enthusiast

vmkfstools -C fails to create datastore

Hi All

In one of my test server, i have added 100G LUN and recanned it. It got detected and I am able to create a datastore by using VC. But if I am trying through command line, it fails.

I tried the following commands

1.

# vmkfstools -C vmfs3 -b 1m -S esxsan vmhba3:1:1:0

Creating vmfs3 file system on "vmhba3:1:1:0" with blockSize 1048576 and volume label "esxsan".

Usage: vmkfstools -C vmfs3 /vmfs/devices/disks/vmhbaW:X:Y:Z

Error: Invalid handle

2.

# vmkfstools -C vmfs3 -b 1m -S esxsan /vmfs/devices/disks/vmhba3\:1\:1\:0

Creating vmfs3 file system on "vmhba3:1:1:0" with blockSize 1048576 and volume label "esxsan".

Usage: vmkfstools -C vmfs3 /vmfs/devices/disks/vmhbaW:X:Y:Z

Error: Invalid handle

3.

# vmkfstools -C vmfs3 /vmfs/devices/disks/vmhba3:1:1:0

Creating vmfs3 file system on "vmhba3:1:1:0" with blockSize 1048576 and volume label "none".

Usage: vmkfstools -C vmfs3 /vmfs/devices/disks/vmhbaW:X:Y:Z

Error: Invalid handle

Any idea?

Shamim

0 Kudos
4 Replies
kjb007
Immortal
Immortal

You have to first create a partition of type fb using fdisk or some other tool. VC abstracts that, so you don't have to, but manually, first you create a partition, set the partition type, and then you can create a datastore.

-KjB

vExpert/VCP/VCAP vmwise.com / @vmwise -KjB
cx4gunman
Contributor
Contributor

Same problem here with a local storage

I create te partition with fdisk. but

But how do you set the type of the partition?

With fdisk I can chose a lot of formats but what do I chose?

Ext or empty or ??

Thanks for the help

0 Kudos
Pillai
Contributor
Contributor

After creatingPartition using fdisk, you should conver that partition to ext3 using "mkfs.ext3 " command. You can create the data store after that using vmkfstool -C option

0 Kudos
cx4gunman
Contributor
Contributor

OK, so if I create a "ext" type partition with fdisk this is the same as a "fd" type partition

Them I can use the vmkfstools command.

Great thanks for the info, Pillai !

This was the missing link for me Smiley Wink

0 Kudos