Happy Leap Second!

By Tuesday, June 30, 2015 0 Permalink 0

Are you ready for tonight’s leap second?

No idea what I’m talking about? tl;dr – once in a while, an extra second is added to synchronize coordinated universal time (UTC) with mean solar time. This is needed because, generally, the Earth’s rotation slows down over time. Leap seconds, unlike leap years, do not occur in regular intervals, because the variation in the Earth’s rotation speed varies irregularly. An example of such irregularities is the 2011 Japan earthquake, that increased the Earth’s rotation speed a bit.

If you’re thinking “what’s an extra second once in a while?”, and “why should anyone care about it?” – feel free to spend that extra second in a productive way 😉

A little extra thought can uncover the potential complexities entailed in such time manipulations.

How do banks and stock markets agree on exchange rates? If you make a deposit and a withdrawal, does the order matter? In a distributed compute cluster, how do compute nodes elect a leader? In cryptographic protocols, how do Alice and Bob verify that Eve isn’t tampering with their connection? How does a control tower in a busy airport is able to coordinate hundreds of incoming landings?

These examples, and many others, all rely on the ability to know the time, have a good estimate about the time on “other sides”, and being able to order events sequentially. Manipulating with time itself, in an irregular way, can cause a lot of chaos… It actually did cause chaos the previous time we experienced a leap second, back in 2012!

This is quite an interesting subject, and I encourage you to go deeper 🙂 .

If you decide to read just one more thing, let it be Google’s post on the subject, mentioning their elegant “smear window” solution. It’s pretty cool.

How To Migrate a WordPress Blog

By Monday, November 10, 2014 2 , Permalink 1

One of things I love about WordPress it that it’s an open content platform. Being open, the platform understands that the user owns the content within. Truly owning your content means you should be able to take it out of the platform, and do whatever you want with it. WordPress makes it easy!

This post is a how-to guide on migrating a WordPress site. It covers:

  1. Exporting all your content from a hosted WordPress.com site.
  2. Importing the content to a self hosted WordPress site.

The export part applies also to self-hosted WordPress sites. I write specifically about a WordPress.com-hosted site because this is what I use for the example.

Continue Reading…

Fixing Homebrew on OS X Yosemite

Homebrew is “The missing package manager for OS X”. It’s pretty great. Unfortunately, upgrading to OS X Yosemite might break it, as it did for me.

There are several paths for fixing it, depending on when you realize it’s broken. Here are a few possible fixes that you can use.

If you just want the bottom line, here it is:

  1. If you still haven’t upgraded to OS X Yosemite, run brew update before the OS X upgrade.
  2. If you already upgraded OS X and your Homebrew is broken, run git pull from /usr/local, and then run brew update.

Read on for more details on my experience with the break and fix.

Continue Reading…

Local WordPress Sandbox With Bitnami On OS X

By Monday, October 27, 2014 0 , , Permalink 1

Whether you want to start your own WordPress-powered site, or you’re a WordPress developer – a local WordPress installation is a useful tool. Luckily, with the Bitnami WordPress stack, it’s also a breeze to set up!

WordPress, as a PHP-based web application, requires a full-blown web stack to run. At the very least, you’ll need a PHP-enabled web server, and a database engine. An often-used combination is the LAMP stack, which stands for Linux, Apache, MySQL & PHP.

Setting up a full stack on your own is definitely possible. For most, it’s not considered a fun way to spend an afternoon (or a weekend, if things get hairy). Got several computers with different OSes? Expect a completely different experience with each one…

Enter Bitnami. In a nutshell, Bitnami provides pre-configured, self-contained, application stacks for many popular web applications. And they do it for Windows, Linux, and OS X! Want to install a local WordPress stack? Simply download the installer for your platform, run it, and rejoice!

This short how-to post demonstrates installing a WordPress Bitnami stack on OS X.

Continue Reading…

Enhancing Mordor unRAID With IBM ServerRAID M1015

When I set up unRAID as a VM on Mordor ESXi host, I reviewed the available solutions for configuring data drives for use in unRAID. I reached the conclusion that the optimal solution would be to use VMDirectPath I/O to passthrough the disks directly to unRAID, but I could not accomplish that successfully, and settled on using Raw Device Mapping. But now I got the IBM ServerRAID M1015 PCI-Express card I purchased on eBay (also available from Amazon), and I’m all set to install it and upgrade my setup!

The loot:

The package included one IBM RAID Card, already cross-flashed to LSI-9210-8i IT firmware, and two SFF-8087-to-4-SATA cables (refer to the unRAID forums for more on LSI firmware versions and unRAID).

Following is a step-by-step procedure of a successful install.

Below it I go over possible pitfalls that I actually encountered, as a useful reference of what to avoid.

Continue Reading…

Setting up unRAID as VM on Mordor

After installing VMware ESXi on Mordor, the next step in my Mordor 1.0 -> Mordor 2.0 project is to regain the basic Mordor 1.0 functionality based on a VM, AKA, set up an unRAID-powered-NAS.

In this post I document the details of my experience of setting up unRAID (version 5.0-beta12a) on my ESXi server (running version 5.1.0). I describe creating a VM on ESXi that boots from a physical USB flash drive (using Plop Boot Manager), my adventures with trying to passthrough the onboard SATA controller to the VM (spoiler: it failed), and other options for configuring the data drives for the VM (Raw Device Mapping, VMDirectPath I/O passthrough).

By far, the most useful resource that guided me in this process was the amazingly detailed documentation by the unRAID user Johnm in his ATLAS post in the Lime Tech forum. I have used guidance and tips from his post extensively, and will probably repeat some in this post.

Continue Reading…

Installing VMware ESXi on Mordor

The first step in my Mordor 1.0 –> Mordor 2.0 project is installing VMware ESXi on the server, which I describe in detail in this post.

As I mentioned in the project page, Mordor: My Home Server, after having a dedicated unRAID server up and running for the last year or so, I wanted to better utilize all this hardware by turning it into a mean-VM-machine.

The game plan:

  1. Upgrade Mordor CPU to something more VM-server-worthy.
  2. Install VMware ESXi Hypervisor 5.1.0 on a USB flash drive.

Sounds simple, but the devil lies in the details…

Of course, before diving into tweaking and messing around with Mordor, I made a backup of unRAID, removed the unRAID USB flash drive from Mordor, and disconnected all the NAS data HDs.

Continue Reading…

Mordor 1.0: My Dedicated unRAID Server

During October 2011 I built my first home server. It was purposed to be a dedicated NAS server, based on unRAID OS.

In this post I intend to try and recall considerations and decisions, and document the setup, to serve as reference for myself, and as background for the following posts dealing with the transition to Mordor 2.0. Since this is mostly a recall from memory, it is most likely inaccurate and incomplete, but it’s what I got…

Continue Reading…