AWS's Block Device Mapping in CentOS

The Story

I'm using Amazon's EC2 for some of my VMs, which run CentOS. When viewing Block Device Mappings (mapping between the virtual storage - ebs, ephemerals etc. and the block devices inside the VM) in CentOS 6.5, I ran into an annoying issue. When inspecting my instance ...

more ...


Git Prompt Variables

I recently reinstalled my laptop and had to reconfigure my git prompt. I use the git prompt script that is included in Ubuntu's git package, and integrate it into my prompt by editing ~/.bashrc, executing source /etc/bash_completion.d/git-prompt, and adding $(__git_ps1) to my PS1 variable, just before ...

more ...

Validating network segments using Puppet

The Problem

When configuring KeepaliveD using Puppet, sometimes an interface name has to be used. Imagine a server with 2 interfaces (eth0,eth1), where one is facing the internal network and one is facing the internet.
My puppet configuration for an internet-facing virtual interface can be something like:

keepalived::vrrp ...
more ...

Accessing a specific server in an HTTP cluster

The Problem

Part1 - Fault tolerence

A common configuration of web servers is setting up multiple servers to serve the same content, with a load-balancing method redirecting / forwarding clients to a specific server.
For instance, let's say I'm using servers server and otherserver to serve the site cluster-name.
The ...

more ...

Linux and SSDs - Should You TRIM?

Note: Although my experience is with Debian, I think this post helps anyone using some modern Linux distribution.

What is TRIM?

As a Windows sysadmin, I didn't really consider the cons of running on top of Solid-State Drives, or SSDs. These drives are based on flash memory (similar to a Disk-On-Key), rather than metallic plates.
A big difference between magnetic hard drives and SSDs is block reuse. more ...


My Pinning Guidelines

In my previous post about pinning I talked about the reasons to configure apt pinning.
This post details my logic about what and how to pin.

Pinning technicalities

How pinning is done

The best way to pin stuff is to add files in /etc/apt/preferences.d/
Those files are ...

more ...

Why Pinning

There are plenty of guides about apt pinning, but no one really explains the motivation to do so. It took me some time to understand that, so I thought I'd write it down.

The Issue

The mainstream method of downloading and installing packages from a repository is via APT ...

more ...

Adding Repositories for Inspection

Sometime I want to inspect software repositories. However, I don't want my machine to actually install anything from it.
To do so, I made a small bash function that both adds the repository and pins it to priority -1, telling apt to never install anything from it (unless manually ...

more ...

Setting up Gargoyle as a Time Server

The Story
For reasons unknown to me, Debian's NTP daemon only works on udp port 123, even when operating as a client.
This is a problem because my network configuration does not allow incoming packets on this port, thus preventing my raspberrySeed (raspberry pi running Debian, deluge, flexget) from ...

more ...