This article provides steps to identify Raw Device Mappings (RDMs) attached to registered Virtual Machines.
VMware vSphere ESXi (All Versions)
1.) Determine which RDM LUNs are part of a VM cluster. From the vSphere Client, select a Virtual Machine that has a mapping to the RDM devices.
2.) Edit your Virtual Machine settings and navigate to your Mapped RAW LUNs.
As shown in the Example below: For Hard disk 2, the RDM Physical path is identified via the VML ID as shown in example below
3.) Identify the physical drive associated for the VML ID
Open SSH/Putty Session on the Host where the Virtual Machine is running on and run "esxcli storage core device list"
Example:
esxcli storage core device list
1.) Open SSH/Putty Session on the Host where the Virtual Machine is running on
2.) Run the following commands:
find /vmfs/volumes/ -type f -name '*.vmdk' -size -1024k -exec grep -l '^createType=.*RawDeviceMap' {} \; > /tmp/rdmsluns.txt
for i in `cat /tmp/rdmsluns.txt`; do vmkfstools -q $i; done
Example output:
1.) Open the vSphere PowerCLI command-line
2.) Run the following command:
Get-VM | Get-HardDisk -DiskType "RawPhysical","RawVirtual" | Select Parent,Name,DiskType,ScsiCanonicalName,DeviceName | fl
This command produces a list of Virtual Machines with RDMs, along with the backing SCSI device for the RDMs. An output looks similar the below.
Identify the backing SCSI device from either the ScsiCanonicalName or DeviceName identifiers.
Note:
For more information, see Identifying disks when working with VMware ESXi