Wayne

ESXi RDM mapping local SATA storage

My college suggested I just create 4 VMDK’s on each 3TB disks I have, at point blank refused to create 4 3TB VMDK’s (one of each drive) so I set about figuring out how to create Raw Device Mappings (RDMs) of the local SATA drives. There were a couple of posts on the net that got me a little closer, but no guide/article had the whole thing down, so here it is.

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:

TODO [img]

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

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:

TODO [img]

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.

TODO [img]

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 called rdm_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. This is why the tech Gods created Copy n Paste! You will want to copy the full device name as shown in Step 1 in to the vmkfstools command.

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:

TODO [img]

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…

TODO [img]

Step 6
Select Use an existing virtual disk and click Next >

TODO [img]

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.

TODO [img]

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

TODO [img]

NOTE: One thing I forgot to show in the screen shots, is that you should create your RDM’s on a new SCSI controller! You do this by simply selecting a new SCSI ID starting with 1:x instead of 0:x. Existing VMDK’s should be on SCSI Controller 0. Your RDM’s should be on SCSI controller 1. Although my screenshot shows 0:3 this should read 1:3.

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.

ESXi 5 – First Thoughts

SSH configuration

To enable the local or remote ESXi Shell from the vSphere Client
1 Select the host, click the Configuration tab, and click Security Profile in the Software panel.
2 In the Services section, click Properties.
3 Select ESXi Shell and click Options.
4 Change the ESXi Shell options.
5 Click Start and stop with host. The change will take effect the next time you reboot the host.
5 Click OK.

To suppress informational warnings related to SSH and ESXi shell access and set the timeout:
Select the ESXi host in the Inventory.
Click the Configuration tab.
Under Software, click Advanced Settings.
Click UserVars.
Change the value of UserVars.SuppressShellWarning to 1.
Change the value of UserVars.ESXiShellTimeOut to 60
Click OK.


napp-it & openindiana

TBD

Allowing root ssh logins to Solaris machines:

There are currently 3 things you have to do to violate this security truism on openindiana:
1) Modify PermitRootLogin to yes in /etc/ssh/sshd_config.
2) Comment out the “CONSOLE=/dev/console” line in /etc/default/login.
3) Remove “;type=role” from the root entry in /etc/user_attr.

Setup your ZFS Server ready to use:
login as root and enter from home-directory
wget -O – www.napp-it.org/nappit | perl
reboot

Open a browser and enter http://serverip:81
If you do not know your serverip, go back to console, login and enter: ifconfig -a
If you need to manually start/ restart nappit in case of problems: /etc/init.d/napp-it restart [start,stop,restart]
Manage your server, create a datapool with menu pool, create datasets (ZFS Folder, partitions) with menu ZFS folder
and share these datasets from menu ZFS folder by klicking to the entry below SMB or NFS.

SSD – how to use a USB Stick as SWAP

To save my SSD’s on none laptop pcs, i use a cheap USB stick for my swap.
Read more »

our new home

This has been a long road…. We got the call today, our offer was the higest and accepted so we now have a new home :) Its a but far from home but its in the Alps so who cares?

Read more »

xbmc & mysql = multi-room sync

The primary reason I decided to use mysql is because I am always reinstalling my htpc for testing purposes. I am sick an tired of loosing all my watched flags, re-scraping with 20 threads still takes around 6 hours. I therefore use mysql and also store the thumbnails on a nfs share but now my laptop, tv and desktop xbmc look alike and one change is replicated throughout. I had a couple of issues hence documenting how its done.
Read more »

SickBeard & SABnzbs+

To get need to add blurb …. SickBeard & SABnzbs+ on QNAP 509p
Read more »

Run Ember Media Manager on Ubuntu

Ember Media Manager (aka EMM or Ember) is an open source movie and TV Show collections management tool which initially has been created to use with XBMC, but it contains Modules for a few media center application, moreover it should virtually support most of the other media center application out there. It empowers home theater enthusiasts to manage and organize their entire movie and TV Show collections. EMM will scrape movie and TV Show information (plot, cast, genre, studio, mpaa certification, etc) from various sites, together with posters, fanart, actor photos and even movie trailers. It also automatically extracts media meta data like resolution, codecs, audio and subtitle streams. EMM can also be used as a standalone movie organizer/cataloger, but the primary aim is to export all the data and images to a format which can then be imported into your favorite media center application. In order to achieve this, EMM stores all data and images in files which are saved next to the media files. Media center applications can pick up those files and import the information to their own internal database
Read more »

From iPhone to Android – Samsung Galaxy S i9000

Ok, so I did it. I went from my truly lovely iPhone (3Gs) to a Android phone. My choice is the Samsung Galaxy S i9000. So, how is the experience so far?

Read more »

Android emulator on Ubuntu

I have been considering ditching the iphone for a while now, to get the SDK EMU working was a must to see if I can get all the stuff I use on my iphone working in android (exchange support, train timetables etc.)This is the step-by-step instructions for how to install the Android emulator on Ubuntu 10.04. Read more »