Link raw device mappings to the LUNs on the storage array

When a LUN is presented to a physical Windows server it’s more easy to link the LUN to the mounted disk within the operation system.
You can simply open the Disk Management tool (diskmgmt.msc) and click on the properties of the disk itself (not the partition!).
On the general tab, you can find the LUN number in the Location section.

In our case some LUNs are directly presented to a virtual machine running Windows 2008R2 (Raw Device Mappings). The disks itself are used within a virtual cluster configuration.
The customer asked me to identify the disk within the virtual machine together with the disk on the storage array (HP EVA 8400).
If you think this should be an easy task, think twice! The procedure below will be able to assist you in this matter.

First of all, I had several disks with the same size. Four of each to be exact. So building my logic on disk sizes was out of the question.

Cluster Service 1 MountPoint 1GB LUN 203
Cluster Service 1 Data 300GB LUN 202
Cluster Service 1 Log 50GB LUN 201

The same disks are created for cluster service 2, 3 & 4.

When taking a closer look at the properties of the disk in the guest operating system, we can find the following details:

As you can see you are unable to map the LUN with the disk in this way. The discovery process is a bit more complex.

  1. Based on the information which can be found in this VMware Knowledge Base article, we know:
    • Location 160 equals 0;
    • Location 192 equals 1;
  2. In this example, we can conclude the disk is presented by using scsicontroller 1 disk 2 (or 1:2).
  3. In the properties of the virtual machine, we search for the raw device which is mapped by using scsi ID 1:2.
  4. Afterwards click Manage Paths to list the LUN number used to present the disk to the virtual environment.

Success! R.

Leave a Reply