+
  
SERVICES
  
PRODUCTS
  
CONTACT US

RDM mapping of local SATA storage for ESXi

by Chris Hall/December 1, 2016


Step 1
Once you had your drives installed, SSH to your ESXi box (now even easier in vSphere 4.1) and
go to the /dev/disks directory.There, if you perform a ls -l, you’ll see your drives listed:

/dev/disks # ls –l

-rw——- 1 root root 2013265920 Nov 2 22:17 mpx.vmhba32:C0:T0:L0

-rw——- 1 root root 4161536 Nov 2 22:17 mpx.vmhba32:C0:T0:L0:1

-rw——- 1 root root 262127616 Nov 2 22:17 mpx.vmhba32:C0:T0:L0:5

-rw——- 1 root root 262127616 Nov 2 22:17 mpx.vmhba32:C0:T0:L0:6

-rw——- 1 root root 115326976 Nov 2 22:17 mpx.vmhba32:C0:T0:L0:7

-rw——- 1 root root 299876352 Nov 2 22:17 mpx.vmhba32:C0:T0:L0:8

-rw——- 1 root root 1000171331584 Nov 2 22:17 naa.600508b1001c0d5c9380ee1ca76a0e61

-rw——- 1 root root 1000169537536 Nov 2 22:17 naa.600508b1001c0d5c9380ee1ca76a0e61:1

-rw——- 1 root root 1000204886016 Nov 2 22:17 t10.ATA_____ST1000DL0022D9TT153__________W1V0K1R4

-rw——- 1 root root 1000202273280 Nov 2 22:17 t10.ATA_____ST1000DL0022D9TT153__________W1V0K1R4:1

-rw——- 1 root root 1000204886016 Nov 2 22:17 t10.ATA_____WDC_WD10EACS2D00ZJB0__________WD2DWCASJ1866379

-rw——- 1 root root 1000202043392 Nov 2 22:17 t10.ATA_____WDC_WD10EACS2D00ZJB0__________WD2DWCASJ1866379:1

Ignore the instances of your drives which show them as VM stores (vm1.*****).
We want to look at the raw devices. Example is: t10.ATA_____ST1000DL0022D9TT153__________W1V0K1R4

Step 2

Now move to the /vmfs/volumes folder. Here you can see your existing local datastore(s).
If, like me, you had a solitary hard-drive, you’ll just see localdisk01 or whatever you chose to name the local datastore.

Step 3

Now we are going to use the vmkfstools utility to create our RDM’s. Remember that a RDM is just
another VMDK, but instead of the VMDK pointing to a xxx-flat.vmdk file (which is the actual virtual hard disk),
the VMDK points to our physical device. Being as we still need to create this VMDK file we need to save it somewhere.
Since we just have the one local datastore, we are going to create the RDM VMDK files in it’s root.

The following command creates the RDM VMDK for us:

vmkfstools -z /vmfs/devices/disks//.vmdk

In my personal example below, I am creating an RDM calledrdm_WD2DWCAVU0477582.vmdk and it is being
stored in the location/vmfs/volumes/localdisk01/ I chose the name of the VMDK to match the name of the serial
number of the physical drive (and what is shown in Step 1) to help with troubleshooting in the future when I
get an inevitable drive failure). You can call your RDM’s whatever you wish.

The name of the RAW device (t10.ATA____WDC_WD10EARS2D00Z5B1__________WD2DCAVU0477582 in my example)
you will have noted from Step 1 when you listed all local devices attached to your ESXi host.
You will want to copy the full device name as shown in Step 1 in to the vmkfstools command.

Example:
vmkfstools -z /vmfs/devices/disks/t10.ATA_____ST1000DL0022D9TT153
___________W1V0K1R4 /vmfs/volumes/localdisk01/rdmST1000DL0022D9TT153.vmdk

Step 4

Once you have repeated the steps for all of your local SATA drives, you can navigate to where
you created the RDM’s (in my case /vmfs/volumes/localdisk01) and perform an ls -l *.vmdk to
see the new VMDK’s you have created:

Don’t panic – the xxx-rdmp.vmdk files will reflect the size of the RAW devices they are mapping
to, but rest assured it will be taking no more space than a few bytes on your local disk!

Step 5

You can now add your RDM’s to an existing VM. vSphere doesn’t recognise this as a true RDM (to a SAN)
so you just browse the local disk datastore for the VMDK files that we created.

Edit the properties of an existing VM and click Add…

Step 6

Select Use an existing virtual disk and click Next >

Step 7

Click Browse. You now need to navigate your local datastore and select the VMDK’s that we
created in Step 3).

Once complete you will be shown a confirmation window. Repeat Steps 5 through 7 to add additional
RDM’s to your VM.

Step 8

You should now see your new Hard Disk’s in your VM and vSphere will correctly identify them as
Mapped Raw LUN.

You can now save your VM configuration. Your VM will now access the RAW SATA drives and be able to
use things like SMART to monitor its health.

NOTE: RDM mapping of drives stops the ability to take snapshots in vSphere Client. In order to snapshot, you must reverse this procedure.

Original post: http://blog.davidwarburton.net/2010/10/25/rdm-mapping-of-local-sata-storage-for-esxi/

← Back to News


Want to say hey or find out more?


If you're part of a small/medium or enterprise level we
can help address your IT Management needs.

Get in touch
    
View our Services
                
Make your data
work for you.
Contact Us

+61 438 661 875
inquiries@datacommand.com.au

     

Copyright © DataCommand Pty Ltd / Privacy Policy
ABN 98 205 256 068 / ACN 131 977 323