VMware Cloud Community
RockYRahul
Contributor
Contributor

Unable to create vmfs partition using vmkfstool command

Hi All,

I am playing with vmware ESX 4.1 with openfiler, I have created LUNs in openfiler and mapped to targets. I see those LUNs in vmware s/w iscsi initiator and create vmfs partition through vSphere Client but I am unable to create the same drive using vmkfstool command.

Below is the command line output.

[root@localhost disks]# vmkfstools  -C vmfs -S test1 /vmfs/devices/disks/vml.01000000004a4d346139302d6d48627a2d6e425272564952545541
Checking if remote hosts are using this device as a valid file system. This may take a few seconds...
Creating vmfs file system on "t10.F405E46494C45400A4D443169303D2D68426A7D2E6242527" with blockSize 1048576 and volume label "test1".
/vmfs/devices/disks/vml.01000000004a4d346139302d6d48627a2d6e425272564952545541: Permission denied.  (Have you set the partition type to 0xfb?)
Error: Permission denied.

Please help me to over come this issue.

Thanks in advance,

0 Kudos
2 Replies
krishnaprasad
Hot Shot
Hot Shot

First of all you need to create a partition in the LUN exposed from the filer. you can use fdisk utility to create the partition. once the partition is created, you need to set the partition id to 'fb'. THis also can be done using fdisk.

Then execute the command as below

vmkfstools  -C vmfs -S test1 /vmfs/devices/disks/vml.01000000004a4d346139302d6d48627a2d6e425272564952545541:1

Note that we are providing the partition number as input to vmkfstools instead of the LUN as such.

0 Kudos
Mayank052011101
Contributor
Contributor

Hello Rahul,

Please do the following...

First create a partition on on the raw LUN using the fdisk utility, here is a very good link http://tldp.org/HOWTO/Partition/fdisk_partitioning.html

,once you've created a primary partition, change the ID of the partition from default linux to "fb" (use "t" and then type fb this will make it compatable with VMFS) and use this command..

     vmkfstools  -C vmfs -S test1 /vmfs/devices/disks/vml.01000000004a4d346139302d6d48627a2d6e425272564952545541:1

what it would do is that it'll format the created partition with the vmfs file system. Speaking in a generic term like a windows administrators, it is very much like creating a partition and then formating it with fat or NTFS.

Hope it helps,

Mayank

Mayank S. VCP 4, VCP 5
0 Kudos