BETA – ESX 3.0 Dev names and VMHBA

In ESX 2.x I would have used the command, vmkpcidivy -q vmhba_devs, to get a list of DEVice names as understood by the Service Console, and also as understood by the vmkernel.

In ESX 2.x I would have used the command, vmkpcidivy -q vmhba_devs, to get a list of DEVice names as understood by the Service Console, and also as understood by the vmkernel. The command would have given an output like so:

vmhba0:0:0 /dev/sda
vmhba0:1:0 /dev/sdb

Why would you want this information? Well, if you have storage with some linux partitions and some blank disks, you may want to format them as VMFS-3. But you cannot ID through the VI Client which ones are blank and which ones are with Linux partitions. You might have been able to work out from the COS that /dev/sd? is a blank disk. But you might be struggling to find a way of linking this to the output in the VI client. A worry would be that you might pick the wrong disk and lose data. With the end of vmkpcidivy, you will have to find another solution. Fortunately, this is easy via the Service Console.

You can use the command esxcfg-vmhbadevs -m to see the relationship between vmhba and devnames. This produces an output like so:

vmhba0:0:0:8        /dev/sda8           443e567e-7c606397-0977-00065b0f7e2d

The command ls /vmfs/devices/disks/ will list all your disks/luns like so:vmhba0:0:0:0

vmhba0:1:0:0
vmhba1:2:0:0
vmhba1:3:0:0
vmhba1:4:0:0
vmhba1:5:0:0
vmhba1:6:0:0
vml.02000000003343453035595041202020203731303638315430535831373334
vml.0200000000334345303634504b202020203731303545464853535831373334
vml.0200000000334345304150415420202020373131384b51305a535831373334
vml.0200000000334345304244584e202020203731313835485231535831373334
vml.0200000000334345304446543230303030373132314e4c5a57535431373334
vml.02000000005546413350323330375352544d414e333336
vml.02000000005546413350323330375442444d414e333336

You can then use fdisk to work out if the disks are blank or partitioned with:

fdisk /vmfs/devices/disks/vmhba1:5:0:0

Note: Many thanks to Satyam Vaghani of VMware, Palo Alto who helped me greatly on this.

This was first published in April 2006

Dig deeper on VMware ESX and ESXi administrative tips

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchVirtualDesktop

SearchDataCenter

SearchCloudComputing

Close