2010-12-02

My Android Phone as a USB stick

A few days ago, I was presented with a situation that I had a failed ESX Server which needed to be re-installed. How and what happened is another tory for another time though.

I wanted to get some information off of the ESX host, namely the configuration and the whole /var/log partition for the purposes of opening an SR with VMware to analyze the issue.

In this particular case I could only get into single mode on the ESX host, so I did not have any network connectivity to the outside.

So I thought that I might as well use a USB stick. Well life is not so simple. The only one I had on me was a 16GB Sandisk Cruzer. Now this USB stick was formatted in Windows, and of course because of the partition size - it was NTFS.

Now the process of mounting a USB stick on an ESX host is really very simple.

  1. Plug it in
  2. dmesg to get the identity of the drive that was just inserted (for example /dev/sda)
  3. mkdir /tmp/usb
  4. mount /dev/sda /tmp/usb

It is that simple.

I needed to copy off the files before I wiped and re-installed the host.

I thought - where else do I have an available USB stick? And Bling! Light bulb!! My phone!!!

  1. Plugged it into the host.
  2. Found the identity from dmesg
  3. Created the directory, mounted the device
  4. Copied off my files
  5. umount /tmp/usb

I now had the necessary files on my phone - which I could thereafter forward to the relevant people.

Handy to have a phone wherever you go, don't you think?