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.
From around the web
advertisement
- How to make Google AdWords work for your business
- The curse of sloppily written software
- Paying for your crimes with Bitcoin
- Behind the scenes: tech support for Formula 1
- The security risk of fat fingers
- Why Windows Phone 7 isn't quite ready for business
- When will Microsoft stop fiddling with Windows 8?
- Flash down the pan?
- Metro Style apps vs desktop applications
- Coping with Facebook changes
- Chrome's shine getting lost in translation
- BytePac: the cardboard hard disk enclosure
- How tech loosens our grip on reality
- Hokum watch: Safer Internet Day
- Why I'm deleting Adobe from my PC
- Prepare to be patronised: it's Safer Internet Day
- Dear Sony, Samsung and every other tech company in the world: stop trying to be Apple
- Will Apple's Final Cut Pro X update placate the pros?
- Smartr Contacts for iPhone review
- Switching to Office 365's Outlook Web App
- VeriSign slammed for security breach cover-up
- SAP willing to share HANA with Oracle
- Why using a tablet could harm your health
- New RIM boss: no need for drastic change
- RIM founders fall on their swords
- Slow economy helps boost Red Hat revenue by 23%
- Google+ pages get multiple admins
- One in five companies lack card industry compliance
- Oil industry warns hacking attacks could kill
- British workers fear email monitoring
advertisement

