vSphere: Convert RDM to VMDK and vice-versa on Windows VM with no downtime | Robin CM’s IT Blog

vSphere: Convert RDM to VMDK and vice-versa on Windows VM with no downtime

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.

  1. Here’s the current VM config:
    rdm 1
    Hard disk 2 is the data disk, and is the one we’ll be switching to a VMDK.
  2. Here’s the disk config in Windows:
    rdm 2
  3. 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:
    rdm 1-1
  4. Here’s the new disk in Windows Disk Management:
    rdm 3
  5. First you need to bring the disk online. Right-click the disk (where it says Disk 2, Unknown, 10.00GB, Offline) and choose Online.
  6. Now you need to initialise the disk, right-click again and choose Initialise:
    rdm 4
  7. 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…:
    rdm 5
  8. Select the new unallocated disk:
    rdm 6
    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:
    rdm 7
    Click Yes.
  9. The original disk and the new unallocated disk will be converted to dynamic disks:
    rdm 8
    And very shortly afterwards the mirroring process will commence:
    rdm 9
    How long this takes depends on the speed of your disks. In my experience there is very little CPU load generated by this process.
  10. Once the resynching process has completed both disks will show as Healthy:
    rdm 10
  11. Now it’s time to remove the mirror from the original disk. Right-click it and choose Remove Mirror…:
    rdm 11
    The Remove Mirror dialogue box will open, it selects the disk that you right-clicked but just confirm that it’s the right one:
    rdm 12
    Click Remove Mirror, then click Yes.
    rdm 13
  12. Now you’ll be running from the new VMDK disk, the old RDM disk will be showing as unallocated:
    rdm 14
  13. Before removing the disk from the VM I like to right-click it and put it offline:
    rdm 15
  14. Now edit the settings of the VM and remove the RDM disk:
    rdm 16
    Choose the “and delete files from disk” option as this will delete the .rdmp file.
  15. Finally, here is the view from Windows Disk Management showing the VM that’s now only seeing the (new) VMDK disk:
    rdm 17

I installed Veeam Monitor 5.0 (free version) which gives some convenient ways of displaying data from the vCenter server such as “top” list (e.g. top 5 busiest VMs, busiest LUNs). Whilst checking out the list of LUNs some had datastore names so were easy to identify, others were just listed along the lines of:

DGC Fibre Channel Disk (naa.60060160xxxxxxxxxxxxxxxxxxxxxxxx)

These are, I believe, LUNs that are Raw Device Mappings (RDMs). Not so easy to identify, even if you have both a Clariion and the EMC VSI Storage Viewer. However, what I just realised you can do to make things really easy is to rename the RDM LUNs as shown in the vSphere Client. Pick an ESX host, go to the Configuration tab, pick Storage, click the Devices button, then right-click and choose Rename.

So you can call them useful things like:

RDM LUN 123 <ServerName> D:

Which makes life so much easier. I did this to one whilst the VM it was using was up and running with no adverse effects. You get a Recent Task stating “Update SCSI LUN display name” – that DGC Fibre Channel Disk stuff is just that, a display name.

Probably stating the obvious to a lot of people, but there you go.

Реклама

Добавить комментарий

Заполните поля или щелкните по значку, чтобы оставить свой комментарий:

Логотип WordPress.com

Для комментария используется ваша учётная запись WordPress.com. Выход / Изменить )

Фотография Twitter

Для комментария используется ваша учётная запись Twitter. Выход / Изменить )

Фотография Facebook

Для комментария используется ваша учётная запись Facebook. Выход / Изменить )

Google+ photo

Для комментария используется ваша учётная запись Google+. Выход / Изменить )

Connecting to %s