Apr 242013
 

This is a post of how helpful people are in the OpenStack community. If you were to visit the lobby of Hilton Executive tower in Portland last Wednesday, you would have seen me and a couple other people making the cloud of USB sticks.

Last Thursday, I gave my first ever conference talk/tutorial at the OpenStack Summit. The goal of my tutorial was to show how to use Razor, and how easy it is to install OpenStack with it. There were a couple issues I had to solve for this tutorial: what is the fastest way to get people to have a running Razor on their system and how to do so over not very reliable internet connection.

To solve the first issue, I created a VM that had all the necessary components installed on it, everything from Razor to Chef server. Just to give some perspective, it takes just over an hour to download and setup all the major components, including loading cookbooks for OpenStack installation and loading them to the Chef server. Considering that my talk needed to be under 1 hour, live install would not have been a good option.

After I got to the conference, I realized that there is no way I can share my 3.6 GB VM over the intertubes! I probably should have timed downloading the VM over the regular (not on infinite work bandwidth) internet, to realize that it was a bad idea anyways. Luckily for me, I got some help. First, I talked to the Rackspace Private Cloud training team, and they provided me with wireless routers for setting up local network for sharing VM over internal network. The day of the talk, super helpful @Thediopter actually configured the routers for me, in record time! This local network allowed me to serve the file off my laptop while I was giving the talk.

Since I was not sure wireless local network was going to work, I decided that I needed to put my VM on USB sticks. I knew that eNovance is giving out USB drives at their vendor booth. I shared my problem with them, and they happily supplied me with a lot of USB drives. Going by the Suse booth, I noticed that they too had USB drives, and I asked if I could have some for my talk. They gladly supplied me with additional drives.

By now, I had 45 drives, and a limited amount of time to copy my VM to them. Surely there is a better way to copy something to a USB drive than one at the time. As I was walking by the Piston booth, I was asked about the USB sticks. I repeated my story of needing to make lots of USB sticks, and what do you know? I walked away with a 10 port USB hub!

Back at the hotel lobby, the baking of the USB sticks began. My coworkers helped me out with a little script to run on my mac to copy, and all I have to say, I am not sure where I would have been without them!

So, if you ever find yourself with a mac, USB hub, and lots of USB drives, this is how you copy to them on a command line. First, make sure you are root, then:

for i in `jot 10 2`; do asr --noverify --erase --noprompt --source /dev/disk1s1 --target /dev/disk${i}s1 & done

What this script is doing: copying from /dev/disk1s1 to all the other disks (USB drives), erasing destination, and does not verify anything. This process may take a while, but it is still faster than copying one at the time.

So, thanks again to everyone that helped out in the making of the USB cloud!

usbcloud1

Curious what was on the USB drives? This.

-eglute

 Posted by at 6:17 pm

  5 Responses to “The Making of Cloud of USB Sticks”

  1. Hello! It is I, @Thediopter!

    This is a fun article, and I had fun helping you get this talk going. I have one comment though that might help with future copying.

    On OSX, when you’re trying to talk directly to a block device as fast as possible, there exists a special version of the device file which starts with ‘r’, i.e., /dev/rdisk1. It provides “raw” access, and is a heck of a lot faster than hitting /dev/disk directly. Just a heads up!

    :D

    • That is good to know! Interestingly, diskutil was showing them as /dev/disk1, but asr couldn’t find them by that name. “mount” command showed them as “/dev/disk1s1″, whatever that s1 means, and that worked with asr command.

  2. Totally agrre, the community is what makes OpenStack tic!

    Missed your talk at Summit, anyway I can download the image.

    Or may be just pas on the instruction and I will assemble.

    Thx,

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>