Category: Alaric

Server upgrade (by )

I host a heap of web sites (including this blog), email domains, source control repositories, mailing lists, and various other things (such as one of the official Chicken Scheme egg mirrors, a Jabber server, and an IRC server with bots). I do this with a combination of dedicated server hardware which I hire space, power, and connectivity for in London for the primary stuff, and a virtual private server in California for backup services and rapid DNS lookups from the USA.

This is a costly hobby, but it gives us a platform upon which to do interesting things, and lets me help other people out with free hosting; as I need to put in the time and money to run the infrastructure anyway, the spare capacity on it is essentially free.

The most demanding part is server upgrades. Periodically, I buy a new physical server, install it with all the software it will need, put it alongside the current hardware in the data centre, and transfer the data and settings across and configure everything that needs configuring on the new server until it works just like the old, then switch them over. I do this when the current hardware is getting full or overloaded or unreliable or just plain out of date, as I don't trust in-place updates of the core system software - it's too easy to end up with NOTHING working.

However, this has been overdue for several years. I bought the new hardware (this time, with a contribution from my biggest user of disk space!) nearly two years ago, and installed it in the rack nearly a year ago, but only yesterday did I get the chance to spend a day sitting next to it in London coaxing it into readiness then doing the final switch over...

It didn't go entirely to plan, of course. I'd previously written a script that used rsync to copy all the user data over; the first time I ran it it copied everything, then subsequent runs only had to copy the differences. The idea was that I would have less down time while I copied the data from the old server to the new (which has to happen with both servers offline, so that nothing can change during the copying process) if there was only the final changes to copy. However, I realised that the accounts of my biggest user of disk space weren't covered by my script as they had been slightly hacked to accomodate their growth.

And the whole process of moving the software configuration was made more complex by the fact that I had previously been running two servers in a kind of symbiotic cluster, in order to meet the load with the hardware of the time. Nowadays 64-bit multi-core behemoths with gigabytes of RAM are cheaply available and well supported by NetBSD, so everything can be done on one box. This is a much simpler setup, but it means that I had to undo the complexity of the previous setup when transferring everything across!

I ran into a few other unexpected problems, too; I noticed that the clock on the new server was terribly wrong, despite it running NTP. I did a manual ntpdate, and then just in case, another to check that it was now only a few millisecond out - but it was already half a second out again! It quickly became apparent that the clock was ticking about one second in every two seconds of real time...

Looking in the output of sysctl -a, it became apparent that I had a choice of time counter sources: it was using the TSC, but I also had an HPET, a clock interrupt, an APIC clock, and the good old 8254; my machine was brimming with alternate clocks. I tried switching to the HPET with sysctl -w kern.timecounter.hardware=hpet0 and suddenly time was running as expected. I popped that in /etc/sysctl.conf so it would come back on reboots, resynched the clocks, and everything's been fine since. I can only presume that the kernel was reading the CPU clock speed wrong, or some kind of dynamic clock scaling is happening, so that the (CPU-based) TSC wasn't having its ticks converted to seconds properly.

I had a big setback with the email setup, as NetBSD comes with Postfix as part of the base system but I wanted a more recent version from packages, but I ended up getting tangled with what version was being run in various situations and what configuration file was being used, which took a while to sort out. And then of course there's Mailman, the mailing list server software, which is complicated by needing write access to its filesystem-based state when run from the mail system (for incoming mail) or the Web server (for the web interface), so uses lots of setgid binaries and group-writable files and the like, and so always takes a lot of fiddling to get working properly.

But... I did it. And so, having completed my tax returns earlier this year (which is what freed up the time to prepare for and do this mission), I have now gotten rid of all the major obligations that have been hanging over me for the past few years.

I still need to visit London again - I've left the old servers running alongside the new in case I missed any files that need to be transferred; I'll give people a chance to check I've not missed any of their stuff before remotely powering them down (to save electricity, which I pay for) and coming in to take them (to free up the space). But that's relatively easy!

A week off (by )

I took last week off of work, to recuperate from the house moving and to spend some time setting up my workshop. That sounds like more house moving, but it's without deadlines, and it's taking time to sort out my own space the way I like it. So it's relaxing and settling! I did a few other things, too. I chose the Half Term week for my holiday, as no work AND no school runs would mean I didn't need to get up in the mornings, and so I could spend more time with our children. Sarah's teenaged (well, 12 and 14) cousins visited for half term, too, and were eager to help out with interesting DIY projects!

  • We laid concrete in the fireplace, to bring the base level with the rest of the floor so we can tile it to make a nice hearth. We mixed the concrete by hand, and leveled and tamped it into the space, then checked back on it over the next few days until it was hard.

  • We laid mortar along a messy and dirt-accumulating crevice in the workshop floor, to level it. This was fairly similar to the laying of concrete, except using sand rather than all-in ballast as the aggregrate.

  • Painted most of the workshop floor with the special concrete floor paint I bought from the excellent and helpful Bailey Paints. We can't paint over the bit we laid mortar on until it's cured sufficiently, which will take a few months, so that bit can wait.

  • Constructed and arranged the furniture in the workshop. Shelving had to be assembled, and my famous double-deck electronics desk put back together!

  • Mounted my tool board on the workshop wall. It's happy in its new home.

  • Mounted and wired in the Caffreys sign. Years and years ago Sarah and I, with my friend Matthew, witnessed a pub being redecorated, and the illuminated Caffreys sign was being chucked into a skip. We asked if we could take it, and it's followed us ever since then, being used as a rather unweildy novelty lamp; now we have a place we can mount it properly to the wall, so it's mounted on the outside of my workshop, with the cable run properly through the wall so it can be plugged in inside.

  • Mounted and wired in the router, power strip, switch and UPS. We have a nice new cupboard under the stairs, built for us by Sarah's brother David. I've mounted the "core network" devices directly to the inside wall of the cupboard, and will mount one of my patch panels there when I run CAT5 to sockets around the house (and a trunk to the workshop, where my second patch panel will be installed in the comms cabinet - when it's bolted to the wall; we bought the bolts for that, but didn't get around to it).

  • Gone climbing (with Jean and Sarah's cousins) at The Warehouse in Gloucester, which has excellent facilities for children and young folks. Everyone had a good time.

  • Worked more on my scripts to migrate the massive amount of data from my current hosting setup, love.warhead.org.uk, to the new hardware. Love currently runs on a pair of servers, fear and infatuation, whose responsibilities will be taken over by one, just called love. This will be a simpler and more reliable setup, which will be easier to migrate in future, and will (touch wood) crash less. Oh, and it gives us much more disk space.

The love migration scripts were about the only stuff I did with computers all week. I'd have liked to have done more (I have some Ugarit, R7RS, and Chicken Scheme TODOs), but the presence of teenagers who would get bored if they didn't have exciting DIY tasks to do meant I focussed on things I could do with them. This isn't a problem, as in only one week I couldn't do ALL my projects; even focussing on DIY, we didn't get it all done 🙂

However, I think I need to take time off to relax like this more often. Mainly because, despite not needing to be up in the morning, I kept waking up at around 6am and not being able to get back to sleep. And once I woke up from a nightmare that I was neglecting all my responsibilities and everyone who depended upon me was being let down. These are not healthy signs...

Tax returns (by )

Many years ago, around 2000, I formed a limited company. A bunch of us wanted to rent a rack in a data centre and host our servers there, and it seemed wise to have a separate legal entity to sign the contract with the ISP for the rack.

This cost me some money here and there in fees, and I had to take the time to keep books and file annual reports and accounts, but it was bearable.

Then a few years later, I became a freelance software engineer, and as the company already existed, it made sense to operate through that. Making a profit rather than being propped up by cash loans from me meant the company's tax returns became more complex, so I paid an accountant to do those, and that was fine as the saved money in using the company paid for his fees.

So all was fine until 2007, when a flood destroyed our home (and my placed of work).

I had to keep working to support my family, so I went to London to borrow space to work and sleep in, and did what I could to keep cash flowing. But this meant I wasn't spending much time at home where my paperwork was, and had little time to deal with book keeping, and my post was arriving into a building site back home.

A year later we were able to move back in, to try and pick up the pieces. But life was harder than it had been, and Sarah was sicker, and it's taken me until 2012 to catch up.

But last week I submitted my last personal tax returns. Towards the end of last year, my last corporation tax returns. Earlier that year, my last VAT returns. And the good news is, I seem to be eligible for some tax back. I'm happy about that as a friend leant me a thousand pounds in 2007, and I've still yet to pay him back; my tax repayment will cover that, plus some interest and a little left over... I'll pop it into the savings account and wait a few months in case HMRC change their mind, however.

But having all this done is a huge weight off my mind, one that had hung over me for about for years. Right now I seem to be in a phase of shedding burdens and finishing things; the only big thing I have left hanging over me now is migrating my servers, then I can start relaxing a bit and get on with my projects for the year!

Moving house (by )

I hate moving house. It's a lot of work, for a start. It's a period during which all your stuff is packed away so you have to make do continually. And you have to tear apart the home you spent years building, while remembering all the fun times you had in the cold, empty, rooms you are carrying boxes out of. It feels a bit like burning your own wedding photos...

...but soon, it will be over, leaving just the mild frustration of living in a home where many of your possessions are still "in a box somewhere", but at least then you're on the upward path of things continually getting better as you unpack things and find them new homes, slowly customising your new space.

I'm looking forward to sorting out my workshop. It's currently just full of things all over the floor. I'm taking a week off of work to recuperate from the moving, and to sort it out. I'm going to pile everything at one end so I can paint the floor and finish painting the wall, then move everything to the nice end so I can finish the floor and walls in the other end. I'm going to set up my desk, my electronics workbench, and my welding bench. I'm going to run Ethernet into the house so I can get network connectivity. I'm going to set up a 12v power distribution system for fun stuff, such as a Raspberry Pi in a box driving an LED matrix display and a USB hard disk (as a Ugarit distributed storage node) and crazy future home automation experiments and LED lighting in the nearby shed (it's hard finding stuff in there in the dark). I'm going to fix the leaky roof and the draughty eaves so it's warmer and dryer in there. I'm going to rebuild my furnace and experiment with casting aluminium bronze. I'm going to build my wife a radio telescope. I'm going to build my wearable computer and continue my project to bring about my own technological singularity. I'm going to make time for myself to turn some of my unrealised ideas into beautiful things.

Alaric’s projects for this year (by )

This year's going to be pretty busy with settling into the new home, but I have a few projects.

  1. Finish the ring casting I nearly finished before the move. That's a priority.
  2. Resurrect my aluminium foundry. In particular, it's our bronze wedding anniversary, so Sarah's going to design a pattern for a sundial, which I will cast in Aluminium bronze, a nice alloy that I can make myself from my scrap aluminium and bits of old plumbing...
  3. Continue with minor stuff on Ugarit, but as a milestone, build the distributed storage backend, which will rock.
  4. Work on my wearable computer project. No specific milestone for this, as it's currently a long drawn out research/prototyping phase as I sort out many details.

Wish me luck... I usually suffer from "all my weekends getting eaten up", but as my New Year's Resolution has been to spend at least one day every two weeks doing something fun with my children, I'm going to be booking weekend days in my calendar in advance through the year for that and my own projects. Before they get filled up!

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales