Reclaiming storage space on two-node MongoDB replica sets

At mongodb.org they seem to assume we can create MongoDB replica sets using unlimited numbers of instances which have infinite amounts of storage. In practice, however, we often need to use replica sets with only two nodes (plus arbiter) which have limited storage. The problem then is that MongoDB has the tendency to use vast amounts of disk space without reclaiming the space from dropped data, so it consumes ever-increasing amounts of storage. It’s then hard to deal with this storage problem given the limited options available in a two-node replica set.

A solution to this is clearing all the data from each node in turn, which forces MongoDB to rebuild its data using only the disk space it needs. When performed on a regular basis, this stops the amount of storage which MongoDB is using from constantly increasing at an unacceptable rate.

Continue reading “Reclaiming storage space on two-node MongoDB replica sets”

Setting up an IPsec VPN on pfSense 2.1 for mobile OS X and iOS clients

I recently had to configure the open-source firewall pfSense to allow VPN access for mobile clients, particularly those using OS X on Macs and iOS on iPhones and iPads.

I haven’t found too many examples out there from people who have set this up successfully, so I thought it might be helpful to share this information for others who are trying to set up a similar VPN configuration.

Continue reading “Setting up an IPsec VPN on pfSense 2.1 for mobile OS X and iOS clients”

SysAdmin fame at last!

I was interviewed for a careers feature in the esteemed PC Pro magazine, and my article has been printed in the latest edition:

Matt Brock - Linux system administrator

I think they’ve done a great job of editing my original monologue into a compelling description of the excitement, challenges and rewards of administering computer systems and managing infrastructure, and I hope it helps to encourage college graduates and other potentially interested individuals into the field of system administration.

In the meantime, I’ll continue to enjoy my fifteen minutes of fame…

Monitoring PERC RAID controllers and storage arrays on Dell PowerEdge servers with Debian and Ubuntu

If you have a Dell PowerEdge server with a RAID array then you’ll probably want to be notified when disks are misbehaving, so that you can replace the disks in a timely manner. Hopefully this article will help you to achieve this.

These tools generally rely on being able to send you email alerts otherwise their usefulness can be somewhat limited, so you should make sure you have a functioning MTA installed which can successfully send email to you from the root account. Setting up an MTA is beyond the scope of this article, so hopefully you already know how to do that (or you can check out my new post on setting up a Postfix-based mail system).

Continue reading “Monitoring PERC RAID controllers and storage arrays on Dell PowerEdge servers with Debian and Ubuntu”

Comparison of keyboards for iPad mini with Retina display

At any given time I’m effectively on 24/7 support for a number of clients, but I don’t always want to carry my laptop with me wherever I go. I therefore decided it would be a good idea to buy a keyboard for my iPad mini with Retina display in order to have a light, very portable hardware solution suitable for most support situations without having to carry my much bigger, heavier laptop around.

Continue reading “Comparison of keyboards for iPad mini with Retina display”

Security hardening on Ubuntu Server 14.04

Recently I’ve been involved with a project where I needed to perform some security hardening on Amazon Web Services EC2 instances running Ubuntu Server 12.04, so I used this excellent guide as a starting point, then I added, removed and modified things as needed.

I decided to take those procedures and modify them for Ubuntu Server 14.04 now that this new LTS version has been released. Some of the procedures from 12.04 no longer need to be performed, and some needed to be changed. The following guidelines are what I’ve ended up with. You might find these guidelines useful to varying extents on other Linux distributions, but there will be potentially very significant differences depending on which distro you’re using.

Continue reading “Security hardening on Ubuntu Server 14.04”

Runner-up for Weapon of Choice in the Socially Awesome Sysadmin Awards

I have to admit I was a little gratified and fairly amused to see that I was runner-up for the “Weapon of Choice Award” in the “Socially Awesome Sysadmin Awards” as a result of using the obscure Twitter client YoruFukurou. Unfortunately I stopped using YoruFukurou a while back as it wasn’t being updated, and I switched to Tweetbot instead as it has all the powerful functionality and configurability that I like, plus comprehensive mute filters with a regex option, decent syncing across the platforms I use, and a nice clean interface.

I’m not sure how I feel about being described as a “serial awards bridesmaid” though! Still, I guess lots of nominations are good, and perhaps I’ll win one eventually…

How to use Flickr favourites as your screensaver in OS X Yosemite, Mavericks and Mountain Lion

Mountain Lion was an improvement on Lion, which I had mixed feelings about when it was released. Unfortunately, however, Apple apparently decided that RSS is a dead technology (although it seems to be creeping back into Safari), and consequently the handy RSS screensavers were removed, which means there was no simple way of creating a screensaver out of one’s Flickr favourites in Mountain Lion, and this remains the case in Mavericks and Yosemite.

Having come up with an effective solution for how to get Flickr favourites as a screensaver in Mountain Lion which also works in Mavericks and Yosemite, I thought I’d share the method for the benefit of those who are not so used to fiddling with the deeper technological aspects of their Mac. I’ve gone into quite a lot of detail for those who are less technically-minded, but those of a more technical bent can just skip ahead accordingly.

Continue reading “How to use Flickr favourites as your screensaver in OS X Yosemite, Mavericks and Mountain Lion”

Creating a two-node CentOS 6 cluster with floating IP using CMAN and Pacemaker

Originally I was using Heartbeat to create two-node Linux clusters with floating IPs, but when Heartbeat stopped being developed I needed to figure out how to use Corosync and Pacemaker for this instead. Somewhat annoyingly, Linux HA stuff has changed yet again in CentOS 6.4, so now it’s necessary to use CMAN and Pacemaker instead.

This is quite a lot more in-depth than the simple configuration that was originally required for Heartbeat. Anyway, based on my recent experiences, here’s a very quick guide for if you find yourself in a similar situation. This works for me on CentOS 6.4 and higher, but it won’t work on earlier versions of CentOS.

Continue reading “Creating a two-node CentOS 6 cluster with floating IP using CMAN and Pacemaker”