This method will work for non-OS disks (so not your C drive), and will not require the server or application to go down during the process. You need a version of Windows that supports software RAID, which includes all versions of Windows Server and some Client versions too.
You had a good reason to use an RDM (or maybe you didn’t!) but have now changed your mind, or your needs have changed, or your storage infrastructure has changed (perhaps you’re replacing your old Clariion with a Tintri).
Or, maybe you provisioned a machine with a VMDK disk but now it’s gone live or the system performance needs have ramped up and you need to switch it to some dedicated spindles.
We’re going to be using Windows software RAID 1 to copy the data over, this is a block-level process so will transfer all the data and permissions across. It’s mirroring the entire NTFS filesystem, and it does it online. Clearly you’re going to take a bit of a hit in performance whilst the mirror is synchronising, but we’ll be breaking it again as soon as it’s finished. Your data disk will be converted to and remain as a Dynamic disk if it wasn’t already, but this effectively makes no difference (as long as you don’t want to access it from DOS or Linux).
So here we go, with screenshots (wow!). This is an RDM to VMDK conversion, but it’s the same process to go from VMDK to RDM.
- Here’s the current VM config:
Hard disk 2 is the data disk, and is the one we’ll be switching to a VMDK.
- Here’s the disk config in Windows:
- Make a note of the size of the disk that you’re going to transfer. As with all RAID 1, the disk you’re going to mirror onto must be the same size (or larger) than the existing disk. My disk is 10Gb, so I’m going to add a new 10GB VMDK disk to the VM:
- Here’s the new disk in Windows Disk Management:
- First you need to bring the disk online. Right-click the disk (where it says Disk 2, Unknown, 10.00GB, Offline) and choose Online.
- Now you need to initialise the disk, right-click again and choose Initialise:
- Now that we have our new disk ready for use, we can add it as a mirror to the original (RDM) disk. Right-click the RDM disk and choose Add Mirror…:
- Select the new unallocated disk:
Click Add Mirror.
If your original disk is currently a Basic disk you’ll be warned that the disk will be converted to a dynamic disk:
- The original disk and the new unallocated disk will be converted to dynamic disks:
And very shortly afterwards the mirroring process will commence:
How long this takes depends on the speed of your disks. In my experience there is very little CPU load generated by this process.
- Once the resynching process has completed both disks will show as Healthy:
- Now it’s time to remove the mirror from the original disk. Right-click it and choose Remove Mirror…:
The Remove Mirror dialogue box will open, it selects the disk that you right-clicked but just confirm that it’s the right one:
Click Remove Mirror, then click Yes.
- Now you’ll be running from the new VMDK disk, the old RDM disk will be showing as unallocated:
- Before removing the disk from the VM I like to right-click it and put it offline:
- Now edit the settings of the VM and remove the RDM disk:
Choose the “and delete files from disk” option as this will delete the .rdmp file.
- Finally, here is the view from Windows Disk Management showing the VM that’s now only seeing the (new) VMDK disk: