Raw Device Mapping (RDM) in VMware
## Need for RDM
1. Performance: RDM can provide better I/O performance compared to virtual disks because it
allows direct access to the underlying storage hardware. This can be critical for applications that
require high-speed access to storage.
2. Compatibility: Some applications and storage configurations require direct access to physical
storage. For example, certain clustering solutions like Microsoft Cluster Service (MSCS) or
third-party backup software may need to interact directly with the storage hardware.
3. Large Disks: Virtual disks have size limitations that may not be sufficient for some applications.
RDM allows VMs to use very large disks by directly mapping a physical LUN to the VM.
4. Snapshots: Virtual machine snapshots can introduce overhead and potential performance issues.
RDM can help avoid these issues by providing a direct storage path, ensuring consistent
performance and data integrity.
## Use of RDM
1. Databases: Applications such as large databases (e.g., Oracle, SQL Server) that require high I/O
throughput can benefit from the direct access provided by RDM.
2. Cluster Services: Applications that use clustering for high availability and redundancy, such as
MSCS, require shared storage accessible by multiple hosts. RDM is often used in these scenarios.
3. SAN Management: Storage Area Network (SAN) management tools may need direct access to
storage for tasks such as replication, deduplication, or other advanced storage features.
## Process of Setting Up RDM
### Prerequisites
1. Shared Storage: Ensure that you have a shared storage system, such as a SAN, that is
accessible by your VMware environment.
2. Compatibility: Verify that your storage system and the version of VMware you are using support
RDM.
### Steps to Configure RDM
1. Identify the LUN: Identify the Logical Unit Number (LUN) on your storage system that you want to
map to your VM. This LUN should be visible to all ESXi hosts that the VM might run on.
2. Add RDM to VM:
- Open VMware vSphere Client: Connect to your VMware vCenter Server using the vSphere
Client.
- Select VM: Navigate to the VM you want to add the RDM to.
- Edit Settings: Right-click the VM and select "Edit Settings".
- Add Hard Disk: Click on "Add New Device" and select "Hard Disk".
- Use Existing Disk: Choose "Use an existing virtual disk".
- Select Raw Device Mapping: In the "Select Disk" screen, choose "Raw Device Mapping".
- Choose LUN: Select the LUN you identified earlier.
- Compatibility Mode: Choose between "Physical" or "Virtual" compatibility mode.
- Physical Compatibility Mode: Provides direct access to the hardware, but certain VMware
features like snapshots and cloning are not available.
- Virtual Compatibility Mode: Allows the use of VMware features like snapshots and cloning, but
may introduce some performance overhead.
3. Complete the Setup:
- SCSI Controller: If necessary, add or configure a new SCSI controller. Some applications and
configurations require a specific SCSI controller type (e.g., Paravirtual SCSI or LSI Logic).
- Finish and Save: Complete the wizard and save the settings.
4. Verify the Setup: After adding the RDM, verify that the VM can access the storage correctly. You
can do this by checking the operating system inside the VM to ensure the new disk is recognized
and accessible.
### Important Considerations
1. Backups: Ensure you have a robust backup strategy for the data on the RDM. Because RDM
maps directly to physical storage, traditional VM-level backups may not capture this data.
2. Compatibility Mode: Understand the implications of the compatibility mode you choose. Physical
compatibility mode provides direct access but limits some VMware features. Virtual compatibility
mode allows more VMware features but may affect performance.
3. Performance Monitoring: Regularly monitor the performance of the RDM to ensure it meets your
application's requirements. Use VMware performance monitoring tools and any storage-specific
tools provided by your SAN vendor.
By following these steps and considerations, you can effectively use RDM in VMware to meet
specific performance, compatibility, and storage needs. This setup is particularly useful for
high-performance applications and environments requiring direct access to physical storage
resources.