Author Archives: Jethro Carr

New KVM Server :-D

As per my recent post about how I have more computers than a small country,  I’ve taken the step to build a new server to run at home for all my development, backup and VM storage.

I’ve managed to condense down my server racks of stuff into a big huge tower case, taking 10 hard drives and up to a EATX server motherboard – whilst it may be pretty big, it’s nowhere near as large as a small data centre is. ;-)

The shiny black monolith of awesomeness

Hardware specifications are:

  • ASUSTek M4A78T-E Motherboard
  • AMD Phenon II X4 810 CPU (4 cores, single socket)
  • 12GB DDR3 RAM (planning to boost to max of 16GB)
  • 4x 1TB 7200RPM SATA drives for archival/file storage. (RAID 6)
  • 6x 160GB 7200RPM SATA drives for virtual machine space. (RAID 5)
  • 2x 4x SATA port controller cards for PCIe-4x
  • Lian Li PC-A71F chassis + additional 4x 3.5″ hotswap chassis.
  • Vantec Ion2+ 600W modular PSU
  • NexStar SATA docking bay + 2x 2TB 5600RPM SATA drives for external offsite backup purposes.

Software Specifications are:

  • RHEL 6 Beta x86_64 (yes, you heard correctly – running beta + jethro hax to get newer version of KVM, with plans to upgrade to CentOS 6 once released)
  • Full disk encryption across all drives to prevent data theft should physical access be compromised.
  • KVM virtualisation -All my previous systems have been Xen, but with the newer hardware I had an opportunity to upgrade to KVM – which is great, I’m finding it far less buggy than Xen has ever been.

Cool Stuff:

  • I’ve been running a number of performance tests using bonnie++ which I will post later this week – or maybe next week due to time pressures – comparing the different RAID levels and disk encryption.
  • Aside from the silly side-mounted hard drives (more on this later) I’m loving the Lian Li case, they very rarely disappoint. The sleek black finish and the smooth minimalistic door on it really helps make it look sexy and awe-inspiring.
  • Yes, the RAM/CPU is a little lacking, plan is to upgrade the MB, CPU and RAM to a bigger (maybe server dual socket) board later this year or early 2012.
  • The whole system even with the disks and fans spinning along at a reasonable load is quiet enough for me to sleep with easily. Although, having said that, I’ll sleep through almost anything. ;-)
  • Use of the multiple 160GB drives is in order to boost the I/O performance of VM disk operations by spreading load across a large number of spindles.

Not-so-cool Stuff:

  • The 16GB memory limit is going to be a pain, I may have to replace the MB sooner than desired.
  • I used up all my PCIe 16x slots in order to fit both PCIe 4x SATA controllers, so I’ve lost the ability to stick more video cards or other I/O controllers – need more PCIe 4x slots in my next motherboard.
  • The dust filters on this version of the case appear to be more awkward to remove whilst running, unlike some of their past models.
  • The side mounting hard drive case makes it difficult to close the case sides without hitting power cables or SATA cables…. using 90′ angled connectors helped for SATA data cables, but the SATA power cables are still being annoying.

Server nudity for all you geek perves out there!

I’ll have some more blog posts over the next week or so (even with pre LCA chaos) to detail some of the things I’ve learnt about Xen to KVM migration and other useful bits relating to virtualisation on RHEL 6.

Happy Birthday to me!

<?php

for ($i=0; $i <= 22; $i++)
{
    print "Jethro is oo";
    
    for ($j=0; $j < $i; $j++)
    {
        print "ooo";
    }
    
   print "old\n";
}

if ($i == 88)
{
    die("horrible horrible death");
}
else
{
    print "Live long, and prosper\n";
}

?>

The OOM killer is a nasty nasty bully

As part of my two weeks of annual leave, I’ve been making good of the spare time to work on upgrading a lot of my servers, adjusting configurations and performing a large shuffle of virtual machines between some of the hosts I have in different data centers.

As part of this work, I’ve been upgrading what was previously a DR-only host to run as full production after some nice memory and disk upgrades.

Unfortunately I ran into the beloved “Memory squeeze in netback driver” bug as per Xensource bug 762.

This delightful bug leads to a situation where although the server has about 8GB of available memory, Xen runs out of memory for networking to the VMs after a certain number of guests are started.

It’s a known fault with something to do with the Xen dom memory ballooning – one workaround is to force the domain to a certain memory size – easy enough to do, one change in the bootloader and another in the xen configuration files.

However I had to be clever. I thought to myself “Why not just tell the Xen dom to just set the memory now using xm mem-set command and save a reboot?”. Sadly my brilliant idea didn’t extend to checking how much memory the host was actually using….

Since it had been running for a while, a few processes had decided to take advantage of the additional memory and didn’t take kindly to having to fit into the new size, promptly consuming the allocated 256MB plus the swap space on the host.

If you’ve never exhausted a Linux box of memory, what happens next is never fun – Essentially the kernel invokes the Out Of Memory killer, which goes and kills of processes that it thinks are most deserving of being terminated to free resources.

Whilst this sounds like a smart feature, the OOM killer isn’t actually that smart and can do some undesirable activities – in this case, it went and terminated almost all the processes on the server, including both cron and SSH in an attempt to free memory.

I had setup a script to automatically restart the server should another remote server be unable to establish an SSH connection after 10mins whilst working on the changes just-in-case I did something silly and killed networking, however with cron terminated, this script isn’t getting executed.

So I now have a box that can do nothing other than ping, located in a data centre requiring a technician to power cycle it – the nightmare of any sysadmin. :-(

These situations are pretty rare these days thanks to most workloads being inside virtual machines or on servers with lights out management, but they still happen from time to time sadly. :-(

This bug is also one of the reasons why I’m really enjoying KVM on RHEL 6 over Xen on RHEL 5, so far it appears far more stable, less buggy and generally less “hacky” in nature.

Interestingly, only seen this bug on x86_64 xen hosts… many of the bugs I find with Xen seem to be architecture specific bugs and often don’t happen on i386 or vice-versa.

Sadly most of my production boxes still have another 12-24 months of life before I can justify upgrading them all to shiny new KVM hosts with LOM capabilities, I look forwards to when I can.

Meanwhile, I think some research into the OOM killer is needed, to find out how I can best configure it not to kill key processes.

The OOM killer isn’t entirely stupid, it does a number of metrics to try and make the best of a bad situation as per the documentation, but at the end of the day it’s just a really nasty tool for a problem you never ever want.

Too many computers….

I’m currently looking over my network and computers and realising that maybe, just maybe, I have a few too many….

For example, here’s my production network:

That doesn’t include a lot of the test kit that’s racked up, that’s all production or development hosts that need to stay running.

The main issue is that I’ve ended up with a bit too much VM bloat, which isn’t a problem in terms of hardware (since one just sticks another 16GB of RAM into a box to fix that) but rather management and maintenance, the time it takes to check things like backups, verify correct operation, keep system secured, etc.

The other major issue, is that I’ve ended up with too much development kit in a small office/data centre, mostly running staging and development virtual machines but also with several specialist physical hosts (eg blade server, some sun kit, switching, etc)

Don’t get me wrong, it’s a brilliant lab to work with and very useful for spinning up projects to develop with, but the sad reality is that the cost problem doesn’t justify keeping so much physical kit.

Doing the math, I’ve found that if I pay commercial rent, power and internet services, this data centre would cost me about $10,000+ a year. For that price, I could buy a *very* nice server every couple years to run everything as a virtual machine instance.

For $10k, I could even buy a really high end machine every 3 years and rack it into a data center, however NZ’s insane data cap limitations mean that I still need to retain a local server for accessing the file server and backup servers.

So as much as I love the lab, I think I will make the decision to pull the plug and reduce/virtualise a lot of the kit. So if you’re after some decent servers, switches and other infrastructure at a good price, let me know, there’ll prob be some good auctions going up in the next few weeks or so.

2011 New Year’s resolutions

So 2010 has been a pretty eventful year….

  • Ran Amberdms as a three person company for a while and did entirely too much work, got pretty burnt out TBH.
  • Accepted a new job at my previous employer with exciting new challenges and saner hours.
  • Learnt a lot about myself – my interests, how I handle stress, love, rejection, etc.
  • Made many new friends and actually developed a bit of a social life which is now impacting on time available for geekery…. I blame Twitter entirely for introducing me to interesting and fun people.
  • Finally updated this blog to WordPress ;-)

So what do I want to achieve in 2011?

  • Reduce the amount of “stuff” I own. Not quite to the whole cult-of-less approach, but I really have far too many computers, gadgets and other bits and pieces that I’ve managed to collect over the past 10 years.
  • Tempted to sell off my data center gear and reduce to just a couple boxes running large numbers of virtual machines.
  • Get back into enjoying IT more – I still love it, but the amount of work I’ve done lately has it feeling a bit like a chore and less like fun. So I want to do some fun projects in 2011 just for my enjoyment :-)
  • Be a more relaxed, less stressed person. Not doing 60-80 work weeks will certainly help. :-)
  • Keep the flat tidier…. I’ve spent hours getting the place into a liveable condition and it’s far far nicer this way, aim to keep it that way. Reducing the amount of stuff I own will also help there….
  • Figure out relationships, love, sex, etc. What am I after, who do I want and where my interests lie. And have fun doing so. :-)
  • Figure out life goals – what do I want to achieve in the next 10 years?
  • Keep making regular blog posts, I actually really enjoy writing, it’s just tricky finding the time…

In terms of projects, there’s a few neat things floating around in my head that I’m considering:

  • Move from proprietary microblogging (eg twitter) to open source microblogging (eg statusnet or dispora) yet still maintain ability to communicate with all my friends on Twitter.
  • Really, really, want a better open source twitter and status.net/identica capable client, I may sit down and write one if I can’t find anything good soon.
  • Build a Linux From Scratch system. I last did that in college and it’s so much fun. Extracting tarballs, patching, compiling, etc, etc :-)
  • Considering writing a book on IT policy and professionalism, basically stuff I’ve learnt from the 5 years I’ve been in IT that I wish I could have known when I was first starting, rather than having to find the hard way.
  • Secret coding stuff I can’t talk about ;-)

So those are my plans/goals/resolutions- what are your ones for 2011?

2011 is almost here!

As you may have noticed, I’ve been a bit quiet on the blogging front, slipping back into bad habits I suspect :-/

I got pretty caught up with busy work and life in November and December, something I’m still catching back up from…. on the plus side, the new job is great, lots of exciting challenges and a good team to be working with. :-)

Just starting a two week company office shutdown, so have a bit of time off for the first time in about two years, which is feeling pretty weird…. plus I’m only back for about another two weeks before heading away to linux.conf.au and the associated AU holiday trip.

Going to spend the holidays catching up on blogging, releasing source code for some of my nifty projects and performing a number of infrastructure upgrades on my servers and other systems.

Currently trying to make a decision about my big two server racks, I don’t think they’re worth it for the cost vs what I could do by virtualising down into a single big bad server, but it’s a very fun setup to work with…. either way, I think I’ll shed some of the machines, so I’ll blog post when they go up for auction.

Will get some new year’s resolutions up on here later this week. :-)

Kiwicon 2010

I’m spending all weekend at Kiwicon 2010, a IT security/hacking/cracking conference being held in Wellington – this is the 4th Kiwicon, I’ve been to each once since the beginning and it just keeps getting better and better every year.

It’s an interesting mix of networking security, *nix security, windows exploits and other cool geeky or life hacks, well worth attending. :-)

I’ve been taking notes from certain talks and will be posting them up there as well as emailing anyone who wants a copy.

Will add a hyperlink to all notes uploaded on this page. :-)

30 days of geek running late

For those of you following 30 days of geek, apologies, but I’ve an extremely busy week so running a little bit behind. Will try and catch up soon as soon as one large project is out of the way. :-(

Day 21 – Favourite thing & worst things about working in IT?

This post is part of my 30 days of geek challenge.

Overall IT is great and I really can’t see myself doing anything else with as much love and enthusiasm as I have for IT. :-)

Things I love:

  • The people! Such a range of interesting and talented people capable of holding interesting discussions, I’ve made amazing friends from working in IT.
  • The community – this is someone tied into the above, but there is an amazing community of people in IT, who really do support one another, both in work but also in life, though both the good times and hard.
  • Exciting projects, designing the infrastructure that makes modern life and communications possible.
  • Being challenged on a daily basis with interesting problems.

Things I hate:

  • The dating pool! The guys to ladies ratio is really terrible, particularly for younger guys, considering how many people meet their partners whilst at work, this does pose a dating challenge.
  • People having no understand of how complex things in IT can be and expecting miracles.
  • People assuming that working in IT means you’re a boring “computer nerd”. IT is one of the best places full of cool and interesting people. Sure, they’re all geeky as fuck, but it’s great. :-)
  • People who get into IT because it’s a good career but who have no passion for technology and just do it for the money. Fortunately the companies I’ve always worked for have had passionate staff who really do love what they do.

Day 20 – Where do you stand on Internet Censorship?

This post is part of my 30 days of geek challenge.

I’m totally against internet censorship, whether that’s full blown censorship (eg china style) or the western so-called “child-porn filtering”.

The fact is, any system capable of censoring the internet can be taken by someone in power and used against the population, to block undesirable websites – that could be alternative political parties, websites discussing legislation of Marijuana, euthanasia websites, sites featuring “immoral” content such as gay/lesbian content, BDSM, atheist or other non-mainstream interest sites.

It’s a dangerous tool to hand over to someone, even if you trust the government that’s currently in power, will you be able to do the same in 10, 20, 50 years?

The role of a government should be to protect it’s citizens from harm, not make moral questions about what we should think or access to suit their own beliefs.

Governments love using the claim of blocking child porn as a way of getting filtering established – after all, who’s going to try and argue against stopping child porn?

However filtering it won’t stop abuse of children or pedofiles from downloading content, much of the illegal content sharing is done via alternative protocols and wouldn’t be impacted in the slightest.

I entirely support governments going after people downloading or producing that content, but we should not be handing over our freedom in order todo so.

I have a more detailed writeup about what’s wrong with filtering and why it won’t work in an older blog post.