RDM vs. VMFS
VMware offers two ways of provisioning storage to your virtual infrastructure, RDM (Raw Device Mapping) and VMFS (Virtual Machine File System). The availability of the two options sometime creates some confusion of which to use and if one is better than the other. Although VMFS is recommended for most virtual disk; RDM was introduced because there are some instances where there is a need to use raw disks storage – e.g. data drives for Microsoft Cluster Service (MSCS).
VMware RDM allows for two compatibility modes for raw device mappings, virtual and physical. Virtual compatibility mode allows a mapping to act exactly like a virtual disk file, including the use of redo logs. Physical compatibility mode allows direct access to the SCSI device, for those applications needing lower level control.
Virtual Compatibility Mode vs. Physical Compatibility Mode
In Virtual mode the disk appears to the guest operating system exactly the same as a virtual disk file in a VMFS volume. The real hardware characteristics are hidden. Virtual mode allows customers using raw disks to realize the benefits of VMFS such as advanced file locking for data protection and redo logs for streamlining development processes. Virtual mode is also more portable across storage hardware, presenting the same behaviour as a virtual disk file.
VMware recommends the use of RDM in these situations:
When SAN snapshot or other layered applications are run in the virtual machine. Raw device mapping better enables scalable backup offloading systems using the features inherent to the SAN.
In any MSCS clustering scenario — virtual to virtual clusters as well as physical to virtual clusters. VMware now recommends that cluster data and quorum disks be configured as raw device mappings rather than as files on shared VMFS.
A Comparison of Raw Device Mapping to Other Means of SCSI Device Access
|
|
Virtual Disk File |
Virtual Mapping | Physical Mapping | Raw Disk |
| SCSI Commands Passed Through | NO | NO | YES (note 1) | YES (note 1) |
|
VirtualCenter Support |
YES | YES | YES | NO |
|
Redo Logs |
YES | YES | NO | NO |
| Distributed Locking | YES | YES | YES | NO |
|
Clustering |
All except N+1 | All except N+ | All except CIB (note 2) | All except CIB (note 2) |
| SCSI Target-Based Software | NO | NO |
YES |
YES |
Note 1. REPORT LUNS is not passed through
Note 2. CIB = Cluster-In-a-Box
Conclusion
Studies done by VMware shows that RDM and VMFS produce similar I/O throughput in test situations. They recommend the use of VMFS in all cases except in environment where backup applications use inherent SAN features as snapshots or clustering applications (for both data and quorum disk). The reason is, these applications require low-level SCSI disk control.
