How to migrate a RDM backed disk to a new storage array
book
Article ID: 385983
calendar_today
Updated On:
Products
VMware vCenter ServerVMware vSphere ESXi
Issue/Introduction
When migrating from one storage array to a new array, disks that are created as RDMs need to have the data transferred off of the current backing LUNs and onto new LUNs located on the new storage array.
Environment
VMware ESXi 6.x VMware ESXi 7.x VMware ESXi 8.x
Resolution
Warning: Please ensure all steps are reviewed and followed accurately to ensure integrity of RDM data.
When migrating data from RDM LUNs to a new storage array, there are two primary options:
Option 1: Convert RDMs to VMDKs and Migrate
This process involves:
Converting the RDM into a VMDK.
Performing a Storage vMotion to move the VMDK to the new datastore.
Converting the VMDK back to an RDM.
Step 1: Converting the RDM to a VMDK
Converting a Virtual RDM
Virtual mode RDM data can be converted to a VMDK disk with Storage vMotion by selecting the Disk Format from Advance View. This operation can be performed when the VM is either in a powered on or powered off state.
Initiate a Storage vMotion of the VM with Virtual RDM disks attached.
Example VM
In the below example, Hard Disk 3 (1 TB) which is a RAW LUN is attached to the VM as a Virtual compatibility RDM.
Use the Advanced option in the Storage vMotion wizard
Change the disk format for the RDM disk by using the "Thick" or "Thin" option from the Disk Format drop down
Note: If the destination format is not changed to thick or thin provisioned for an RDM in the advanced section of the migration wizard, only the RDM mapping file will be migrated to the destination datastore.
Select the destination datastore and proceed with the Storage vMotion.
Once the Storage vMotion task is completed, the Virtual RDM disk will be converted to a VMDK disk.
Converting a Physical RDM
Method 1: VM Powered Off
Power off the VM.
Initiate a Storage vMotion of the VM with the Physical RDM disks attached.
Use the Advanced option in the Storage vMotion wizard
Change the disk format for the RDM disk by using the "Thick" or "Thin" option from the Disk Format drop down
Note: If the destination format is not changed to thick or thin provisioned for an RDM in the advanced section of the migration wizard, only the RDM mapping file will be migrated to the destination datastore.
Select the destination datastore and proceed with the Storage vMotion.
Once the Storage vMotion task is completed, the Physical RDM disk will be converted to a VMDK disk.
Method 2: VM Powered On
Remove the RDM disk from the VM, and delete it from disk to ensure that the RDM mapping file is deleted. This will not delete the data in the RDM.
Re-add the RDM LUN as a Virtual RDM disk: Virtual Machine -> Edit Settings -> RDM Disk -> Add.
Select the RAW LUN to add it as Virtual RDM disk and click OK.
Select the Compatibility Mode as "Virtual" and click OK.
Once the same RAW LUN is added back as Virtual RDM, initiate a Storage vMotion of the VM with the new Virtual RDM disk attached.
Storage vMotion the Virtual RDM disk by changing the Disk Format to either Thick or Thin to convert the RDM to a VMDK.3
Use the Advanced option in the Storage vMotion wizard
Change the disk format for the RDM disk by using the "Thick" or "Thin" option from the Disk Format drop down
Note: If the destination format is not changed to thick or thin provisioned for an RDM in the advanced section of the migration wizard, only the RDM mapping file will be migrated to the destination datastore.
Select the destination datastore and proceed with the Storage vMotion.
Once the Storage vMotion task is completed, the Virtual RDM disk will be converted to a VMDK disk.
Step 2: Performing a Storage vMotion to move the VMDK to the new datastore
After the RDM has been converted to a VMDK, perform another Storage vMotion of the VMDK to the new storage.
Step 3: Converting the VMDK back to an RDM
To convert the VMDK disk back into an RDM, perform one of the following commands for either Virtual or Physical compatibility mode.
Note: The identifier value represents the value recorded in Step 1: Converting the RDM to a VMDK.
Example vmkfstools -i olddisk.vmdk -d rdmp:/vmfs/devices/disks/naa.############################# /vmfs/volumes/TestDatastore/TestVM/rdmdisk.vmdk
Option 2: Clone RDM to New RDM
This process involves directly cloning the data from an existing RDM to a new RDM on the target array using vmkfstools.
Prerequisites
To perform the clone of the RDM to a new RDM on the new storage array, collect the following information
Descriptor file of the source RDM
Example /vmfs/volumes/olddatastore/vmname/vmname.vmdk
Identifier of the target LUN
Example /vmfs/devices/disks/naa.#############################
Target descriptor file path (the identifier of the LUN that will be used to write the RDM data to; this must be as large or larger then the LUN on the original array.)
Example /vmfs/volumes/newdatastore/vmname/vmname.vmdk
Clone Commands
Run the appropriate command for either the Virtual or Physical compatibility mode.