openfiler1It’s inevitable: hard drives just fall by the wayside. Even more so with the switch from IDE to SATA over the last couple of years. Where I work, large amounts of data had been stored on single spinning IDE disks (bad), so one of my goals was to migrate that data to redundant arrays for better protection. OK, that’s fine. But what to do with the oddly-sized 500 and 750gig IDE hard drives that end up in a pile on your desk?

One word: NAS. (okay, so it’s an acronym for Network Attached Storage)

In our case, we need some large, fast, short-term backup space to handle convenience-backups, or backups that I think are not there for disaster-recovery, but are there to avoid having to re-download gigabytes of data from repositories like MSDN or Linux distros. Should irreplaceable data go to tape and get rotated offsite? Sure. Can I still offer several terabytes off disk-to-disk backups just in case? You bet. It was surprisingly easy, actually.

Since the vast majority of the administration on this network is at the Windows-comfort level, the three things I used were: old hardware, Windows 2003 Server, and the most recent distro of Openfiler.

Step one: wrangle your hardware

Using an Optiplex GX270, I was able to mount three IDE drives in it – two 500gig and a 750gig. I booted the machine to make sure that the BIOS and pins were set correctly. On another Optiplex, I installed Server 2003, brought it up-to-date, and added it to our domain.

Step two: install Openfiler

Download the latest release of Openfiler from their website and burn to CD. Boot the machine with all the disks to that CD and install Openfiler. Openfiler is an open-source product built on rPath linux. It’s it most complex setup, it can be deployed as a full-featured filer/file server, with useful things like NFS, CIFS, FTP, and rsync, as well as snapshots and software RAID. In this case, I enabled the iSCSI service in Openfiler, added all three disks in that old Optiplex as a single physical group, then created a single iSCSI volume on that group. That’s a 1.67TB iSCSI target using disks that would have otherwise ended up spread around in desktops.

Step three: mount the Openfiler iSCSI target in Windows, format, fill

wss-55x55-clusteringOn the second Optiplex, I installed the free Microsoft iSCSI Software Initiator, which comes installed by default in Server 2008. Without going into all the technical aspects of iSCSI (since I’m not fully aware of them, really), the iSCSI initiator is a simple Windows service that allows a Server 2003 machine to connect to an iSCSI target – in this case, the Openfiler machine. In it’s most basic setup, you simply add the IP address of the Openfiler in the iSCSI initiator setup to point to the Openfiler. It’ll find the target that’s presenting those physical disks, and Server 2003 will now believe it’s got one big additional hard drive to play with when you open up Disk Management. It’s cool.

Some things I’ve learned about using this setup (and iSCSI in general):

  • DO NOT use an iSCSI target as a dynamic disk – only use it as a basic disk. If you create it as a dynamic disk, and then do something like, oh, set the flag that doesn’t allow Windows to fully start up until it’s reconnected all of it’s iSCSI targets… well, you’ll be waiting a long, long time. Ask me how I know this.
  • On your file server, or whatever is presenting the iSCSI target, it’s highly useful to have two gigabit NICs in use. In a basic setup like this with low traffic usage it’s not as noticeable. But as traffic increases, you want your file traffic to users going out through one interface, then your iSCSI traffic to your NAS going out another interface (and across a different switch or network segment).

Finally, the flexibility of using something like Openfiler really creates a ton of pretty cool opportunities. Say you have the desktop hardware to present the disks but want to use a VMWare guest as the file server? Easy: since Openfiler can act as an iSCSI target, and since VMWare ESX can initiate sessions to iSCSI, you could add an Openfiler NAS as an additional datastore for your ESX server – and utilize all that disk space using a regular old VM setup.

Some additional reading on iSCSI:

Wikipedia entry on iSCSI
Microsoft Storage Technologies – iSCSI
Openfiler.com
Connect VMware ESX Server to a free iSCSI SAN using Openfiler