How to check the LUN-ID from host side

If you ever wondered how you can check the lunid from the hostside and you don't have the option of installing CCI then you are in the right place.

The easiest way to get the lunid is to use the inqraid command that is part of Hitachi CCI (command control interface) package. You don't even need to install CCI on the host, you can just go ahead and copy the executable to a folder and run it.

Sometimes however systems administrators are a bit scared to copy/install software on their machines and going throught change control might take a while.

The alternative is to "decode" the device instance path from windows mpio

Here are the steps to read the device id and how to decode it.

From Computer Management, navigate to Storage->Disk Management, identify your disk and get it's properties. Go to the last tab (Details) and Scroll down in the list until property is "Device Instance Path". You will need the 8 digits to decode the lun id.
.link2ignnone size-medium wp-image-626" />

In this particular case the last eight digits are 39373942.

Now, break the 8 digits into 4 groups. Each group will give you 1 digit from the lunid. If a group is lower then 40 then you extract substract 30 , if the group is higher then 40 then you substract 31. All results will be converted to hex.


Lun id will have to be in format            a       b :  c        d

We are breaking the last 8 digits         39     37   39    42

And perform the calculation.

a is lower then 40 so we remove 30   39-30 = 9
b is lower then 40 so we remove 30   37-30= 7
c is lower then 40 so we remove 30  39-30=9
d is higher then 40 so we remove 31 41-31=11 = B in hex

So our lunid is   00:97:9B

Here is the HEX table for those who want it.

30=0       34=4    38=8   42=C
31=1        35=5     39=9   43=D
32=2       36=6    40=A   44=E
33=3       37=7     41=B   45=F


Of course, there is the way easier way to use inqraid and obtain that info as well but this method above does not require anything to be installed on the O/S side.

Leave a Reply

Your email address will not be published. Required fields are marked *