{"id":95,"date":"2016-04-24T21:48:18","date_gmt":"2016-04-25T02:48:18","guid":{"rendered":"https:\/\/servertricks.com\/?p=95"},"modified":"2016-05-03T20:12:46","modified_gmt":"2016-05-04T01:12:46","slug":"raw-device-mapping","status":"publish","type":"post","link":"https:\/\/servertricks.com\/index.php\/2016\/04\/24\/raw-device-mapping\/","title":{"rendered":"Raw Device Mapping"},"content":{"rendered":"<p>SSH into your ESXi host, if you do not have SSH enabled. You will need to enable it first, that is not covered here.<\/p>\n<p>Start by:<\/p>\n<p><code>$ cd \/dev\/disks<br \/>\n$ls -l<\/code><\/p>\n<p>This will show you all of the disks that ESXi currently sees along with their raw device name. Find the disk(s) you are looking for and copy their ID. <\/p>\n<p>For example:<\/p>\n<pre>t10.ATA_____MB0500EBZQA_____________________________Z1M04166____________<\/pre>\n<p>Next we need to tell ESXi where to mount this file. This will require you to know the name of your current datastore.<\/p>\n<p>Run the following commands to find your datastore:<\/p>\n<p><code>$ cd \/vmfs\/volumes<br \/>\n$ ls -l<\/code><\/p>\n<p>For example:<\/p>\n<pre>datastore1<\/pre>\n<p>Using the examples above I would run vmkfstools like so:<br \/>\n<code>$ vmkfstools -z \/vmfs\/devices\/disks\/t10.ATA_____MB0500EBZQA_____________________________Z1M04166____________ \/vmfs\/volumes\/datastore1\/disk1.vmdk<\/code><\/p>\n<p>The command above would mount disk &#8220;t10.ATA_____MB0500EBZQA_____________________________Z1M04166____________&#8221; on &#8220;datastore1&#8221; with the name &#8220;disk1.vmdk&#8221;<\/p>\n<p>Next we need to give the RDM drive to a VM.<\/p>\n<p>Open up the vSphere client and right click on the Virtual Machine.  Click \u201cEdit Settings\u201d<\/p>\n<p>Click \u201cAdd\u201d and then \u201cHard Disk\u201d then \u201cNext\u201d<\/p>\n<p>Click the \u201cUse Existing Hard Disk\u201d radio button and click \u201cNext\u201d<\/p>\n<p>Click the \u201cBrowse\u201d button and open the datastore your mapping file resides in.<\/p>\n<p>Select the mapping file and click \u201cNext\u201d<\/p>\n<p>From the Virtual Device Node ensure that your mapping file is mapped onto a different SCSI controller than the existing datastore. In my case I used SCSI 1:0<\/p>\n<p>Your added RDM should say &#8220;Mapped Raw LUN&#8221;<\/p>\n<p>You may now initialize the drive with the VM and start using it!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>SSH into your ESXi host, if you do not have SSH enabled. You will need to enable it first, that is not covered here. Start by: $ cd \/dev\/disks $ls -l This will show you all of the disks that ESXi currently sees along with their raw device name. Find the disk(s) you are looking [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[12,13],"class_list":["post-95","post","type-post","status-publish","format-standard","hentry","category-esxi","tag-5-5","tag-6-0"],"_links":{"self":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/95","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/comments?post=95"}],"version-history":[{"count":3,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/95\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/posts\/95\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/media?parent=95"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/categories?post=95"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/servertricks.com\/index.php\/wp-json\/wp\/v2\/tags?post=95"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}