VMware Cloud Community
kevindba
Contributor
Contributor
Jump to solution

Issues with vmkfstools - esx 3.5

I am new to this esx stuff. So Hello

So I have a demo connected to my san, with some vm's up and running and I am working with fiber channel storage datastores to move vm's from VM Server to ESX. But I am running into issues moving the vdkm via vmkfstools with the -i option.

So then I decided to playaround with vmkfstools to see if i could list datastores and even create them. But no luck.. The odd part is I don't have any issues when using the gui's via vi client to create the data stores.

Can anyone help me out? Thoughts Comments?

Thanks,

An example of one of my issues.

--- Create a datastore on vmhba2 - QLA2340

# esxcfg-rescan vmhba2

Rescanning vmhba2...done.

On scsi3, removing: 0:0 2:1 2:2.

On scsi3, adding: 0:0 2:1 2:2.

# esxcfg-vmhbadevs -q

vmhba2:0:0 /dev/sda

vmhba2:2:1 /dev/sdb

vmhba2:2:2 /dev/sdc

# ls

vmhba2:0:0:0 vml.01000000003030303032434543303036344d61676e6974

vmhba2:0:0:1 vml.01000000003030303032434543303036344d61676e6974:1

vmhba2:0:0:2 vml.01000000003030303032434543303036344d61676e6974:2

vmhba2:0:0:4 vml.01000000003030303032434543303036344d61676e6974:4

vmhba2:0:0:5 vml.01000000003030303032434543303036344d61676e6974:5

vmhba2:0:0:6 vml.01000000003030303032434543303036344d61676e6974:6

vmhba2:0:0:7 vml.01000000003030303032434543303036344d61676e6974:7

vmhba2:2:1:0 vml.01000100003030303032434543303132304d61676e6974

vmhba2:2:2:0 vml.01000200003030303032434543303032314d61676e6974

# vmkfstools -l vmhba2:2:2:0

Invalid ROR type: 'vmhba2:2:2:0'

# vmkfstools -l vmhba2:2:2

Invalid ROR type: 'vmhba2:2:2'

# vmkfstools -l vmhba2:2:2:0

Invalid ROR type: 'vmhba2:2:2:0'

# vmkfstools -C vmfs3 -b 1m -S myVMFS vmhba2:2:2:0

Creating vmfs3 file system on "vmhba2:2:2:0" with blockSize 1048576 and volume label "myVMFS".

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

Error: Invalid handle

# vmkfstools -C vmfs3 -b 1m -S myVMFS /vmfs/devices/disks/vmhba2:2:2:0

Creating vmfs3 file system on "vmhba2:2:2:0" with blockSize 1048576 and volume label "myVMFS".

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

Error: Invalid handle

# pwd

/vmfs/devices/disks

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

Creating vmfs3 file system on "vmhba2:2:2:0" with blockSize 1048576 and volume label "myVMFS".

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

Error: Invalid handle

#

Reply
0 Kudos
1 Solution

Accepted Solutions
Chamon
Commander
Commander
Jump to solution

Here are the options when using vmkfstools

OPTIONS FOR FILE SYSTEMS:

vmkfstools -C --createfs vmfs3

-b --blocksize #[mMkK]

-S --setfsname fsName

-Z --extendfs extension-partition

deviceName

-P --queryfs -h --humanreadable

-T --tovmfs3

-x --upgradetype zeroedthick

-u --upgradefinish

vmfsPath

OPTIONS FOR VIRTUAL DISKS:

vmkfstools -c --createvirtualdisk #[gGmMkK]

-d --diskformat [zeroedthick|

eagerzeroedthick|

thick|

thin]

-a --adapterType buslogic

-w --writezeros

-j --inflatedisk

-U --deletevirtualdisk

-E --renamevirtualdisk srcDisk

-i --clonevirtualdisk srcDisk

-d --diskformat [rdm:|thin|2gbsparse]

-X --extendvirtualdisk #[gGmMkK]

-M --migratevirtualdisk

-r --createrdm /vmfs/devices/disks/...

-q --queryrdm

-z --createrdmpassthru /vmfs/devices/disks/...

-Q --createrawdevice /vmfs/devices/generic/...

-v --verbose #

-g --geometry

vmfsPath

OPTIONS FOR DEVICES:

vmkfstools -s --scan adapterName

-L --lock reserve /vmfs/devices/disks/...

View solution in original post

Reply
0 Kudos
7 Replies
Chamon
Commander
Commander
Jump to solution

This will do it and align the disk as well

To align VMFS volumes, the alignment will be done at ESX server level using fdisk and at the VM level. This is because both the ESX Server and the clients will put MBRs on the LUNs. The ESX must align the VMFS volume, and the client systems must align their virtual disks.

To align the ESX server:

1. On service console, execute fdisk /dev/sd is the device on which you would like to create the VMFS.

2. Type "n" to create a new partition.

3. Type "p" to create a primary partition.

4. Type "1" to create partition #1.

5. Select the defaults to use the complete disk.

6. Type "x" to get into expert mode.

7. Type "b" to specify the starting block for partitions.

8. Type "1" to select partition #1.

9. Type "128" to make partition #1 to align on 64KB boundary.

10. Type "r" to return to the main menu.

11. Type "t" to change partition type.

12. Type "1" to select partition #1.

13. Type "fb" to set the type to fb (VMFS volume).

14. Type "w" to write label and the partition information to disk.

By declaring the partition type as fb, the ESX server will recognize the partition as an unformatted VMFS volume. You should be able to put a VMFS file system on it using the MUI or vmkfstools. Next, the virtual disks for each VM must be aligned. For Linux VMs follow the procedure listed above. For Windows VMs, use the procedure for Windows, above.

kevindba
Contributor
Contributor
Jump to solution

Chamon,

Man, who would have ever guessed. Create a partiton before you use the disk, um sysadmin 101

nice, dont know why i was thinking vmfstools would have created the partion.

It would have helped if i looked at the partion table for a disk that was created via vic,

Thanks, kevin---

Reply
0 Kudos
kevindba
Contributor
Contributor
Jump to solution

Any thoughts on this ROR error?

# vmkfstools -C vmfs3 -b 1m -S myVMFS /vmfs/devices/disks/vmhba2:2:2:1

Creating vmfs3 file system on "vmhba2:2:2:1" with blockSize 1048576 and volume label "myVMFS".

Successfully created new volume: 47abe626-57f9d122-87c9-000e0c73ae9b

# vmkfstools -l /vmfs/devices/disks/vmhba2:2:2:1

Invalid ROR type: '/vmfs/devices/disks/vmhba2:2:2:1'

# vmkfstools -l /vmfs/devices/disks/vmhba2:2:2:1

Invalid ROR type: '/vmfs/devices/disks/vmhba2:2:2:1'

#

Reply
0 Kudos
Chamon
Commander
Commander
Jump to solution

Glad to help.

If you found this info helpful please award points. Smiley Happy

Reply
0 Kudos
Chamon
Commander
Commander
Jump to solution

Here are the options when using vmkfstools

OPTIONS FOR FILE SYSTEMS:

vmkfstools -C --createfs vmfs3

-b --blocksize #[mMkK]

-S --setfsname fsName

-Z --extendfs extension-partition

deviceName

-P --queryfs -h --humanreadable

-T --tovmfs3

-x --upgradetype zeroedthick

-u --upgradefinish

vmfsPath

OPTIONS FOR VIRTUAL DISKS:

vmkfstools -c --createvirtualdisk #[gGmMkK]

-d --diskformat [zeroedthick|

eagerzeroedthick|

thick|

thin]

-a --adapterType buslogic

-w --writezeros

-j --inflatedisk

-U --deletevirtualdisk

-E --renamevirtualdisk srcDisk

-i --clonevirtualdisk srcDisk

-d --diskformat [rdm:|thin|2gbsparse]

-X --extendvirtualdisk #[gGmMkK]

-M --migratevirtualdisk

-r --createrdm /vmfs/devices/disks/...

-q --queryrdm

-z --createrdmpassthru /vmfs/devices/disks/...

-Q --createrawdevice /vmfs/devices/generic/...

-v --verbose #

-g --geometry

vmfsPath

OPTIONS FOR DEVICES:

vmkfstools -s --scan adapterName

-L --lock reserve /vmfs/devices/disks/...

Reply
0 Kudos
see2k
Contributor
Contributor
Jump to solution

I received the same error message when attempting to format my iscsi lun with vmkfstools: Error: invalid handle.

I followed the directions running FDISK but still am getting the same Error: Invalid handle message.

I was able to format that iscsi partition as type 83 no problems. Anything else someone can suggest?

Reply
0 Kudos
florian_otel
Contributor
Contributor
Jump to solution

Same issue here: Could format the iSCSI LUN (0x83 partition type / mkfs.ext3 filesystem on it) but no luck with vmkfstools and 0xfb partition type.

Any hints ?

Thanks,

Florian

Reply
0 Kudos