ESXi and RDM

I think I have finally made some headway on my ESXi experiment. I have all the VMs and ESXi running on my RAID5 array. It all works great and the speed is not too bad but there is not enough space for data storage. I figured I could put a couple of 500GB drives and do a mirror. I had two possible options once I got ESXi seeing the SATA drives. One, partition them and make a huge virtual disk on each of the VMFS formatted disk. Then mirror using Windows 2008 for basic data redundancy. The other option was to set the drives up for ‘Raw Device Mapping’ (RDM) access. That involves mapping each drive to a placeholder VM disk. Then, all you do is add them to the VM you want to use them for. I am doing some major testing right now to make sure the controller and ESXi do not have any issues. The controller I am using has a SiI 3512 chip on it. It only supports SATA1 but for a file server you do not need as much on speed as you need it for reliability. Anyway, the two drives I am using for the RAID1(mirror) array are Western Digital Enterprise SATA2 drives.

To get the RDM thing going you first have to get to the local console. Hold down the ‘Alt’ key and push ‘F1’. It will show you what looks like a linux type command line interface. Once you have done that type in ‘unsupported’, without the quotations of course, and hit enter. Then it will ask for the password. Put in your root password and hit enter. It will drop you to the command line. It runs a mini-distribution of Linux called Busybox. When you are at the command line you need to run this command:

esxcfg-vmhbadevs

It will show you the list of physical drives names and what LUN ID they have. You need the physical ID, which is really long usually. Once you have that run this command.

cd /vmfs/volumes/datastore1

If you named your datastore something else then put that name in place. I would then create a directory in there and call it something meaningful as it will help keep the datastore structurally clean. Below is the command I ran, minus the really long number as I did not feel like typing the entire thing out.

vmkfstools -r /vmfs/devices/disks/vml.longnumberhere whateveryouwanttocallthedrive.vmdk

At that point you just need to go to the Remote Administration interface and then bring up the VM configuration and add the drive like you would when you wanted to add an existing virtual disk. Pay no mind to what size it says it is. The OS that you are binding the drive(s) to should know the correct size.

Leave a Reply

Your email address will not be published.