Expanding the size of a Raw Device Mapping (RDM) in vSphere
search cancel

Expanding the size of a Raw Device Mapping (RDM) in vSphere

book

Article ID: 314350

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi VMware vSphere ESX 8.x

Issue/Introduction

  • Expand a Raw Device Mapping (RDM) disk currently in use by a VMware vSphere virtual machine.

 

Environment

VMware vSphere ESXi 8.x

Resolution

General Prerequisites:

  • Critical – Snapshot Consolidation: To prevent data corruption, you must commit all existing virtual machine snapshots prior to execution.Finding and listing virtual machine snapshots

  • Requirement – LUN ID Consistency: Verify that LUN IDs are identical across all ESXi hosts before expanding a pRDM. The RDM's VML identifier relies on this global consistency.

  • Requirement – Global Storage Rescan: Post-modification, execute a storage rescan on all ESXi hosts provisioned with the modified LUN to ensure cluster-wide capacity consistency.

 

 

 

1. Expanding Shared pRDM disk (Clustered VMs e.g WSFC)

  • Expected UI Discrepancy: The Host LUN and Guest OS will report the correct size, but the vSphere Client will retain the original pRDM size because the RDM file does not dynamically update.

  • Required Remediation: Re-create the RDM disk during a maintenance window to correct the UI discrepancy and prevent clone or conversion failures (reference: vSphere 7 RDM to Shared VMDK Migration).


Steps:

    1. Gracefully shut down all virtual machines participating in the cluster.

    2. For all affected VMs: Open the VM Settings, Navigate to Controller and hard disk settings.



    3. Document the RDM details for each RDM across all nodes/VMs (Compatibility Mode, File path, VML IDs , SCSI Controller assignment)
    4. Edit the virtual machine settings on the primary node. Select the RDM hard disks, click Remove, and explicitly select Delete files from datastore. This eliminates the original RDM disk (which stored the old RDM size).

    5. Edit the virtual machine settings on all secondary nodes. Select the RDM hard disks and click Remove. Do NOT select "Delete files from datastore" for the secondary nodes.

    6. On the primary node, navigate to Add New Device > RDM Disk.

    7. Select the correct LUN based on the VML ID recorded in step 3. Correlating VML ID with naa ID in ESXi 7.0.x or later

    8. When prompted for the RDM file location, select the desired target datastore. Ensure the exact SCSI ID and Bus Sharing mode match the original configuration.

    9. On all secondary nodes, navigate to Add New Device > Existing Hard Disk.

    10. Browse to the target datastore and select the newly generated RDM VMDK created in step 6. Ensure the SCSI ID assignment is consistent for all nodes/vms and matches the original setup

    11. Power on the cluster nodes sequentially.

 

 

 

2. Updating Non-Shared pRDM disk (Standalone VMs)

  • Post-Expansion Rescan: Execute a storage rescan on the ESXi host, followed by a Guest OS disk rescan to expose the new capacity.

  • Expected UI Discrepancy: The Host LUN and Guest OS will report the correct size, but the vSphere Client will retain the original pRDM size because the RDM file does not dynamically update.

  • Required Remediation: Re-create the RDM disk during a maintenance window to correct the UI discrepancy and prevent clone or conversion failures (reference: vSphere 7 RDM to Shared VMDK Migration).

 

For standalone virtual machines using physical compatibility mode (pass-through) RDMs.

    1. Gracefully shut down the virtual machine where the RDM is currently attached.

    2. Document the RDM details for each RDM (Compatibility Mode, File path, VML IDs , SCSI Controller assignment)

    3. Remove the RDM hard disk from the configuration. Select Delete files from datastore to destroy the stale mapping file.

    4. Navigate to Add New Device > RDM Disk.

    5. Select the appropriate LUN from the list of available SAN disks.

    6. Select a datastore for the new LUN mapping file (typically the virtual machine configuration directory).

    7. Select Physical compatibility mode.

    8. Assign the exact SCSI device ID recorded in step 2.

    9. Save the configuration changes and power on the virtual machine.


 

 

3.) Virtual compatibility mode (vRDM)

    1. Expand the RDM LUN from the SAN side. If assistance is required contact the storage vendor.

    2. Perform rescan on the ESX and verify the new LUN size is observed.

    3. svMotion the RDM files or recreate the RDM mapping with the following steps to update the mapped disk size:

      • Shut down the Virtual machine

      • Document the RDM details for each RDM (Compatibility Mode, File path, VML IDs , SCSI Controller assignment)
      • Remove the RDM file from the Virtual Machine and delete from disk.

      • Re-add the LUN as an vRDM to the Virtual Machine
        (Navigate to VM Settings > Add > Hard Disk > RDM, select the scsiX:Y position that the RDM was using before)
      • Power on the VM 

    4. Perform a re-scan from the guest operating system 

 

 

Additional Information

After expanding a LUN, the VMware vSphere Web Client does not display the correct size of an RDM

Introduction to Raw Device Mapping in vSphere