kikeman
Contributor
Contributor

Bad file descriptor when formating a VMFS3 partition

Hi all,

I'm planning create a local VMFS partition in my local free space on SCSI disk array and I have followed the howto:

When I execute this command: fdisk /vmfs/devices/disks/vmhba2\:0\:0\:0 and print the partitions I get the following result:

The number of cylinders for this disk is set to 8959.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): p
Disk /vmfs/devices/disks/vmhba2:0:0:0: 73.4 GB, 73406611456 bytes
254 heads, 63 sectors/track, 8959 cylinders
Units = cylinders of 16002 * 512 = 8193024 bytes
Device Boot Start End Blocks Id System
/vmfs/devices/disks/vmhba2:0:0:0p1 * 1 13 103981+ 83 Linux
/vmfs/devices/disks/vmhba2:0:0:0p2 14 537 4192524 83 Linux
/vmfs/devices/disks/vmhba2:0:0:0p3 538 607 560070 82 Linux swap
/vmfs/devices/disks/vmhba2:0:0:0p4 608 8959 66824352 5 Extended
/vmfs/devices/disks/vmhba2:0:0:0p5 608 869 2096230+ 83 Linux
/vmfs/devices/disks/vmhba2:0:0:0p6 870 1000 1048099+ 83 Linux
/vmfs/devices/disks/vmhba2:0:0:0p7 1001 1066 528034+ 83 Linux
/vmfs/devices/disks/vmhba2:0:0:0p8 1067 8959 63151861+ fb Unknown

So the right partition number is 8 and the type is "fb"... when I try to execute the formating command: vmkfstools -C vmfs3 -S vmfs /vmfs/device/disks/vmhba2:0:0:8

Creating file system on "/vmfs/device/disks/vmhba2:0:0:8" with blockSize 1048576 and volume label "vmfs".

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

Error: Bad file descriptor

I get this error... :S:S and I don't know what can be wrong in all this....

I will apreciate some help on this topic because I'm getting fustrated with local vmfs partitions....

Regards,

kharmander

0 Kudos
2 Replies
Sangokan
Enthusiast
Enthusiast

0 Kudos
kikeman
Contributor
Contributor

Thanks for the link... I try a useful command: esxcfg-vmhbadevs -q

and it confirms that I was using the right argument /dev/sda partition 8.

Anyway I found the error !!! :smileygrin:

Insted of type: vmkfstools -C vmfs3 -S vmfs /vmfs/device/disks/vmhba2:0:0:8

which return:

Creating file system on "/vmfs/device/disks/vmhba2:0:0:8" with blockSize 1048576 and volume label "vmfs".
Usage: vmkfstools -C vmfs3 /vmfs/devices/disks/vmhbaW:X:Y:Z
Error: Bad file descriptor

I typed:

vmkfstools -C vmfs3 -b 1m -S vmfs /vmfs/devices/disks/vmhba2\: 0\:0\:8

Creating file system on "vmhba2:0:0:8" with blockSize 1048576 and volume label " vmfs".
Successfully created new volume: 47209bc1-9cfe1960-f2eb-000255dc3f11

YOU MUST ESCAPE DE COLON SYMBOL ":" WHEN PASSING IT AS AN ARGUMENT IN VMKFSTOOLS !!!

I hope it will be helpfull for someone that use vmkfstools.

Regads,

kikeman

0 Kudos