A short story about power and spark plugs

So I’m building a storage server. It’s got a very nice supermicro x9sri-f-o motherboard with IPMI and it’s got a redundant PSU.

Last Friday I got all the parts together and started tinkering. Upgraded the BIOS and IPMI firmware. Installed FreeBSD, turned the power off at the PSU’s and went home for the weekend.

Fast-forward to monday, and I’m feeling just a little bit lazy and thought to myself “I’m not going to go into the room next door to boot the server, I’m going to boot it via IPMI for fun and profit”.

So I open the IPMI control panel in my browser, and click “power on”. Nothing happens. “That’s odd” I thought “must be an issue with the firmware I updated”.

I glanced at the README.doc and found a difference between the way I updated the firmware. “Doesn’t work without this” it said.

I re-flashed the firmware and waited for the IPMI card to reboot and then clicked the “Power on” button.

Nothing.

“Odd. Very odd.”

I went in to the server to give the power button a push manually.

Nothing.

I looked at the PSU’s. They had power, but was not switched on. Flipped the switches and power came on.

I’m not really sure how that happened, but I figure that the PSU’s have fairly large capacitors on the internal circuit and that had enough power left to keep the IPMI working.

Always check the spark plugs.

Converting a south 0.7 migration back to 0.6

I had a minor fight with south earlier today, where someone had created a migration with south 0.7, and I needed it to work with south 0.6.

Needless to say that it would be a pain to manually convert it from the better 0.7 format back into 0.6, so I wrote a fairly small python script, that does the job.

Continue reading

iptables throughput on Soekris net4801

Earlier today I had to find out what the capacity of a soekris net4801 running openwrt.

Using a fairly normal rule set, it can forward 51.8 Mbits/sec which is alright for a 266 MHz processor.

Sadly for me, we’ll be getting a 100 Mbit fiber optic connection at work in a few months, so I guess I’ll have to move to a net5501 unit in order to max out the connection.

Continue reading

How to resize ext3 partition on LVM

From time to time I have to resize the file systems on various systems which are primarily using ext3 on top of LVM.

Resizing such an ext3 file system is not a complex task at all. For starters, make sure you shut the domU down (or unmount the file system – unless you feel brave enough to do an online resize, in which case you should not be reading this).

Continue reading

Building postgresql8x and psycopg2 for x86_64 and i386 on Snow Leopard (OS X 10.6)

I’ve recently installed Apple’s new 64 bit OS Snow Leopard, on my work computer. I use postgresql extensivly together with python, and usually use apple’s bundled python2.5 for working with django.

As the daredevil I am, I wanted to recompile all my macports to use the new 64 bit system, and therefore deleted them all, and made a fresh install of macports. After building the postgresql81 port, I was about to build the psycopg2 python postgresql driver for python 2.5, when it gave me a warning about not being able to find some symbols in the postgresql library it had linked to. I quickly realized that this might be an architecture problem, and sure enough, it turns out that python 2.5 is a i386/ppc and python 2.6 is x86_64/i386/ppc binary, as can be seen here:

Continue reading

Managing multiple AWS identities

I’m running multiple different project on AWS which was so much of a pain to use, as I often find myself having to use the identity of project-a together with the official amazon ec2 tools.

To help myself manage the multiple identities, I wote a set of bash functions, called:

  • aws_load <config-name> – loads configuration from config-name
  • ec2ssh <instance-number-in-ec2din-list> – ssh’s into a given instance, with the root key
  • ec2scp – a shorthand for scp -i <keyfile>

    Continue reading