May 27, 2015

vSphere Storage Terminologies - RDM

RDM - Raw Device Mapping (RDM)

Raw device mapping (RDM) provides a mechanism for a virtual machine to have direct access to a LUN on the physical storage subsystem (Fibre Channel, iSCSI or Fibre Channel over Ethernet). An RDM LUN does not come with a file system, e.g. VMFS. However, it can be formatted with any file system, such as NTFS for Windows virtual machines.

“Consider the RDM a symbolic link from a VMFS volume to a raw volume.”

A mapping file is located on a VMFS datastore and points to the raw LUN/volume. The mapping file acts as a proxy for the physical device (raw LUN) and contains metadata used for managing and redirecting access to the raw LUN.

A virtual machine reads the mapping file, obtains the location of the raw LUN, then sends its read and write requests directly to the raw LUN, bypassing the hypervisor.

The mapping makes volumes appear as files in a VMFS volume.

RDM configuration consists of:
  • Mapping file
    • Is a proxy or symbol link
    • Resides on a VMFS (not NFS) volume
    • Points to location of mapped device
  • Mapped device
    • Raw LUN/volume
    • Can be FC, iSCSI, or FCoE attached
  • Virtual Machine
    • Reads mapping file from VMFS volume to locate mapped device
    • Reads/write to mapped device

"The mapping file—not the raw volume—is referenced in the virtual machine configuration file. The mapping file, in turn, contains a reference to the raw volume."

The RDM allows a virtual machine to directly access and use the storage device.

  • Acts as a proxy for a raw physical storage device
  • Contains metadata used to manage and redirect disk accesses to the physical device
  • Sometimes called a pass-thru disk.
  • Unlike the VMFS and NFS datastores, RDM is not a shared datastore
  • Enables storage to be directly accessed by a virtual machine
  • Is not available for direct-attached block devices or certain RAID devices
  • Requires the mapped device to be a whole LUN (You cannot map a disk partition as RDM)
  • Presented directly to a single virtual machine and cannot be used by any other virtual machine
  • Allows management and access of raw SCSI disks or LUNs as VMFS files
Two Compatibility modes are available for RDMs:
  • Virtual - allows an RDM to act exactly like a virtual disk file, including the use of snapshots:
    • VMDK features
    • Snapshots
    • Cloning
    • 62 TB maximum size (2 TB minus 512 bytes at VMFS-3)
  • Physical - allows direct access of the SCSI device for those applications that need lower level control
    • Direct access to the LUN
    • No cloning, vMotion, Templates
    • Cannot use a snapshot with the disk in this mode.
    • Full access to SCSI target based commands
    • Enables the VM manage its own, storage-based, snapshot or mirroring operations
    • Flash Read Cache does not support RDMs in physical compatibility
    • 64 TB (2 TB minus 512 bytes at VMFS-3)
"An example of when RDM is used is Microsoft Cluster Server (MSCS). MSCS requires a SCSI-3 quorum disk, which VMFS does not natively support. Using an RDM for the quorum disk gets around the host SCSI-3 incompatibility."

You can configure RDMs in two different compatibility modes:
  • Physical (pRDM) – In this format, the SCSI commands pass directly through to the hardware during communication between the guest operating system and the LUN or SCSI device
    All I/O passes directly through to the underlying LUN device, and the mapping file is used solely for locking and vSphere management tasks. You might also see this referred to as a passthrough disk.
  • Virtual (vRDM) – This mode specifies full virtualization of the mapped device, allowing the guest operating system to treat the RDM like any other virtual disk file in a VMFS volume. The mapping file enables additional features that are supported with normal VMDKs.
The key difference between these two compatibility modes is the level of SCSI virtualization applied at the VM level.

Virtual compatibility mode specifies full virtualization of the mapped device.
Physical compatibility mode specifies minimal SCSI virtualization of the mapped device, allowing the greatest flexibility for SAN management software.

Virtual Compatibility Mode
Physical Compatibility Mode
VMkernel sends only READ and WRITE to the mapped device VMkernel passes all SCSI commands to the device, with one exception: REPORT LUNs
The physical compatibility (pass-through) mode is the default format
Virtual mode RDMs can be included in a vSphere snapshot Physical mode RDMs cannot be included in a vSphere snapshot. Features that depend on snapshots don't work with physical mode RDMs
Virtual mode RDM can go from virtual mode RDM to a virtual disk via Storage vMotion Physical mode RDM cannot go from virtual mode RDM to a virtual disk via Storage vMotion
Virtual compatibility RDMs are supported with Flash Read Cache. Flash Read Cache does not support RDMs in physical compatibility
The mapped device appears to the guest operating system exactly the same as a virtual disk file in a VMFS volume.
The REPORT LUNs command allows the VMkernel to isolate the LUN to the owning virtual machine. In this mode, all physical characteristics of the underlying hardware are exposed.

In general, a use case for RDM is when/where a storage device must be presented directly to the guest operating system inside a virtual machine. A use case for physical RDM is if the application in the virtual machine is SAN-aware and needs to communicate directly to storage devices on the SAN.

Features Available with Virtual Disks and Raw Device Mappings
ESXi Features
Virtual Disk File
Virtual Mode RDM
Physical Mode RDM
SCSI Commands Passed Through No No Yes
(REPORT LUNs is not passed through)
vCenter Server Support Yes Yes Yes
Snapshots Yes Yes No
Distributed Locking Yes Yes Yes
Clustering Cluster-in-a-box only Cluster-in-a-box
Physical-to-virtual clustering
SCSI Target-Based Software No No Yes


No comments:

Post a Comment