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:
advertisement
- Getting to grips with Microsoft's IT Health Environment Scanner
- Virtualise your servers
- The changing face of travel gadgets
- Build your own distributed file system
- The bulletproof Dell that costs an arm and a leg
- Microsoft Office 2010 Technical Preview: Q&A
- Lawnmowers, the TyTN II and one odd insurance request
- There'll never be a bulletproof OS
- How far can we trust apps?
- Five nice touches in Outlook 2010
- Why Britain's watchdogs have fewer teeth than goldfish
- Tabbed documents: how to make Office 2010 great
- Outlook 2010 People Pane – does it spell death to Xobni
- Microsoft Outlook 2010 screenshots
- Co-Authoring in Word 2010 and SharePoint Foundation 2010
- Microsoft Outlook 2010 screenshots: Backstage view
- Flash 10.1: Developing for Desktop and Device
- Microsoft Office 2010 screenshots: Recover unsaved items
- Microsoft Word 2010 screenshots: Text Effects
- Microsoft Word 2010: inserting screenshots
- Q&A: Why Conficker was a victim of its own success
- App developers losing faith in Android
- Biz Stone: Murdoch's Google veto will "fail fast"
- Google adds automatic captions to YouTube
- China ramps up cyber spying
- Mozilla maintains dependence on Google
- Windows 7 flying off the shelves
- Google Chrome OS: full details unveiled
- AOL slashes 2,500 jobs
- YouTube begins streaming full-length shows
advertisement
Printed from www.pcpro.co.uk


