Recreating pass-through Raw Device Mapping (RDM) files for a virtual machine
search cancel

Recreating pass-through Raw Device Mapping (RDM) files for a virtual machine

book

Article ID: 320691

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article provides instructions on recreating Raw Device Mapping (RDM) files for virtual machines in a VMware Infrastructure 3 or newer data center.

Environment

VMware vSphere ESXi 5.1

Resolution

If the descriptor file of an RDM is missing, delete the remaining mapping file (name–rdm.vmdk or name–rdmp.vmdk) and recreate the RDM.

Note: Deleting the mapping file or descriptor file for the RDM does not affect the data

Unlike standard virtual machine disk files in VMware ESX 3.x and newer, the RDM comprises of a name–rdm.vmdk or name–rdmp.vmdk mapping file, and the associated name.vmdk descriptor file. These files are used to map a RAW LUN for use with a virtual machine.

Creating a new RDM, modifying the descriptor file content, and using it in-place of a mapping file that is missing is possible, but usually unnecessary. However, these requirements are documented if such circumstances are present.

Note: Easiest option to create the RDM is through the vSphere Client. But, if needed, the commands in this article can be used to create RDMs using the host console. For additional RDM creation procedures, see the product documentation.

Creating a virtual RDM

Creating a virtual RDM creates two files:
  • The descriptor file, example.vmdk
  • The mapping or pointer file, example-rdm.vmdk
To create a virtual RDM, run the command:
 
vmkfstools -r /vmfs/devices/disks/<device> example.vmdk
 
Note: The <device> nomenclature varies between VMware ESX product releases. For more information, see Identifying disks when working with VMware ESX/ESXi (1014953).
 
The resulting descriptor file example.vmdk contains similar information to a standard virtual machine disk, with these exceptions:
 
Standard virtual machine disk descriptor fileStandard virtual machine Raw Device Mapping file
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfs"

# Extent description
RW 8388608 VMFS "example-flat.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfsRawDeviceMap
"

# Extent description
RW 8388608 VMFSRDM "example-rdm.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
  • The createType is vmfsRawDeviceMap.
  • The Extent description directs to the example-rdm.vmdk mapping file.
  • The Extent description indicates the type is VMFSRDM.
  • The adapter type is either buslogic or lsilogic, depending on your intended virtual SCSI controller configuration.

Creating a physical RDM

Similar to creating a virtual RDM, creating a physical RDM creates two files:
  • The descriptor file example.vmdk
  • The mapping or pointer file, example-rdmp.vmdk
To create a physical RDM, run the command:
 
vmkfstools -z /vmfs/devices/disks/device example.vmdk
 
Note: The device nomenclature varies between VMware ESX product releases. For more information, see Identifying disks when working with VMware ESX/ESXi (1014953).
 
The resulting descriptor file example.vmdk contains similar information to a standard virtual machine disk, with these exceptions:
 
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfs"

# Extent description
RW 8388608 VMFS "example-flat.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"
# Disk DescriptorFile
version=1
CID=fb183c20
parentCID=ffffffff
createType="vmfsPassthroughRawDeviceMap"

# Extent description
RW 8388608 VMFSRDM "example-rdmp.vmdk"

# The Disk Data Base
#DDB

ddb.virtualHWVersion = "4"
ddb.geometry.cylinders = "522"
ddb.geometry.heads = "255"
ddb.geometry.sectors = "63"
ddb.adapterType = "buslogic"
  • The createType is vmfsPassthroughRawDeviceMap.
  • The Extent description directs to the example-rdmp.vmdk mapping file.
  • The Extent description indicates the type is VMFSRDM.
  • The adapter type is either buslogic or lsilogic, depending on your intended virtual SCSI controller configuration.

Note: Additional parameters or strings within these descriptor files are possible, depending on the version of VMware ESX used. Usually these additional lines are safe to retain. Relevant items that pertain to this article are noted in red, above.


Additional Information

For more information on virtual disks, see VMware Virtual Disks: Virtual Disk Format v1.1.
Identifying disks when working with VMware ESXi/ESX
仮想マシンのパス スルー Raw デバイス マッピング(RDM)ファイルを再度作成する
为虚拟机重新创建直通裸设备映射 (RDM) 文件