RDM provides a direct access to storage system to VM.
There are 2 type of RDMs.
- Virtual mode
- Physical mode
With Virtual mode, you can still take advantage of vSphere features such as snapshot and FT. For MSCS in vSphere there is a configuration guide available from VMware. I am planning to blog about this later.
Physical mode is required when you want to do clustering with a physical server or VM needs to do SAN maintenance tasks.
Configuring RDM
- Make sure that LUN is visible to the host that VM is running. In this demonstration, I will be using LUN 3 for RDM.
- Right click the VM then select “Edit Settings”
- On “Hardware” Tab click Add.
- Then select “Hard Disk”.
- Select “Raw Device Mapping” this will give you the list of available LUNs.
- Select a LUN which VM needs direct access.
- During this wizard, you can select to use either Virtual mode or Physical Mode.
- Verify that RDM Hard disk is added to this VM.
- In Guest OS, scan disk then it should detect a new Hard Disk.
- Verify that RDM mapping file is created.
Taking snapshot of VM with RDM
- Snapshot is supported feature with a virtual mode RDM. I want to go through how it is done.
- Take snapshot of VM as you do normally.
- Notice that a new delta VMDK file is created. So the new write request from now on is written to this delta VMDK file, that means theoretically you will not get the same write performance level as you do with when VM write directly to LUN. As disk write request need to be go through the virtualization layer. (VMware published the benchmark test between VMDK and RDM performance metric, and the result indicated that the performance is almost identical between VMDK and RDM. http://blogs.vmware.com/vsphere/2013/01/vsphere-5-1-vmdk-versus-rdm.html)
- If you try to take snapshot with physical mode RDM, you will get this message.
- I changed RDM to Physical Mode as you see below.
- You get an error. Be aware that the error message does not clearly indicate the cause of this error.