{"id":478,"date":"2009-10-16T10:27:56","date_gmt":"2009-10-16T15:27:56","guid":{"rendered":"http:\/\/www.gamescheat.ca\/?p=478"},"modified":"2019-09-04T19:57:40","modified_gmt":"2019-09-05T00:57:40","slug":"how-to-identify-and-compile-an-rdm-to-lun-mapping-list-for-vmware-esx-30","status":"publish","type":"post","link":"http:\/\/www.gamescheat.ca\/?p=478","title":{"rendered":"How to identify and compile a RDM to LUN mapping list for VMware ESX 3.0"},"content":{"rendered":"<div style=\"float: right;\"><div style=\"margin: 15px 15px 15px 15px\";><script type=\"text\/javascript\"><!--\ngoogle_ad_client = \"pub-3319935785736004\";\ngoogle_alternate_color = \"FFFFFF\";\ngoogle_ad_width = 180;\ngoogle_ad_height = 150;\ngoogle_ad_format = \"180x150_as\";\ngoogle_ad_type = \"text_image\";\ngoogle_ad_channel =\"\";\ngoogle_color_border = \"cccccc\";\ngoogle_color_link = \"cc0000\";\ngoogle_color_bg = \"ffffff\";\ngoogle_color_text = \"000000\";\ngoogle_color_url = \"008000\";\n\/\/--><\/script>\n<script type=\"text\/javascript\"\n  src=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\n<\/script><\/div><\/div><p>Below is a copy of the article from VMware knowledge base.  It explains the steps to create the Raw Decive Mapping to Logical Unit Number.  But is you have a VMserver with many virtual clients and LUNs attached, then this manual procedure can take hours.  I have created scripts to <a href=\"http:\/\/www.gamescheat.ca\/2009\/10\/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30\/\">automate<\/a> this procedure and email the mapping to me, here is the link to the article, <a href=\"http:\/\/www.gamescheat.ca\/2009\/10\/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30\/\">http:\/\/www.gamescheat.ca\/2009\/10\/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30\/<\/a>. <\/p>\n<p>******************************<br \/>\nVI Client Might Incorrectly Display RDM LUNs in Physical Compatibility Mode as Available Disk when Storage Virtualization Devices Are Used<\/p>\n<p>Details<br \/>\nIn an environment with storage virtualization devices (SVD), VI Client might incorrectly display RDM LUNs, which are in physical compatibility mode, as available disk in the Add Storage wizard. This situation can potentially cause data to be overwritten.<\/p>\n<p>For more information on VMware\u2019s support for SVD, see the Storage Compatibility Guide at www.vmware.com\/pdf\/vi3_san_guide.pdf.<\/p>\n<p>Solution<br \/>\nAs a workaround for this issue, you must take special caution to ensure an empty LUN is selected for VMFS volume creation. The following instructions show you how to indentify and compile an RDM-to-LUN mapping list, which you should use to identify LUNs in use so they are not accidentally reused and overwritten.<\/p>\n<p>If the underlying storage of your ESX Server system is virtualized with SVD technology, follow these procedures to recreate the RDM mapping files for the virtual machines. The procedure is broken into two parts:<\/p>\n<p>Steps to Perform Before Virtualizing the LUNs<br \/>\nSteps to Perform After LUN Virtualization<br \/>\nSteps to Perform Before Virtualizing the LUNs<\/p>\n<p>On an ESX Server host that has access to the RDMs and their corresponding LUNs (on the back-end storage), run the following commands to identify the physical LUNs mapped by each RDM: <\/p>\n<p>Identify all RDM disks by running the following command in each of the virtual machines directories:<\/p>\n<p>#ls \/vmfs\/volumes\/x\/y\/*rdm*.vmdk | grep -v flat <\/p>\n<p>Here, x is the VMFS volume and y is the virtual machine directory. <\/p>\n<p>For example: <\/p>\n<p># ls \/vmfs\/volumes\/4*\/*\/*rdm*.vmdk | grep -v flat<br \/>\n\/vmfs\/volumes\/46fcea8f-77873c31-e474-001aa01e7ce5\/solaris10\/solaris10-rdmp.vmdk<br \/>\n\/vmfs\/volumes\/46fcea8f-77873c31-e474-001aa01e7ce5\/DS_PT_SLES8\/tt-rdm.vmdk <\/p>\n<p>Based on the output from the above command, identify the corresponding LUN to which the RDM disk is mapped after removing -rdmp or -rdm from the file name: <\/p>\n<p>#vmkfstools \u2013q \/vmfs\/volumes\/x\/y\/xxx.vmdk <\/p>\n<p>In the above example, you can determine the LUN to which the RDM maps: <\/p>\n<p># vmkfstools -q \/vmfs\/volumes\/46fcea8f-77873c31-e474-001aa01e7ce5\/solaris10\/solaris10.vmdk <\/p>\n<p>Disk \/vmfs\/volumes\/46fcea8f-77873c31-e474-001aa01e7ce5\/solaris10\/solaris10.vmdk is a Passthrough Raw Device Mapping <\/p>\n<p>Disk Id: vml.020000000060050768019002077000000000000005323134352020 <\/p>\n<p>Maps to: vmhba1:0:0:0 <\/p>\n<p>This output clearly shows solaris10.vmdk is mapped to LUN vmhba1:0:0:0. <\/p>\n<p>Run the vmkfstools \u2013q command for each RDM disk you identified in step 1. Keep track of all the LUNs to which the RDM disks map. Make sure they do not get selected as a target for VMFS volume creation.<\/p>\n<p>Note: If you originally included \u201crdm\u201d in the name for the RDM file (for example, Solaris10_rdm.vmdk), the above output might also show file names as Solaris10-rdm-rdmp.vmdk or tt_rdm-rdm.vmdk. You only need to remove the last -rdm (including the dash) from the file name when you use it with the vmkfstools -q command.<br \/>\nSteps to Perform After LUN Virtualization<br \/>\nPerform the following steps after the LUNs have been virtualized and presented to the ESX Server hosts according to the storage vendor\u2019s VI3-specific documentation. <\/p>\n<p>Power off all virtual machines. <\/p>\n<p>Present the virtualized RDM LUN to the ESX Server host and perform a rescan. <\/p>\n<p>Locate the virtual machine that has the RDM mapped to the back-end LUN (which is now virtualized). <\/p>\n<p>Remove the stale RDM pointer from the VMFS3 volume. <\/p>\n<p>Recreate the RDM to point to the virtualized LUN. Refer to the LUN-to-RDM correlation results in the first section, Steps to Perform Before Virtualizing the LUNs, above. Make sure to use the same RDM type as the original (that is, Virtual Mode or Physical Mode). <\/p>\n<p>Repeat steps 1-5 for each RDM that was previously mapped to back-end storage. <\/p>\n<p>Compile a list of RDM files and their corresponding LUNs (LUN-to-RDM correlation). Update this list whenever you add a new RDM.<br \/>\nWarning: As described in the Details section (above), after you have completed the above steps for all RDMs, LUNs that are already used as RDM might show up as available disk when the Add Storage wizard is launched in the VI Client. If the virtual machine accessing the RDM is in a powered off state, and the RDM LUN is mistakenly selected as the disk for VMFS volume creation, then data loss could occur.<\/p>\n<p>Caution: Always ensure an empty LUN is selected for VMFS volume creation. Prior to selecting the LUN in the wizard, use the LUN-to-RDM correlation list that you compiled in Steps to Perform After LUN Virtualization (above) to verify that the LUN you are going to use is not on the list.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Below is a copy of the article from VMware knowledge base. It explains the steps to create the Raw Decive Mapping to Logical Unit Number. But is you have a VMserver with many virtual clients and LUNs attached, then this&hellip;<\/p>\n<p class=\"more-link-p\"><a class=\"more-link\" href=\"http:\/\/www.gamescheat.ca\/?p=478\">Read more &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[19],"tags":[61],"_links":{"self":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/478"}],"collection":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=478"}],"version-history":[{"count":6,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/478\/revisions"}],"predecessor-version":[{"id":670,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=\/wp\/v2\/posts\/478\/revisions\/670"}],"wp:attachment":[{"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=478"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=478"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.gamescheat.ca\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=478"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}