{"id":255653,"date":"2016-10-25T18:28:49","date_gmt":"2016-10-25T10:28:49","guid":{"rendered":"http:\/\/blog.zhenglei.net\/?p=255653"},"modified":"2016-10-25T22:27:22","modified_gmt":"2016-10-25T14:27:22","slug":"local-storage-as-rdm","status":"publish","type":"post","link":"https:\/\/blog.zhenglei.net\/?p=255653","title":{"rendered":"Local Storage as RDM"},"content":{"rendered":"<h2><a href=\"https:\/\/kb.vmware.com\/selfservice\/microsites\/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1017530\">https:\/\/kb.vmware.com\/selfservice\/microsites\/search.do?language=en_US&amp;cmd=displayKC&amp;externalId=1017530<\/a><\/h2>\n<div>\n<p class=\"Para\">\n<p id=\"GUID-5C413B5E-947E-45B7-90D0-A651863DED18__d155e127\" class=\"Para\"><span style=\"color: #3366ff\"><samp class=\"codeph\">\/vmfs\/devices\/disks<\/samp><\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for local or SAN-based disks.<\/p>\n<p class=\"Para\"><span style=\"color: #3366ff\"><samp class=\"codeph\">\/vmfs\/devices\/lvm<\/samp><\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for <span id=\"GUID-5C413B5E-947E-45B7-90D0-A651863DED18__PRODUCTNAME_151DEB637A324DC9B6DDD7091D718B38\"><a name=\"GUID-5C413B5E-947E-45B7-90D0-A651863DED18__PRODUCTNAME_151DEB637A324DC9B6DDD7091D718B38\"><\/a>ESXi<\/span> logical volumes.<\/p>\n<p class=\"Para\"><span style=\"color: #3366ff\"><samp class=\"codeph\">\/vmfs\/devices\/generic<\/samp><\/span>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 for generic SCSI devices.<\/p>\n<\/div>\n<div><\/div>\n<div><\/div>\n<div>To configure a local device as an RDM disk:<\/div>\n<div>\n<ol>\n<li>Open an SSH session to the ESXi\/ESX host.<\/li>\n<li>Run this command to list the disks that are attached to the ESXi host:<span style=\"font-family: Courier New;font-size: small\"># ls -l \/vmfs\/devices\/disks<\/span><\/li>\n<li>\n<div>From the list, identify the local device you want to configure as an RDM and copy the device name.<b>Note<\/b>: The device name is likely be prefixed with <span style=\"font-family: Courier New;font-size: small\">t10.<\/span> and look similar to: <span style=\"font-family: Courier New;font-size: small\"><br \/>\n<\/span><span style=\"font-family: Courier New;font-size: small\"><br \/>\nt10.F405E46494C4540046F455B64787D285941707D203F45765<\/span><\/div>\n<\/li>\n<li>To configure the device as an RDM and output the RDM pointer file to your chosen destination, run this command:# vmkfstools -z \/vmfs\/devices\/disks\/<em>diskname<\/em> \/vmfs\/volumes\/<em>datastorename<\/em>\/<em>vmfolder<\/em>\/<em>vmname<\/em>.vmdkFor example:\n<p><span style=\"font-family: Courier New;font-size: small\"># vmkfstools -z \/vmfs\/devices\/disks\/t10.F405E46494C4540046F455B64787D285941707D203F45765 \/vmfs\/volumes\/Datastore2\/localrdm1\/localrdm1.vmdk<\/span><\/p>\n<p><b>Note<\/b>: The size of the newly created RDM pointer file appears to be the same size and the Raw Device it it mapped to, this is a dummy file and is not consuming any storage space.<\/li>\n<li>When you have created the RDM pointer file, attach the RDM to a virtual machine using the vSphere Client:\n<ol type=\"a\">\n<li>Right click the virtual machine you want to add an RDM disk to.<\/li>\n<li>Click <strong>Edit Settings<\/strong>.<\/li>\n<li>Click <strong>Add<\/strong>.<\/li>\n<li>Select <strong>Hard Disk<\/strong>.<\/li>\n<li>Select <strong>Use an existing virtual disk<\/strong>.<\/li>\n<li>Browse to the directory you saved the RDM pointer to in step 5 and select the RDM pointer file and click <b>Next<\/b>.<\/li>\n<li>Select the virtual SCSI controller you want to attach the disk to and click <b>Next<\/b>.<\/li>\n<li>Click <strong>Finish<\/strong>.<\/li>\n<\/ol>\n<\/li>\n<li>You should now see your new hard disk in the virtual machine inventory as <strong>Mapped Raw LUN<\/strong>.<\/li>\n<\/ol>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/kb.vmware.com\/selfservice\/micros &hellip; <a href=\"https:\/\/blog.zhenglei.net\/?p=255653\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[251,335,185],"class_list":["post-255653","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-esxi","tag-rdm","tag-vmware"],"_links":{"self":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255653","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=255653"}],"version-history":[{"count":3,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255653\/revisions"}],"predecessor-version":[{"id":255656,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=\/wp\/v2\/posts\/255653\/revisions\/255656"}],"wp:attachment":[{"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=255653"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=255653"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.zhenglei.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=255653"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}