Skip to navigation

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.

Real World Computing

SAN on the cheap

Posted on 18 Jan 2006 at 14:37

Simon Brock and Ian Wrigley use off-the-peg open-source software to build a basic implementation of a SAN using iSCSI

To realise the plan, we're going to use two identical Dell 1U rack-mount servers with two Gigabit Ethernet ports cross-connected. On to these servers we're then going to load a collection of open-source software. First, we're going to need an operating system, and it should be no surprise that the chosen OS is Linux. The variant we're going to use is CentOS 4. The Community ENTerprise Operating System project makes Red Hat Enterprise Linux (RHEL) available to the rest of us (that is, those who want to use the excellent RHEL but not spend £200 per year per server for updates). What CentOS does is take the Red Hat source code, compile it and repackage it. You therefore get all the good software that comes from Red Hat for free and, although you don't get support from Red Hat, you do get upgrades.

Recently, CentOS has also started rolling extra packages into its offering, two of which we're going to use. The first is 'heartbeat' from the Linux High Availability Project, with which we'll implement the active-passive failover. As its name suggests, heartbeat is a set of tools that allow a group of PCs to monitor each other's activity (via a heartbeat signal), detect 'death' and take over another machine's services. The other package we're going to employ is DRBD, which allows a block device (typically a disk partition) to be shared between two machines. The machine using the device is then set as the primary, and any update it makes to the device gets forwarded to the secondary; if the primary fails, then the secondary can be made primary. When the failed machine returns, it resynchronises with the current primary and then takes over.

Installing both of these into CentOS 4 is simple. First, issue the command 'yum groupinstall drbd-heartbeat'. Then to install the DRBD kernel module for your kernel, issue the command 'uname -r' to discover your operating system version. On our system, this gave the message '2.6.9-22.0.1.ELsmp', so to install the DRBD kernel module we issued 'yum install kernel-module-drbd-2.6.9-22.0.1.ELsmp'.

There's one last thing we need to install and that's the iSCSI target software itself. A quick check on the Internet will show three or four versions, but some of these aren't very active. The one we chose was a recently created project called the iSCSI Enterprise Target (iscsitarget.sourceforge.net). A surface skim of the website suggested that it wouldn't work on our chosen CentOS 4 system, as it needs kernel version 2.6.13 or better (we're running 2.6.9). However, this is a Red Hat-derived kernel, which means its kernel version number is somewhat 'eccentric'. All Red Hat packages tend to start off at a base level (2.6.9 in this case) and then have patches rolled into them, so some of the differences between 2.6.9 and later kernels are actually already there in the RHEL-derived kernel. We're sure there's more to it than that, but in essence someone has done the work for us, and a quick check of the Wiki-based documentation contains an installation guide for Red Hat. Having followed those instructions, the target software was installed on both machines.

Configuring iSCSI

Let's start with a simple scenario. We're going to take one disk on a machine and publish it via iSCSI. All the configuration work is done in one file on the machine, in /etc/ietd.conf, and we edited this file so it contained three lines:

IncomingUser joe secretsecret

This sets up a single username for access (we used the password secretsecret as it has 12 letters and works better with Windows). The next line is:

1 2 3 4
Be the first to comment this article

You need to Login or Register to comment.

(optional)

advertisement

Latest Real World Computing
Latest Blog Posts Subscribe to our RSS Feeds
Latest News Stories Subscribe to our RSS Feeds
Latest Reviews Subscribe to our RSS Feeds

advertisement

Sponsored Links
 
SEARCH
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2008