Procedures for Removing and Re-adding Raw Device Mapping (RDM) Disks in vSphere
search cancel

Procedures for Removing and Re-adding Raw Device Mapping (RDM) Disks in vSphere

book

Article ID: 452331

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Raw Device Mapping (RDM) allows a virtual machine to access a physical LUN directly. Removing or re-attaching these disks requires specific steps to ensure hypervisor stability and data integrity, especially in environments where LUNs are presented to multiple ESXi hosts. This article outlines the safe procedure for standalone virtual machines and Windows Server Failover Cluster (WSFC) environments.

Environment

  • VMware vSphere ESXi 7.x, 8.x
  • VMware vCenter Server 7.x, 8.x
  • Windows Server Failover Clustering (WSFC) / MSCS

Cause

Removing RDM disks directly from the storage array or detaching them from a running virtual machine without properly removing the mapping in vCenter first causes the ESXi host to lose the expected device path. This often results in I/O failures, "lost communication" errors in the vmkernel.log, and potential virtual machine or ESXi host hangs.

Resolution

Resolution

Part 1: Standalone VM Management

    1. Power off the virtual machine.
    2. Navigate to Edit Settings in vCenter.
    3. Locate the RDM disk entry.
    4. Click the Remove icon.
    5. Ensure the "Delete from disk" option is unchecked. This is critical to preserving data on the physical LUN.
    6. Click OK to commit changes.

Part 2: Windows Server Failover Cluster (WSFC) Management

    1. Open Failover Cluster Manager in the guest OS.
    2. Right-click the cluster disk resource associated with the RDM and select Take Offline.
    3. Gracefully shut down all secondary cluster nodes.
    4. Remove RDM mappings from secondary nodes first, then the primary node, using the procedure in Part 1.
    5. Perform LUN removal only after the mapping is removed in vCenter.

Part 3: Re-attachment Procedures

    1. Present the LUN to all relevant ESXi host(s).
    2. Navigate to the ESXi host(s) in vCenter. Under Storage, click Rescan Storage to ensure the new LUN is detected.
    3. Go to the target virtual machine(s) and select Edit Settings > Add New Device > Existing Hard Disk.
    4. Select the LUN mapping file.

Configuration Options

Option A: Standalone VM

      1. In the VM Edit Settings window, click Add New Device.
      2. Select Existing Hard Disk.
      3. Browse the datastore to locate and select the RDM mapping file (.vmdk) created for this LUN.
      4. Verify the Compatibility Mode setting:
        • Physical Compatibility Mode: Select this if the VM requires direct pass-through of SCSI commands (e.g., for specialized storage management software).
        • Virtual Compatibility Mode: Select this for standard RDM usage where the VM interacts with the device as a standard virtual disk.
      5. Click OK to save the changes.

Option B: WSFC Cluster (Multiple Nodes)

      1. For the primary node: Select Physical Compatibility Mode to support SCSI-3 Persistent Reservations.
      2. For all secondary nodes: Do not create a new RDM. Select Existing Hard Disk and point to the same RDM mapping file (.vmdk) used by the primary node.
      3. Ensure Physical Compatibility Mode is selected for all cluster nodes to maintain cluster integrity.

Additional Information

  • For issues, contact support: To speak with a customer representative or a Support Engineer see Contact Support. Scroll to the bottom of the page and click on your respective region…