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
machine1 10.0.0.46 drbddisk::r0 iscsi-target
where machine1 is the primary machine named as a node in the ha.cf file. The IP address is the one that will offer the service - it won't be an IP address that's normally used on the machine, but one that's transferred back and forth according to which machine is the primary. The final two entries tell the heartbeat software to use the DRBD disk resource 'r0' and start the iSCSI target service.
We did all of the above, started the heartbeat and up came the iSCSI target. Then, from our Windows machine, we mounted the new volume, formatted it, copied on some files and it all kept working, so we started to get nasty. We tried starting a large copy operation and shutting down the heartbeat on the primary machine to simulate a failure. There was a definite hang in the copying process while the Windows machine found the IP address again, but it did all work.
After that, we just started to get more and more destructive -because it kept working - eventually just pulling the power lead out of the primary to see what would happen. The heartbeat worked as expected and the service transferred to the secondary. Again, the Windows initiator seemed to pause, but then continued the copying and finished. Not quite believing it had worked, we ran an MD5 checksum tool on the files on the iSCSI drive and they reported the same checksum as the original files, which means it really did work and all the blocks were transferred successfully.
One final note on the iSCSI target software that's available for Linux: it will allow you to export any block device that, as we've seen, includes raw disks, partitions on disks and emulated block devices. In this case, we've used the DRBD emulated block device, but we could have also exported a software RAID device from the system. At the time of writing, the open-source implementations didn't support exporting character devices, which means you can't export a tape drive, although the iSCSI protocol allows this and some commercial implementations support character devices.
When we first started writing this article, we'll admit that, while we wanted to believe it was all going to work, we weren't sure whether it would. By the end of the article, though, we can be nothing but impressed by how well it works. Using off-the-peg open-source software, we've managed to put together a basic but compelling implementation of a SAN using iSCSI. We've only just touched on what a SAN is for and what iSCSI can do, but what a great start.
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


