Hackday

Well, Hackday was certainly an experience – the lightning strike and the roof vents opening was really quite disturbing! The lack of WiFi early on was a real pain as it made it very hard to connect projects, people and skills, so I suspect that most hacks were done by people who had arranged something beforehand, or who happened to meet at the bus stop.

Anyway, I got involved, along with Rob, Andy, Edward and James in something that turned into Fruitr – the search engine for unimaginative chefs. The basic idea was: take a picture of a piece of fruit, submit it to our site, and you’re rewarded with recipes that use that fruit. Rob and James worked on using a C++ image recognition library (not sure which one) from a Pylons Python app, which was driven by statistical matching against images from Flickr that are tagged with ‘fruitr’. Edward provided API access to his database of recipes courtesy of his site BigMunch, and I developed the testing web interface (later rolled into the main python app), and the email (in and out) interface. Andy had an abortive attempt at creating a J2ME app to talk to it, but was hampered by BlueTooth interference, buggy phones and poor mobile reception. We really had it all running by about midnight, and just a final polish was needed in the morning.

I spent much of Sunday looking at APIs to use with AMEE, without much luck or inspiration, then messed about creating an Apple Quartz Composer file that can be used as a screen saver. It grabs images tagged with ‘hackdaylondon’ from Flickr and presents them on faces of a bunch of rotating cubes. One face of the cubes displays live video (assuming you’re on a Mac Book? or similar which has a camera). There is also a spectrum-driven audio bar display, and a rotating Hack Day logo, which is also moved by sound. You can download the Quartz composer file.

I did the presentations for both hacks. For the Fruitr one I just ran out of time – sweaty fingers and trackpads really don’t mix. Because demoing a screen saver is not too hard, I dressed it up as a load of presentation faux-pas. I hope nobody thought it was for real!

Generally it was all pretty good fun, and it certainly had an excellent atmosphere, not to mention the endless supply of chocolate. Playing doubles tennis on the Wii at 2am was another highlight, along with the “non-showing” of Doctor Who…

I needed to leave before prizes and the Rumble Strips gig, so I missed out on that bit, and at the end of it all, I completely failed to grab a pink bean bag for Z. Oh well, I’ll be back next year!

3Ware RAID rebuilding

I’ve had the dubious honour of seeing some RAID failures and rebuilds lately. It’s the kind of thing that doesn’t get written about in the manuals very well, in particular what your RAID will report when it’s having trouble. So, here are a couple of examples from a 3Ware RAID controller using tw_cli software. This is what tw_cli /c4 show displays when we have a dead drive:

Unit  UnitType  Status         %RCmpl  %V/I/M  Stripe  Size(GB)  Cache  AVrfy
------------------------------------------------------------------------------
u0    RAID-1    DEGRADED       -       -       -       149.05    ON     -      

Port   Status           Unit   Size        Blocks        Serial
---------------------------------------------------------------
p0     OK               u0     149.05 GB   312581808     G2109NHG            
p1     DEGRADED         u0     149.05 GB   312581808     G20X1BWG            

So, we swap the drive, and it looks like this while rebuilding:

Unit  UnitType  Status         %RCmpl  %V/I/M  Stripe  Size(GB)  Cache  AVrfy
------------------------------------------------------------------------------
u0    RAID-1    REBUILDING     89      -       -       149.05    ON     -

Port   Status           Unit   Size        Blocks        Serial
---------------------------------------------------------------
p0     OK               u0     149.05 GB   312581808     G2109NHG
p1     DEGRADED         u0     149.05 GB   312581808     G209Y0HG

and after a little while…

Unit  UnitType  Status         %RCmpl  %V/I/M  Stripe  Size(GB)  Cache  AVrfy
------------------------------------------------------------------------------
u0    RAID-1    OK             -       -       -       149.05    ON     -

Port   Status           Unit   Size        Blocks        Serial
---------------------------------------------------------------
p0     OK               u0     149.05 GB   312581808     G2109NHG
p1     OK               u0     149.05 GB   312581808     G209Y0HG

There are plenty of obvious strings to match in this output (though there are many other reports available), so it’s a reasonable thing to base a monitoring script on.

It’s nice to see it actually work, and makes me extremely grateful that I bothered getting RAID n the first place. This would be a much unhappier post if I hadn’t.

Dell RAID firmware and lockfile on Ubuntu

Ian P. Christian ran into this problem a while ago:

On a seperate note, anyone know how to upgrade firmware using Dell’s software
on a non-RH system?

# ./RAID_FRMW_LX_R107404.BIN
/root
which: no lockfile in
(/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.3.6)
spsetup.sh: Cannot find utilities on the system to execute package.
Make sure the following utilities are in the path: sed lockfile tail rm mkdir
chmod ls basename
/root

‘lockfile’ is missing – whatever that is!

Lockfile just doesn’t seem to exist outside of RedHat (e.g. lockfile-progs on Debian doesn’t include it), however, you can of course find it on a RedHat system, and I happen to have one handy. I just copied the binary to my Ubuntu installation, where it appeared to run just fine, and allowed the firmware updaters to run ok. Thought someone might like to know.